Skip to content

Commit

Permalink
Merge pull request #2834 from nicolossus/update_env_yml
Browse files Browse the repository at this point in the history
Organize Python dependencies in separate requirements files
  • Loading branch information
heplesser authored Nov 22, 2023
2 parents 250e4b3 + 9c696f7 commit 39f4e68
Show file tree
Hide file tree
Showing 7 changed files with 169 additions and 77 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ repos:
hooks:
- id: isort
args: ["--profile", "black", "--thirdparty", "nest"]

- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
Expand Down
103 changes: 26 additions & 77 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
# Conda environment specification for NEST Simulator
# Conda environment specification for NEST Simulator.
#
# This file specifies a conda environment for those who would
# like to compile NEST or build NEST documentation themselves.
# If you just want to execute NEST, you should install NEST
# directly as described in https://www.nest-simulator.org/installation.
#
#
# The environment specification below is comprehensive: it includes
# all packages required to build and run NEST with OpenMP and MPI
# parallelisation, GSL-dependent models, NumPy and Pandas-dependent
# parallelization, GSL-dependent models, NumPy and Pandas-dependent
# features of PyNEST and examples requiring Matplotlib, and to run
# the NEST testsuite. It also comprises all tools required to build
# NEST documentation and to run NEST Server. The requirements for the
# documentation and server are marked in separate sections below so
# you can remove them if you would like a leaner environment.
#
# NOTE: Do NOT delete the PIP section at the end of the file. Environment files
# allow just a single PIP section. All dependencies not satisfied by
# conda-forge are placed there.
# NEST documentation and to run NEST Server. The required Python
# packages are divided in separate requirements files and marked in
# separate sections below so you can remove them if you would like a
# leaner environment.
#
# NOTE: libneurosim, MUSIC and SIONLib are not included in this environment.
#
Expand All @@ -31,85 +27,38 @@ channels:
- conda-forge

dependencies:
# Basics ------------------
- python >= 3.8

- python >= 3.10
- pip

# Building NEST -----------
- cmake >= 3.19
- cython
- openmpi
- boost >= 1.69
- gsl >= 1.11
- libtool
- readline
- hdf5
- cppcheck
- doxygen
- graphviz

# Testing NEST ------------
- attrs
- pytest
- pytest-timeout
- pytest-xdist
- pytest-pylint
- pytest-mypy
- pytest-cov
- numpy
- pandas
- scipy
# mpi4py must be installed by conda in order to automatically find the path
# to OpenMPI installed by conda. Note that mpi4py also is included in
# requirements_pynest.txt in case someone wants to build an environment
# without conda. When this conda environment is built, the pip installation
# of mpi4py will be skipped since it is already installed by conda.
- mpi4py
- data-science-types
- h5py
- terminaltables
- pycodestyle
- pydocstyle
- rstcheck
- mypy[version='>=0.8']
- cppcheck

# Working with NEST ------
- ipython
- matplotlib
- jupyter
- jupyterlab
- pip:

# Building NEST documentation
- PyYAML>=4.2b1
- breathe
- csvkit
- docutils
- doxygen
- mock
- nbsphinx
- numpydoc
- path.py
- pydot
- recommonmark
- sphinx >= 4.0.2
- sphinx_rtd_theme
- tqdm
- yamllint
# To build and work with PyNEST
- -r requirements_pynest.txt

# Running NEST Server ----
- flask
- flask_cors
- gunicorn
- requests
- restrictedpython
- werkzeug
# To run NEST testsuite
- -r requirements_testing.txt

# PIP dependencies -- do not delete
- pip:
# For testsuite
- junitparser >= 2
- clang-format == 17.0.4
# For documentation
- example
- Image
- sphinx_autobuild
- sphinx-copybutton
- sphinx_design
- sphinx_gallery
- sphinx-material
- sphinx-tabs
- sphinx-notfound-page
- sphinxcontrib-mermaid
# To build NEST documentation
- -r requirements_docs.txt

