Skip to content

Python FAQ

Sylwester Arabas edited this page May 24, 2023 · 5 revisions

How to trigger exceptions on each Python warning?

Use python -We wherever you'd normally use just python (similarily pytest -We).

How to install both XXX and XXX-examples locally so that each project see changes drafted in the other one?

pip install -e XXX
pip install -e XXX-examples

(the -e option is crucial as it makes pip merely link to the code directory instead of copying files to a local package dir)

Why the notebooks are not included in examples packages

Jupyter writes to ipynb files which would modify package files and leave traces of previous executions.

Why do we package examples on PyPI (even though the notebooks are not part of the wheels)?

First, we need it for smoke tests. Second, we need it for running example notebooks on Colab where no cloning of the repo is done (just the notebook is retrieved from the repo by Colab).

Clone this wiki locally