Skip to content

Commit

Permalink
Merge pull request #181 from JohanMabille/notify
Browse files Browse the repository at this point in the history
Upgraded to xproperty 0.10.0
  • Loading branch information
SylvainCorlay committed Jan 10, 2020
2 parents 5d3b08d + e992eb6 commit 2771063
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install:
- conda update -q conda
- conda info -a
# Install host dependencies
- conda install xeus=0.23.3 cppzmq=4.3.0 xproperty=0.9.0 nlohmann_json -c conda-forge
- conda install xeus=0.23.3 cppzmq=4.3.0 xproperty=0.10.0 nlohmann_json -c conda-forge
# Install build dependencies
- conda install gtest cmake -c conda-forge
- cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%MINICONDA%\\LIBRARY -DBUILD_TESTS=ON .
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ install:
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Install host dependencies
- conda install xeus=0.23.3 cppzmq=4.3.0 xproperty=0.9.0 nlohmann_json -c conda-forge
- conda install xeus=0.23.3 cppzmq=4.3.0 xproperty=0.10.0 nlohmann_json -c conda-forge
# Install build dependencies
- conda install cmake -c conda-forge
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ message(STATUS "xwidgets binary version: v${XWIDGETS_BINARY_VERSION}")
find_package(cppzmq 4.3.0 REQUIRED)
find_package(xtl 0.6.5 REQUIRED)
find_package(xeus 0.21.1 REQUIRED)
find_package(xproperty 0.9.0 REQUIRED)
find_package(xproperty 0.10.0 REQUIRED)

# Source files
# ============
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,22 +82,22 @@ http://xwidgets.readthedocs.io/

All the dependencies of xwidgets are available for the conda package manager.