# To run NEST Server
- -r requirements_nest_server.txt
28 changes: 28 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Required Python packages for NEST Simulator.
#
# This file specifies the required Python packages for those who would
# like to compile NEST or build NEST documentation themselves.
# If you just want to execute NEST, you should install NEST
# directly as described in https://www.nest-simulator.org/installation.
#
# Note that this file only specifies the required Python packages and
# not the entire software stack needed to build and work with NEST Simulator.
# To create a conda environment with the entire software stack for NEST
# Simulator, use the the environment yaml file.
#
# The requirements from this file can be installed by
#
# pip install -r requirements.txt


# To build and work with PyNEST
-r requirements_pynest.txt

# To run NEST testsuite
-r requirements_testing.txt

# To build NEST documentation
-r requirements_docs.txt

# To run NEST Server
-r requirements_nest_server.txt
35 changes: 35 additions & 0 deletions requirements_docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Required Python packages to build NEST documentation.
#
# This file specifies the required Python packages to build the NEST
# documentation. It is meant for those who would like to compile NEST
# or build NEST documentation themselves. If you just want to execute
# NEST, you should install NEST directly as described in
# https://www.nest-simulator.org/installation.
#
# The listed requirements are used to build the conda environment defined
# in the environment yaml file. If you want to build an environment
# yourself, e.g., independent of conda, the requirements from this file
# can be installed by
#
# pip install -r requirements_docs.txt

sphinx >= 4.0.2
sphinx_rtd_theme
sphinx_autobuild
sphinx_gallery
sphinx-tabs
sphinx_design
sphinx-material
sphinx-copybutton
sphinx-notfound-page
sphinxcontrib-mermaid
nbsphinx
numpydoc
example
Image
breathe
csvkit
docutils
PyYAML >= 4.2b1
tqdm
yamllint
20 changes: 20 additions & 0 deletions requirements_nest_server.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Required Python packages to run NEST Server.
#
# This file specifies the required Python packages to run NEST Server.
# It is meant for those who would like to compile NEST or build NEST
# documentation themselves. If you just want to execute NEST, you should
# install NEST directly as described in
# https://www.nest-simulator.org/installation.
#
# The listed requirements are used to build the conda environment defined
# in the environment yaml file. If you want to build an environment
# yourself, e.g., independent of conda, the requirements from this file
# can be installed by
#
# pip install -r requirements_nest_server.txt

Flask
flask-cors
gunicorn
requests
RestrictedPython
29 changes: 29 additions & 0 deletions requirements_pynest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Required Python packages to build and work with PyNEST.
#
# This file specifies the required Python packages to build and work
# with PyNEST. It is meant for those who would like to compile NEST
# or build NEST documentation themselves. If you just want to execute
# NEST, you should install NEST directly as described in
# https://www.nest-simulator.org/installation.
#
# The listed requirements are used to build the conda environment defined
# in the environment yaml file. If you want to build an environment
# yourself, e.g., independent of conda, the requirements from this file
# can be installed by
#
# pip install -r requirements_pynest.txt

cython
numpy
pandas
scipy
matplotlib
mpi4py
h5py
black
pre-commit
isort
notebook
jupyterlab
csa
pydot
30 changes: 30 additions & 0 deletions requirements_testing.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Required Python packages to run the NEST testsuite.
#
# This file specifies the required Python packages to run the NEST
# testsuite. It is meant for those who would like to compile NEST
# or build NEST documentation themselves. If you just want to execute
# NEST, you should install NEST directly as described in
# https://www.nest-simulator.org/installation.
#
# The listed requirements are used to build the conda environment defined
# in the environment yaml file. If you want to build an environment
# yourself, e.g., independent of conda, the requirements from this file
# can be installed by
#
# pip install -r requirements_testing.txt

pytest
pytest-timeout
pytest-xdist
pytest-pylint
pytest-mypy
pytest-cov
data-science-types
terminaltables
pycodestyle
pydocstyle
rstcheck
mypy >= 0.8
junitparser >= 2
clang-format == 17.0.4
attrs

0 comments on commit 39f4e68

Please sign in to comment.