Skip to content

Commit

Permalink
reqs: Move pyrevolve to optionals and introduce testing-only reqs
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Mar 30, 2023
1 parent d0e705d commit e7a10ca
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest-core-mpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: |
sudo apt-get update && sudo apt install mpich -y
pip3 install --upgrade pip
pip3 install -e .[extras,mpi]
pip3 install -e .[extras,mpi,testd]
- name: Test with pytest
run: |
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.devito
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN python3 -m venv /venv && \
/venv/bin/pip install --no-cache-dir --upgrade pip && \
/venv/bin/pip install --no-cache-dir jupyter && \
/venv/bin/pip install --no-cache-dir wheel && \
/venv/bin/pip install --no-cache-dir -e /app/devito[extras,mpi] && \
/venv/bin/pip install --no-cache-dir -e /app/devito[extras,mpi,testd] && \
rm -rf ~/.cache/pip

# Safety cleanup
Expand Down
9 changes: 5 additions & 4 deletions docs/source/download.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ To install the `latest Devito release`_ along with any additional dependencies,
pip install devito
# ...or to install additional dependencies:
# pip install devito[extras,mpi,nvidia]
# pip install devito[extras,mpi,nvidia,testd]
.. _latest Devito release: https://pypi.org/project/devito/#history

Expand All @@ -55,11 +55,12 @@ To install the latest Devito development version, without the tutorials, follow:
pip install git+https://github.com/devitocodes/devito.git
# ...or to install additional dependencies:
# pip install git+https://github.com/devitocodes/devito.git#egg=project[extras,mpi,nvidia]
# pip install git+https://github.com/devitocodes/devito.git#egg=project[extras,mpi,nvidia,testd]
Additional dependencies:

- extras : optional dependencies for Jupyter notebooks, plotting, benchmarking
- testd : optional dependencies required for testing infrastructure
- mpi : optional dependencies for MPI (mpi4py)
- nvidia : optional dependencies for targetting GPU deployment

Expand Down Expand Up @@ -98,7 +99,7 @@ and finally, install Devito along with any extra dependencies:
pip install devito
# ... or to install additional dependencies
# pip install devito[extras,mpi,nvidia]
# pip install devito[extras,mpi,nvidia,testd]
For developers
Expand All @@ -117,7 +118,7 @@ and then install the requirements in your virtual environment (venv or conda):
# Install requirements
pip install -e .
# ...or to install additional dependencies
# pip install -e .[extras,mpi,nvidia]
# pip install -e .[extras,mpi,nvidia,testd]
Facing issues?
Expand Down
1 change: 1 addition & 0 deletions requirements-optional.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
matplotlib
pandas
pyrevolve
3 changes: 3 additions & 0 deletions requirements-testing.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
codecov
pytest-runner
pytest-cov
4 changes: 0 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ py-cpuinfo<10
cgen>=2020.1
codepy>=2019.1
click<9.0
codecov
multidict
anytree>=2.4.3,<=2.8
pyrevolve>=2.1.3
distributed<2023.4
pytest>=7.2,<8.0
pytest-runner
pytest-cov
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
with open('requirements-optional.txt') as f:
optionals = f.read().splitlines()

with open('requirements-testing.txt') as f:
testing = f.read().splitlines()

with open('requirements-mpi.txt') as f:
mpis = f.read().splitlines()

Expand All @@ -24,7 +27,8 @@
reqs += [ir]

extras_require = {}
for mreqs, mode in zip([optionals, mpis, nvidias], ['extras', 'mpi', 'nvidia']):
for mreqs, mode in (zip([optionals, mpis, nvidias, testing],
['extras', 'mpi', 'nvidia', 'testd'])):
opt_reqs = []
for ir in mreqs:
# For conditionals like pytest=2.1; python == 3.6
Expand Down

0 comments on commit e7a10ca

Please sign in to comment.