Skip to content
Merged
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: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ micromamba activate xeus-cpp
You are now in a position to install xeus-cpp into this envirnoment. You can do this by executing

```bash
mkdir build && cd build
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_PREFIX_PATH=$CONDA_PREFIX -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX -D CMAKE_INSTALL_LIBDIR=lib ..
make install
make
```

To check that everything is installed correctly you can run the c++ tests by executing the following
Expand All @@ -56,3 +57,8 @@ and the python tests by executing
cd ./test
pytest -sv .
```
Once the build is passing all the tests you can install it by executing the following from the test folder
```bash
cd ..
make install
```
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
`xeus-cpp` is a Jupyter kernel for cpp based on the native implementation of the
Jupyter protocol [xeus](https://github.com/jupyter-xeus/xeus).

## Installation within a mamba envirnoment
## Installation within a mamba envirnoment (non wasm build instructions)

To ensure that the installation works, it is preferable to install `xeus-cpp` in a
fresh environment. It is also needed to use a
Expand All @@ -40,9 +40,24 @@ mamba install notebook cmake cxx-compiler xeus-zmq nlohmann_json=3.11.2 cppzmq x
```
Now you can compile the kernel from the source by executing (replace `$CONDA_PREFIX` with a custom installation prefix if need be)
```bash
mkdir build && cd build
mkdir build
cd build
cmake .. -D CMAKE_PREFIX_PATH=$CONDA_PREFIX -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX -D CMAKE_INSTALL_LIBDIR=lib
make && make install
make
```
To test the build you execute the following to test the C++ tests
```bash
cd test
./test_xeus_cpp
```
and
```bash
pytest -sv .
```
to perform the python tests. Once the build is passing all the tests you can install it by executing the following from the test folder
```bash
cd ..
make install
```

## Trying it online
Expand Down
7 changes: 5 additions & 2 deletions docs/source/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ These steps are performed using the GNU Debugger (GDB), so ensure it is installe

.. code-block:: bash

cmake -D CMAKE_BUILD_TYPE=Debug ..
cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_PREFIX_PATH=$CONDA_PREFIX -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX -D CMAKE_INSTALL_LIBDIR=lib ..

In the same folder, run the command and copy the JSON displayed in the terminal.

Expand All @@ -32,4 +32,7 @@ Open a new terminal, navigate to the build directory, and run GDB to start debug
Testing
========================

The testing code for the source files is located in `test/test_interpreter.cpp`. Write the necessary tests and build the project as described in the repository's README or contributing guidelines. Then, execute `build/test/test_xeus_cpp` to verify if the tests were successful.
The source code for the c++ tests is located in `test/test_interpreter.cpp`. The source code for the python tests is located in `test/test_xcpp_kernel.py`.
Write the necessary tests and build the project as described in the repository's README or contributing guidelines.
Then, execute `build/test/test_xeus_cpp` from the top level directory to verify if the c++ tests were successful,
and `pytest -sv build/test/test_xcpp_kernel.py` to execute the python tests.