Skip to content

Commit

Permalink
Merge pull request #1842 from dopplershift/ci-fixes
Browse files Browse the repository at this point in the history
Reduce duplication in minimum dependencies
  • Loading branch information
dcamron committed May 3, 2021
2 parents fee4d78 + 18aad37 commit 9a8ba2f
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 38 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/docs-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ jobs:
# Needed for caching
use-only-tar-bz2: true

# TODO: Remove this when scipy>1.5.3 is available on conda-forge
- name: Adjust scipy dependency for Conda
run: sed -e "s/scipy==.*/scipy==1.5.3/" -i.bak ci/requirements.txt

- name: Install dependencies
run: conda install --quiet --yes --file ci/doc_requirements.txt --file ci/extra_requirements.txt --file ci/requirements.txt

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
# branch that's not main (which is confined to n.nn.x above) or on a tag.
- name: Set doc version
if: ${{ github.event_name != 'push' || !contains(github.ref, 'main') }}
run: echo "DOC_VERSION=v$(python -c 'import metpy; print(metpy.__version__.rsplit(".", maxsplit=2)[0])')" >> $GITHUB_ENV
run: echo "DOC_VERSION=v$(python -c 'import metpy,re; print(re.search(r"(\d+\.\d+)", metpy.__version__)[0])')" >> $GITHUB_ENV

- name: Upload to GitHub Pages
if: ${{ github.event_name != 'pull_request' && matrix.experimental == false && matrix.python-version == '3.9' }}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/tests-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ jobs:
# Needed for caching
use-only-tar-bz2: true

# TODO: Remove this when scipy>1.5.3 is available on conda-forge
- name: Adjust scipy dependency for Conda
run: sed -e "s/scipy==.*/scipy==1.5.3/" -i.bak ci/requirements.txt

- name: Install dependencies
run: conda install --quiet --yes --file ci/test_requirements.txt --file ci/extra_requirements.txt --file ci/requirements.txt

Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/tests-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,25 @@ jobs:
if: ${{ matrix.no-extras != 'No Extras' }}
run: cat ci/extra_requirements.txt >> ci/test_requirements.txt

- name: Generate minimum dependencies
if: ${{ matrix.dep-versions == 'Minimum' }}
run: |
python << EOF
import configparser
from pathlib import Path
# Read our setup.cfg
config = configparser.ConfigParser()
config.read('setup.cfg')
# Generate a Minimum dependency file
with (Path('ci') / 'Minimum').open('wt') as out:
for dep in config['options']['install_requires'].split('\n'):
if dep:
dep = dep.split(';')[0]
out.write(dep.replace('>=', '==') + '\n')
EOF
- name: Add git versions to requirements
if: ${{ matrix.dep-versions == 'Prerelease' }}
run: |
Expand Down
11 changes: 0 additions & 11 deletions ci/Minimum

This file was deleted.

2 changes: 1 addition & 1 deletion ci/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ pandas==1.1.5
pooch==1.3.0
pint==0.17
pyproj==2.6.1.post1
scipy==1.5.4
scipy==1.6.3
traitlets==5.0.5
xarray==0.16.2
4 changes: 2 additions & 2 deletions docs/api/references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ References
.. [CODATA2018] Tiesinga, Eite, Peter J. Mohr, David B. Newell, and Barry N. Taylor, 2020:
The 2018 CODATA Recommended Values of the Fundamental Physical Constants
(Web Version 8.1). Database developed by J. Baker, M. Douma, and S. Kotochigova.
Available at http://physics.nist.gov/constants, National Institute of Standards
and Technology, Gaithersburg, MD 20899.
Available at https://physics.nist.gov/cuu/Constants/index.html,
National Institute of Standards and Technology, Gaithersburg, MD 20899.
.. [Cressman1959] Cressman, G. P., 1959: An operational objective analysis system. *Mon.
Wea. Rev.*, **87**, 367-374,
Expand Down
6 changes: 3 additions & 3 deletions docs/devel/infrastructureguide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Documentation

MetPy's documentation is built using sphinx >= 2.1. API documentation is automatically
generated from docstrings, written using the
`NumPy docstring standard <https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt>`_.
`NumPy docstring standard <https://github.com/numpy/numpy/blob/main/doc/HOWTO_DOCUMENT.rst.txt>`_.
There are also example scripts in the ``examples`` directory, as well as our
:doc:`/userguide/index` tutorials in the ``tutorials``. Using the ``sphinx-gallery``
extension, these scripts are executed and turned into a gallery of thumbnails. The
Expand Down Expand Up @@ -61,7 +61,7 @@ Test coverage is monitored by `codecov.io <https://codecov.io/github/Unidata/Met

The following services are used to track code quality:

* `Codacy <https://app.codacy.com/project/Unidata/MetPy/dashboard>`_
* `Codacy <https://app.codacy.com/manual/Unidata/MetPy/dashboard>`_
* `Code Climate <https://codeclimate.com/github/Unidata/MetPy>`_

We also maintain custom GitHub actions that automate additional tasks. Besides what's
Expand All @@ -75,7 +75,7 @@ using the GitHub API. For more information see:
doing GitHub API work in javascript
* `github-script action repo <https://github.com/actions/github-script>`_ which is the action
that simplifies writing custom scripting
* `GitHub Actions Docs <https://docs.github.com/en/free-pro-team@latest/actions>`_ for all
* `GitHub Actions Docs <https://docs.github.com/en/actions>`_ for all
other things relating to GitHub Actions, like available events and workflow syntax

---------
Expand Down
12 changes: 3 additions & 9 deletions docs/userguide/installguide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,9 @@ In general, MetPy tries to support minor versions of dependencies released withi
years. For Python itself, that generally means supporting the last two minor releases; MetPy
currently supports Python >= 3.7.

* matplotlib >= 3.0.1
* numpy >= 1.16.0
* pandas >= 0.24.0
* pint >= 0.10.1
* pooch >= 0.1
* pyproj >= 2.3.0
* scipy >= 1.2.0
* traitlets >= 4.3.0
* xarray >= 0.14.1
.. literalinclude:: ../../setup.cfg
:start-after: importlib_resources
:end-at: xarray

------------
Installation
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ python_requires = >=3.7
install_requires =
importlib_metadata>=1.0.0; python_version < '3.8'
importlib_resources>=1.3.0; python_version < '3.9'
matplotlib>=2.1.0
matplotlib>=3.0.1
numpy>=1.16.0
pandas>=0.22.0
pandas>=0.24.0
pint>=0.10.1
pooch>=0.1
pyproj>=2.3.0
scipy>=1.0
scipy>=1.2.0
traitlets>=4.3.0
xarray>=0.14.1

Expand Down

0 comments on commit 9a8ba2f

Please sign in to comment.