Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.11 and update dependencies #411

Closed
wants to merge 4 commits into from
Closed
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
12 changes: 6 additions & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
env:
REQUIREMENTS: env/requirements-build.txt env/requirements-docs.txt
PYTHON: 3.9
PYTHON: 3.11

steps:
# Cancel any previous run of the test job
@@ -46,7 +46,7 @@ jobs:

# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Need to fetch more than the last commit so that setuptools-scm can
# create the correct version string. If the number of commits since
@@ -117,7 +117,7 @@ jobs:
# Store the docs as a build artifact so we can deploy it later
- name: Upload HTML documentation as an artifact
if: github.event_name == 'release' || github.event_name == 'push'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: docs-${{ github.sha }}
path: doc/_build/html
@@ -131,17 +131,17 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

# Fetch the built docs from the "build" job
- name: Download HTML documentation artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: docs-${{ github.sha }}
path: doc/_build/html

- name: Checkout the gh-pages branch in a separate folder
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
uses: actions/checkout@v3
with:
ref: gh-pages
# Checkout to this folder instead of the current one
16 changes: 8 additions & 8 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Need to fetch more than the last commit so that setuptools_scm can
# create the correct version string. If the number of commits since
@@ -49,9 +49,9 @@ jobs:
run: git fetch origin 'refs/tags/*:refs/tags/*'

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"

- name: Install requirements
run: python -m pip install -r env/requirements-build.txt
@@ -81,7 +81,7 @@ jobs:
- name: Upload archives as artifacts
# Only if not a pull request
if: success() && github.event_name != 'pull_request'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pypi-${{ github.sha }}
path: dist
@@ -96,23 +96,23 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# The GitHub token is preserved by default but this job doesn't need
# to be able to push to GitHub.
persist-credentials: false

# Fetch the built archives from the "build" job
- name: Download built archives artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: pypi-${{ github.sha }}
path: dist

- name: Publish to Test PyPI
# Only publish to TestPyPI when a PR is merged (pushed to main)
if: success() && github.event_name == 'push'
uses: pypa/gh-action-pypi-publish@bce3b74dbf8cc32833ffba9d15f83425c1a736e0
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN}}
@@ -124,7 +124,7 @@ jobs:
- name: Publish to PyPI
# Only publish to PyPI when a release triggers the build
if: success() && github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@bce3b74dbf8cc32833ffba9d15f83425c1a736e0
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN}}
12 changes: 6 additions & 6 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -20,14 +20,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"

- name: Install requirements
run: python -m pip install -r env/requirements-style.txt
@@ -42,14 +42,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"

- name: Install requirements
run: python -m pip install -r env/requirements-style.txt
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -47,11 +47,11 @@ jobs:
- optional
include:
- dependencies: oldest
python: "3.7"
python: "3.9"
- dependencies: latest
python: "3.10"
python: "3.11"
- dependencies: optional
python: "3.10"
python: "3.11"
env:
REQUIREMENTS: env/requirements-build.txt env/requirements-test.txt
# Used to tag codecov submissions
@@ -70,7 +70,7 @@ jobs:

# Checks-out your repository under $GITHUB_WORKSPACE
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Need to fetch more than the last commit so that setuptools-scm can
# create the correct version string. If the number of commits since
Binary file added doc/_static/verde-title.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions doc/_static/verde-title.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -42,14 +42,14 @@
# functions/classes
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"numpy": ("https://docs.scipy.org/doc/numpy/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
"sklearn": ("https://scikit-learn.org/stable/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"xarray": ("https://xarray.pydata.org/en/stable/", None),
"xarray": ("https://docs.xarray.dev/en/stable/", None),
"cartopy": ("https://scitools.org.uk/cartopy/docs/latest/", None),
"pooch": ("https://www.fatiando.org/pooch/latest/", None),
"matplotlib": ("https://matplotlib.org/", None),
"matplotlib": ("https://matplotlib.org/stable/", None),
"dask": ("https://docs.dask.org/en/latest/", None),
"pygmt": ("https://www.pygmt.org/latest/", None),
}
@@ -96,13 +96,13 @@
# Insert links to documentation of objects in the examples
"reference_url": {"verde": None},
# Use the PyGMT image scraper
"image_scrapers": ("matplotlib", pygmt.sphinx_gallery.PyGMTScraper()),
"image_scrapers": (pygmt.sphinx_gallery.PyGMTScraper(), "matplotlib"),
}

