Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating xeus #143

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ dependencies:
- cxx-compiler
# Host dependencies
- nlohmann_json
- xtl
- cppzmq
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one can be removed too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which one? xtl is beeing removed

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Johan means that cppzmq can be removed too

- xeus-zmq=1.1.1
- xeus>=5.0.0,<=6.0
- xeus-zmq>=3.0.0,<=4.0
- sqlite
- sqlitecpp
- cpp-tabulate=1.5
- xvega=0.0.10
- xproperty=0.11.0
- xvega-bindings=0.0.10
- xvega>=0.1.0
- xproperty>=0.12.0
- xvega-bindings>=0.1.0
# Test dependencies
- pytest
- jupyter_kernel_test
11 changes: 5 additions & 6 deletions include/xeus-sqlite/xeus_sqlite_interpreter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ namespace xeus_sqlite
std::string m_db_path;

void configure_impl() override;
nl::json execute_request_impl(int execution_counter,
const std::string& code,
bool silent,
bool store_history,
nl::json user_expressions,
bool allow_stdin) override;
void execute_request_impl(send_reply_callback cb,
int execution_counter,
const std::string& code,
xeus::execute_request_config config,
nl::json user_expressions) override;
nl::json complete_request_impl(const std::string& code,
int cursor_pos) override;
nl::json inspect_request_impl(const std::string& code,
Expand Down
6 changes: 4 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

#include "xeus/xkernel.hpp"
#include "xeus/xkernel_configuration.hpp"
#include "xeus-zmq/xserver_shell_main.hpp"

#include "xeus-zmq/xserver_zmq_split.hpp"
#include "xeus-zmq/xzmq_context.hpp"

#include "xeus-sqlite/xeus_sqlite_interpreter.hpp"
#include "xeus-sqlite/xeus_sqlite_config.hpp"
Expand Down Expand Up @@ -97,7 +99,7 @@ int main(int argc, char* argv[])
// Load configuration file
std::string file_name = extract_filename(argc, argv);

auto context = xeus::make_context<zmq::context_t>();
std::unique_ptr<xeus::xcontext> context = xeus::make_zmq_context();

// Create interpreter instance
using interpreter_ptr = std::unique_ptr<xeus_sqlite::interpreter>;
Expand Down
13 changes: 6 additions & 7 deletions src/xeus_sqlite_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,11 @@ namespace xeus_sqlite
}
}

nl::json interpreter::execute_request_impl(int execution_counter,
const std::string& code,
bool /*silent*/,
bool /*store_history*/,
nl::json /*user_expressions*/,
bool /*allow_stdin*/)
void interpreter::execute_request_impl(send_reply_callback cb,
int execution_counter,
const std::string& code,
xeus::execute_request_config /*config*/,
nl::json /*user_expressions*/)
{
std::vector<std::string> traceback;
nl::json jresult;
Expand Down Expand Up @@ -446,7 +445,7 @@ namespace xeus_sqlite
publish_execution_error(jresult["ename"], jresult["evalue"], traceback);
traceback.clear();
}
return jresult;
cb(jresult);
}

nl::json interpreter::complete_request_impl(const std::string& raw_code,
Expand Down