Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/cache_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ jobs:
# Install GMT and other required dependencies from conda-forge
- name: Install dependencies
run: |
mamba install gmt=6.3.0 \
numpy pandas xarray netCDF4 packaging matplotlib
mamba install gmt=6.3.0 numpy pandas xarray netCDF4 packaging \
build matplotlib
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit unrelated, but why is matplotlib needed in the cache_data workflow? Isn't this GitHub Actions workflow just used to download files?

I see that the matplotlib dependency was added at 270e3ea in #1310, but can't see exactly why this is needed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from matplotlib.testing.compare import compare_images

matplotlib is imported in testing.py so when we run the download_test_data function, matplotlib must be imported.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok. Seems like that import line could just be put inside the check_figures_equal function, but let's just keep things the way it is right now.


# Install the package that we want to test
- name: Install the package
run: |
python setup.py sdist --formats=zip
python -m build --sdist
pip install dist/*

# Download remote files
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Install dependencies
run: |
mamba install gmt=6.3.0 numpy pandas xarray netCDF4 packaging \
ipython make myst-parser geopandas \
build ipython make myst-parser geopandas \
sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme

# Show installed pkg information for postmortem diagnostic
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
# Install the package that we want to test
- name: Install the package
run: |
python setup.py sdist --formats=zip
python -m build --sdist
pip install dist/*

# Build the documentation
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
mamba install gmt=6.3.0 numpy=${{ matrix.numpy-version }} \
pandas xarray netCDF4 packaging \
${{ matrix.optional-packages }} \
dvc make pytest>=6.0 \
build dvc make pytest>=6.0 \
pytest-cov pytest-doctestplus pytest-mpl sphinx-gallery tomli

# Show installed pkg information for postmortem diagnostic
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
# Install the package that we want to test
- name: Install the package
run: |
python setup.py sdist --formats=zip
python -m build --sdist
pip install dist/*

# Run the tests
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
geopandas ghostscript libnetcdf hdf5 zlib curl pcre make
pip install --pre --prefer-binary \
numpy pandas xarray netCDF4 packaging \
dvc ipython 'pytest>=6.0' pytest-cov \
build dvc ipython 'pytest>=6.0' pytest-cov \
pytest-doctestplus pytest-mpl sphinx-gallery tomli

# Pull baseline image data from dvc remote (DAGsHub)
Expand Down Expand Up @@ -131,11 +131,10 @@ jobs:
touch ~/.gmt/server/gmt_data_server.txt ~/.gmt/server/gmt_hash_server.txt
ls -lhR ~/.gmt


# Install the package that we want to test
- name: Install the package
run: |
python setup.py sdist --formats=zip
python -m build --sdist
pip install dist/*

- name: Add GMT's bin to PATH (Linux/macOS)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
python-version: '3.10'

- name: Install dependencies
run: python -m pip install setuptools wheel
run: python -m pip install build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, and just noting that we should double check that the wheel and source files on TestPyPI look ok once this PR is merged.


# This step is only necessary for testing purposes and for TestPyPI
- name: Fix up version string for TestPyPI
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ install:
pip install --no-deps -e .

package:
python setup.py sdist bdist_wheel
python -m build --sdist --wheel

test:
# Run a tmp folder to make sure the tests are run on the installed version
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies:
# Optional dependencies
- geopandas
# Development dependencies (general)
- build
- dvc
- ipython
- jupyter
Expand Down