In this page you will find instructions on how to create a development environment and how to test your changes.
How to create a development environment#
Create a conda environment with
mamba env create --file environment.yml
conda if you don’t have
mamba) or update it with
mamba env update --file environment.yml
Then, activate that environment with
conda activate itables
Install the pre-commit hooks with
and finally, install the development version of
pip install -e .
How to run the Python test suite#
The Python code can be tested with just
pytest test suite is not enough to guaranty that a change won’t
itables. You also need to test that the tables are well rendered in the
different contexts like Jupyter Book, Jupyter Lab, VS Code.
itables documentation uses Jupyter Book.
To build the documentation locally,
you need to create a Jupyter kernel named
python -m ipykernel install --name itables --user
Then you can build the documentation with
jupyter-book build docs
This will give you a link to a local version of the documentation.
If you make any significant change then you should go through the updated documentation and make sure all the examples still work properly.
itables conda environment, you can start Jupyter with
You should test at least this code snippet:
from itables import init_notebook_mode from itables.sample_dfs import get_countries # try both connected=False (the default) and connected=True init_notebook_mode(all_interactive=True, connected=False) get_countries()
You can do this using for instance the notebook at
Note that you can also open the documentation in Jupyter:
go to the
docs folder and open e.g.
as a notebook (using a right click).
Other notebook editors#
For the online editors like Google Colab, you might have to install your development version there with e.g.
!pip uninstall itables -y !pip install git+https://github.com/mwouts/itables.git@branch