diff --git a/.github/workflows/tests+pypi.yml b/.github/workflows/tests+pypi.yml index 97b98788..63505ea7 100644 --- a/.github/workflows/tests+pypi.yml +++ b/.github/workflows/tests+pypi.yml @@ -202,10 +202,13 @@ jobs: python -m pytest --durations=10 -v -s -We -p no:unraisableexception . cd .. + - env: + SYSTEM_VERSION_COMPAT: 0 + run: | + for i in dist/*.whl; do python -m pip install $PIP_INSTALL_OPTS $i[examples]; done; + - run: | python -m pip install $PIP_INSTALL_OPTS -r gitmodules/devops_tests/requirements.txt - ex -sc 'g/^PyPartMC/d' -cx .binder/requirements.txt - python -m pip install $PIP_INSTALL_OPTS -r .binder/requirements.txt GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} python -m pytest --durations=10 -v -s -We -p no:unraisableexception gitmodules/devops_tests ## uncomment to gain ssh access in case of failure diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 408458d7..d8f2cbff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,7 +61,7 @@ flowchart TD ```sh git clone --recursive git+https://github.com/open-atmos/PyPartMC.git cd PyPartMC -DEBUG=1 VERBOSE=1 pip --verbose install -e . +DEBUG=1 VERBOSE=1 pip --verbose install -e .[tests] gdb python (gdb) run -m pytest -s -vv -We -p no:unraisableexception tests ``` diff --git a/README.md b/README.md index f4707fd7..461032e0 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,11 @@ import PyPartMC #### Jupyter notebooks with examples Note: clicking the badges below redirects to cloud-computing platforms. The mybinder.org links allow anonymous execution, Google Colab requires logging in with a Google account, ARM JupyerHub requires logging in with an ARM account (and directing Jupyter to a particular notebook within the `examples` folder). +The example notebooks feature additional dependencies that can be installed with: +```bash +pip install PyPartMC[examples] +``` + - Urban plume scenario demo (as in [PartMC](https://github.com/compdyn/partmc/tree/master/scenarios/1_urban_plume)): [![View notebook](https://img.shields.io/static/v1?label=render%20on&logo=github&color=87ce3e&message=GitHub)](https://github.com/open-atmos/PyPartMC/blob/main/examples/particle_simulation.ipynb) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/open-atmos/PyPartMC/blob/main/examples/particle_simulation.ipynb) diff --git a/setup.py b/setup.py index 1816070a..49387d5f 100644 --- a/setup.py +++ b/setup.py @@ -153,6 +153,15 @@ def build_extension(self, ext): # pylint: disable=too-many-branches "fastcore!=1.5.8", # https://github.com/fastai/fastcore/issues/439 "ghapi", "scipy", - ] + ], + "examples": [ + "matplotlib!=3.10.0", + "ipywidgets", + "voila", + "open-atmos-jupyter-utils", + "PySDM", + "PyMieScatt@git+https://github.com/bsumlin/PyMieScatt.git", + "SciPy", + ], }, )