Skip to content

Commit

Permalink
Add all deps to the conda-forge environment and suppress installing a…
Browse files Browse the repository at this point in the history
…nd reinstalling deps with pip at readthedocs builds (#1786)
  • Loading branch information
valeriupredoi authored Nov 16, 2022
1 parent 113bbc3 commit 89fbe93
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 16 deletions.
10 changes: 3 additions & 7 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,15 @@ build:
os: ubuntu-22.04
tools:
python: "mambaforge-4.10"
jobs:
post_create_environment:
- pip install . --no-deps

# Declare the requirements required to build your docs
conda:
environment:
environment.yml

python:
install:
- method: pip
path: .
extra_requirements:
- doc

# Build documentation in the doc directory with Sphinx
sphinx:
configuration: doc/conf.py
Expand Down
6 changes: 3 additions & 3 deletions doc/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -635,13 +635,13 @@ When adding or removing dependencies, please consider applying the changes in
the following files:

- ``environment.yml``
contains development dependencies that cannot be installed from
`PyPI <https://pypi.org/>`_
contains all the development dependencies; these are all from
`conda-forge <https://conda-forge.org/>`_
- ``setup.py``
contains all Python dependencies, regardless of their installation source

Note that packages may have a different name on
`conda-forge <https://conda-forge.org/>`__ than on PyPI_.
`conda-forge <https://conda-forge.org/>`__ than on `PyPI <https://pypi.org/>`_.

Several test jobs on CircleCI_ related to the installation of the tool will only
run if you change the dependencies.
Expand Down
51 changes: 47 additions & 4 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,67 @@
name: esmvaltool
channels:
- conda-forge
- nodefaults

dependencies:
- cartopy
- cf-units>=3.0.0,<3.1.0 # github.com/ESMValGroup/ESMValCore/issues/1655
- cftime
- dask
- compilers
# 1.8.18/py39, they seem weary to build manylinux wheels
# and pypi ver built with older gdal
- fiona
- esgf-pyclient>=0.3.1
- esmpy!=8.1.0 # see github.com/ESMValGroup/ESMValCore/issues/1208
- fiona
- fire
- geopy
- humanfriendly
- importlib_resources
- iris>=3.2.1
- mypy>=0.990
- isodate
- jinja2
- nc-time-axis
- nested-lookup
- netcdf4!=1.6.1 # github.com/ESMValGroup/ESMValCore/issues/1723
- numpy
- pandas
- pillow
- pip!=21.3
- prov
- psutil
- pybtex
- python>=3.8
- python-stratify
- pyyaml
- requests
- scipy>=1.6
- shapely
- yamale
# Python packages needed for building docs
- autodocsumm>=0.2.2
- sphinx>=5
- sphinx_rtd_theme
# Python packages needed for testing
- flake8<5.0 # github.com/ESMValGroup/ESMValCore/issues/1696
- mypy>=0.990
- pytest>=3.9,!=6.0.0rc1,!=6.0.0
- pytest-cov>=2.10.1
- pytest-env
- pytest-html!=2.1.0
- pytest-metadata>=1.5.1
- pytest-mypy
- pytest-mock
- pytest-xdist
# Not on conda-forge - ESMValTool_sample_data==0.0.3
# Still for testing, MyPy library stubs
- types-requests
- types-pkg_resources
- types-PyYAML
# Python packages needed for installing in development mode
- codespell
- docformatter
- isort
- pre-commit
- prospector!=1.1.6.3,!=1.1.6.4
# Not on conda forge - vprof
- yamllint
- yapf
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
],
# Documentation dependencies
'doc': [
'autodocsumm',
'sphinx>2',
'autodocsumm>=0.2.2',
'sphinx>5',
'sphinx_rtd_theme',
],
# Development dependencies
Expand Down

0 comments on commit 89fbe93

Please sign in to comment.