| `xwidgets` | `widgetsnbextension` | `xtl` | `xproperty` | `xeus` | `nlohmann_json` |
|------------|-----------------------|----------------|---------------|-----------------|-----------------|
| master | ^3.0.0 | >=0.6.5,<0.7 | >=0.8.1,<0.9 | >=0.21.1,<0.24 | >=3.6.1,<4.0 |
| 0.19.0 | ^3.0.0 | >=0.6.5,<0.7 | >=0.8.1,<0.9 | >=0.21.1,<0.22 | >=3.6.1,<4.0 |
| 0.18.0 | ^3.0.0 | >=0.6.5,<0.7 | >=0.8.1,<0.9 | >=0.20.0,<0.21 | >=3.6.1,<4.0 |
| 0.17.0 | ^3.0.0 | >=0.6.1,<0.7 | >=0.8.1,<0.9 | >=0.19.1,<0.20 | >=3.5.0,<4.0 |
| 0.16.1 | ^3.0.0 | >=0.5.2,<0.6 | >=0.8.1,<0.9 | >=0.18.1,<0.19 | >=3.3.0,<4.0 |
| 0.16.0 | ^3.0.0 | >=0.5.2,<0.6 | >=0.8.0,<0.9 | >=0.18.1,<0.19 | >=3.3.0,<4.0 |
| 0.15.0 | ^3.0.0 | >=0.5.2,<0.6 | >=0.7.0,<0.8 | >=0.17.0,<0.18 | >=3.3.0,<4.0 |
| 0.14.0 | ^3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.15.0,<0.16 | >=3.3.0,<4.0 |
| 0.13.1 | ^3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.14.1,<0.15 | >=3.1.2,<4.0 |
| 0.13.0 | ^3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.13.0,<0.14 | >=3.1.1,<4.0 |
| 0.12.2 | ~3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.13.0,<0.14 | >=3.1.1,<4.0 |
| 0.12.1 | ~3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.13.0,<0.14 | >=3.1.1,<4.0 |
| 0.12.0 | ~3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.13.0,<0.14 | >=3.1.1,<4.0 |
| 0.11.1 | ~3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.12.0,<0.13 | >=3.1.1,<4.0 |
| `xwidgets` | `widgetsnbextension` | `xtl` | `xproperty` | `xeus` | `nlohmann_json` |
|------------|-----------------------|-----------------|----------------|-----------------|-----------------|
| master | ^3.0.0 | >=0.6.11,<0.7 | >=0.1O.0,<0.11 | >=0.21.1,<0.24 | >=3.6.1,<4.0 |
| 0.19.0 | ^3.0.0 | >=0.6.5,<0.7 | >=0.8.1,<0.9 | >=0.21.1,<0.22 | >=3.6.1,<4.0 |
| 0.18.0 | ^3.0.0 | >=0.6.5,<0.7 | >=0.8.1,<0.9 | >=0.20.0,<0.21 | >=3.6.1,<4.0 |
| 0.17.0 | ^3.0.0 | >=0.6.1,<0.7 | >=0.8.1,<0.9 | >=0.19.1,<0.20 | >=3.5.0,<4.0 |
| 0.16.1 | ^3.0.0 | >=0.5.2,<0.6 | >=0.8.1,<0.9 | >=0.18.1,<0.19 | >=3.3.0,<4.0 |
| 0.16.0 | ^3.0.0 | >=0.5.2,<0.6 | >=0.8.0,<0.9 | >=0.18.1,<0.19 | >=3.3.0,<4.0 |
| 0.15.0 | ^3.0.0 | >=0.5.2,<0.6 | >=0.7.0,<0.8 | >=0.17.0,<0.18 | >=3.3.0,<4.0 |
| 0.14.0 | ^3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.15.0,<0.16 | >=3.3.0,<4.0 |
| 0.13.1 | ^3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.14.1,<0.15 | >=3.1.2,<4.0 |
| 0.13.0 | ^3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.13.0,<0.14 | >=3.1.1,<4.0 |
| 0.12.2 | ~3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.13.0,<0.14 | >=3.1.1,<4.0 |
| 0.12.1 | ~3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.13.0,<0.14 | >=3.1.1,<4.0 |
| 0.12.0 | ~3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.13.0,<0.14 | >=3.1.1,<4.0 |
| 0.11.1 | ~3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.12.0,<0.13 | >=3.1.1,<4.0 |
| 0.11.0 | ~3.0.0 | >=0.4.8,<0.5 | >=0.7.0,<0.8 | >=0.12.0,<0.13 | >=3.1.1,<4.0 |
| 0.10.0 | ~3.0.0 | >=0.4.0,<0.5 | >=0.7.0,<0.8 | >=0.12.0,<0.13 | >=3.1.1,<4.0 |
| 0.9.0 | ~3.0.0 | >=0.4.0,<0.5 | >=0.7.0,<0.8 | >=0.12.0,<0.13 | >=3.1.1,<4.0 |
Expand Down
16 changes: 8 additions & 8 deletions include/xwidgets/xtransport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ namespace xw
void open();
void close();

template <class P>
void notify(const P& property) const;
template <class T>
void notify(const std::string& name, const T& value) const;

private:

Expand Down Expand Up @@ -314,25 +314,25 @@ namespace xw
}

template <class D>
template <class P>
inline void xtransport<D>::notify(const P& property) const
template <class T>
inline void xtransport<D>::notify(const std::string& name, const T& value) const
{
nl::json state;
xeus::buffer_sequence buffers;
xwidgets_serialize(property(), state[property.name()], buffers);
xwidgets_serialize(value, state[name], buffers);

if (m_hold != nullptr)
{
const auto& hold_state = m_hold->content()["data"]["state"];
const auto& hold_buffers = m_hold->buffers();

auto it = hold_state.find(property.name());
auto it = hold_state.find(name);
if (it != hold_state.end())
{
if(same_patch(property.name(),
if(same_patch(name,
*it,
hold_buffers,
state[property.name()],
state[name],
buffers))
{
return;
Expand Down

0 comments on commit 2771063

Please sign in to comment.