# HTML output configuration
# -----------------------------------------------------------------------------
html_title = f'{project} <span class="project-version">{version}</span>'
html_logo = "_static/verde-logo.png"
# html_logo = "_static/verde-logo.png"
html_favicon = "_static/favicon.png"
html_last_updated_fmt = "%b %d, %Y"
html_copy_source = True
16 changes: 8 additions & 8 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -5,6 +5,13 @@
:margin: 5 5 0 0
:padding: 0 0 0 0

.. grid-item::
:columns: 12 4 12 4

.. image:: ./_static/verde-logo.png
:width: 200px
:class: sd-m-auto dark-light

.. grid-item::
:columns: 12 8 12 8

@@ -16,19 +23,12 @@

.. raw:: html

<h1 class="display-1"><img src="_static/verde-title.svg" alt="Verde"></h1>
<h1 class="display-1"><img class="dark-light" src="_static/verde-title.png" alt="Verde"></h1>

.. div:: sd-fs-3

Processing and gridding spatial data, machine-learning style

.. grid-item::
:columns: 12 4 12 4

.. image:: ./_static/verde-logo.svg
:width: 200px
:class: sd-m-auto

**Verde** is a Python library for processing spatial data (bathymetry,
geophysics surveys, etc) and interpolating it on regular grids (i.e.,
*gridding*).
2 changes: 1 addition & 1 deletion doc/tutorials_src/chain.py
Original file line number Diff line number Diff line change
@@ -61,8 +61,8 @@
cmap=True,
style="c0.05c",
)
fig.basemap(frame=True)
fig.colorbar(frame='af+l"bathymetric depth [m]"')
fig.basemap(frame=True)
fig.show()


14 changes: 7 additions & 7 deletions env/requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sphinx==4.5.*
sphinx-book-theme==0.3.*
sphinx-gallery==0.10.*
sphinx==7.2.*
sphinx-book-theme==1.1.*
sphinx-gallery==0.15.*
sphinx-copybutton==0.5.*
sphinx-design==0.1.*
matplotlib==3.5.*
sphinx-design==0.5.*
matplotlib==3.8.*
cartopy>=0.20
pyproj
pygmt==0.6.*
gmt==6.3.*
pygmt==0.11.*
gmt==6.5.*
ipython
2 changes: 1 addition & 1 deletion env/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@ pytest-cov
pytest-mpl
coverage
matplotlib
cartopy>=0.18
cartopy>=0.20
16 changes: 8 additions & 8 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python==3.10
- python==3.11
- pip
# Build
- twine
@@ -20,21 +20,21 @@ dependencies:
- pykdtree
- numba
# Test
- matplotlib==3.5.*
- matplotlib==3.8.*
- cartopy>=0.20
- pytest
- pytest-cov
- pytest-mpl
- coverage
# Documentation
- sphinx==4.5.*
- sphinx-book-theme==0.3.*
- sphinx-gallery==0.10.*
- sphinx==7.2.*
- sphinx-book-theme==1.1.*
- sphinx-gallery==0.15.*
- sphinx-copybutton==0.5.*
- sphinx-design==0.1.*
- sphinx-design==0.5.*
- pyproj
- pygmt==0.6.*
- gmt==6.3.*
- pygmt==0.11.*
- gmt==6.5.*
- ipython
# Style
- black
18 changes: 9 additions & 9 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -23,10 +23,10 @@ classifiers =
Topic :: Scientific/Engineering
Topic :: Software Development :: Libraries
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
url = https://github.com/fatiando/verde
project_urls =
Documentation = https://www.fatiando.org/verde
@@ -40,17 +40,17 @@ include_package_data = True
packages = find:
python_requires = >=3.7
install_requires =
numpy>=1.19
scipy>=1.5
pandas>=1.1
xarray>=0.16
scikit-learn>=0.24
numpy>=1.23
scipy>=1.8
pandas>=1.4
xarray>=2022.03
scikit-learn>=1.0
pooch>=1.2
dask>=2021.05.0
dask>=2022.01.0

[options.extras_require]
fast =
numba>=0.52
numba>=0.55
pykdtree>=1.3

[options.package_data]