Skip to content
Merged
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
40 changes: 23 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,42 @@ minutes of past meetings can be found on our

## Setting up a development environment

First, you need to fork the project. Then setup your environment:
First, you need to fork the project. After you have done this clone your forked repo. You can do this by
executing the folowing

```bash
# create a new conda environment
conda env create -f environment-dev.yml
conda activate xeus-cpp

# download xeus-cpp from your GitHub fork
git clone https://github.com/<your-github-username>/xeus-cpp.git
```

You may also want to install a C++ compiler, and cmake from conda if they are not
available on your system.
To ensure that the installation works, it is preferable to install xeus-cpp in a fresh environment. It is
also needed to use a miniforge or miniconda installation because with the full anaconda you may have a
conflict with the zeromq library which is already installed in the anaconda distribution. Once you have miniforge
or miniconda installed cd into the xeus-cpp directory and set setup your environment:

```bash
cd xeus-cpp
micromamba create -n xeus-cpp environment-dev.yml
micromamba activate xeus-cpp
```

## Building and installing xeus-cpp
You are now in a position to install xeus-cpp into this envirnoment. You can do this by executing

```bash
# Create a directory for building
mkdir build && cd build
# Generate the makefile with cmake
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_PREFIX_PATH=$CONDA_PREFIX -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX -D CMAKE_INSTALL_LIBDIR=lib ..
# Build and install
make install -j2
make install
```

## Running the tests
To check that everything is installed correctly you can run the c++ tests by executing the following

```bash
cd ./test
./test_xeus_cpp
```

To run Python tests, from the build directory, type
and the python tests by executing

```bash
cd ../test
pytest . -vvv
cd ./test
pytest -sv .
```