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

CI against Python 3.12 #585

Merged
merged 11 commits into from
Oct 21, 2023
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
8 changes: 5 additions & 3 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
strategy:
matrix:
os: ['ubuntu-latest']
environment-file: [ci/310.yaml]
environment-file: [ci/312.yaml]
experimental: [false]
defaults:
run:
Expand All @@ -29,7 +29,9 @@
steps:
- name: Checkout repo
uses: actions/checkout@v4

with:
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
Expand All @@ -54,7 +56,7 @@
# The above command will fail if no changes were present,
# so we ignore the return code.

- name: push to gh-pages
- name: Push to gh-pages
uses: ad-m/github-push-action@master
with:
branch: gh-pages
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@
build:
name: Create release & publish to PyPI
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: Set up python
uses: actions/setup-python@v4
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,28 @@ jobs:
matrix:
os: [ubuntu-latest]
environment-file:
- ci/38-minimal.yaml
- ci/39.yaml
- ci/310-oldest.yaml
- ci/310.yaml
- ci/311.yaml
- ci/311-dev.yaml
- ci/311-no-optional.yaml
- ci/312.yaml
- ci/312-dev.yaml
- ci/312-no-optional.yaml
include:
- environment-file: ci/310.yaml
- environment-file: ci/312.yaml
os: macos-latest
- environment-file: ci/310.yaml
- environment-file: ci/312.yaml
os: windows-latest
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: setup micromamba
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{ matrix.environment-file }}
Expand All @@ -55,7 +58,8 @@ jobs:
run: |
pytest -v --color yes --cov libpysal --cov-append --cov-report term-missing --cov-report xml .

- uses: codecov/codecov-action@v3
- name: Codecov
uses: codecov/codecov-action@v3

- name: Generate and publish the report
if: |
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 23.9.1
rev: "23.10.0"
hooks:
- id: black
language_version: python3
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Python Spatial Analysis Library Core
.. image:: https://github.com/pysal/libpysal/workflows/.github/workflows/unittests.yml/badge.svg
:target: https://github.com/pysal/libpysal/actions?query=workflow%3A.github%2Fworkflows%2Funittests.yml

.. image:: https://codecov.io/gh/pysal/libpysal/branch/master/graph/badge.svg
.. image:: https://codecov.io/gh/pysal/libpysal/branch/main/graph/badge.svg
:target: https://codecov.io/gh/pysal/libpysal

.. image:: https://badge.fury.io/py/libpysal.svg
Expand Down Expand Up @@ -59,7 +59,7 @@ If you have any suggestions, feature requests, or bug reports,
please open new `issues <https://github.com/pysal/libpysal/issues>`_ on GitHub.
To submit patches, please review `PySAL's documentation for developers <https://pysal.org/docs/devs/>`_,
the PySAL `development guidelines <https://github.com/pysal/pysal/wiki>`_,
the `libpysal contributing guidelines <https://github.com/pysal/libpysal/blob/master/.github/CONTRIBUTING.md>`_
the `libpysal contributing guidelines <https://github.com/pysal/libpysal/blob/main/.github/CONTRIBUTING.md>`_
before opening a `pull request <https://github.com/pysal/libpysal/pulls>`_.
Once your changes get merged, you’ll automatically be added to
the `Contributors List <https://github.com/pysal/libpysal/graphs/contributors>`_.
Expand All @@ -76,6 +76,6 @@ To search for or report bugs, please see `libpysal's issues <https://github.com/
License information
*******************

See the `LICENSE <https://github.com/pysal/libpysal/blob/master/LICENSE.txt>`_
See the `LICENSE <https://github.com/pysal/libpysal/blob/main/LICENSE.txt>`_
for information on the history of this software, terms & conditions for usage,
and a DISCLAIMER OF ALL WARRANTIES.
23 changes: 14 additions & 9 deletions ci/38-minimal.yaml → ci/310-oldest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,32 @@ name: test
channels:
- conda-forge
dependencies:
- python=3.8
- python=3.10
- beautifulsoup4=4.10
- geopandas=0.10.0
- jinja2=3.0
- numpy=1.22
- packaging=22
- pandas=1.4
- requests=2.27
- scipy=1.8
- xarray=0.18
- shapely=2.0.1
- xarray=2022.3
# testing
- codecov
- matplotlib
- matplotlib>=3.6
- pytest
- pytest-cov
- pytest-mpl
- pytest-xdist
# optional
- geopandas>=0.10.0,<0.13
- shapely==2.0.1
- joblib
- geodatasets=2023.3.0
- joblib>=1.2
- networkx=2.7
- numba=0.54
- packaging
- numba=0.55
- pyarrow>=7.0
- scikit-learn=1.1
- zstd
- geodatasets
- pip
- pip:
- platformdirs==2.0.2
20 changes: 9 additions & 11 deletions ci/310.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,28 @@ channels:
- conda-forge
dependencies:
- python=3.10
- platformdirs
- beautifulsoup4
- geopandas
- jinja2
- packaging
- pandas
- platformdirs
- requests
- scipy
- shapely
- xarray
# testing
- codecov
- matplotlib
- pytest
- pytest-cov
- pytest-mpl
- pytest-xdist
# optional
- geopandas
- geodatasets
- joblib
- networkx
- numba
- packaging
- zstd
- geodatasets
- pyarrow
# for docs build action (this env only)
- nbsphinx
- numpydoc
- sphinx
- sphinxcontrib-bibtex
- sphinx_bootstrap_theme
- scikit-learn
- zstd
17 changes: 10 additions & 7 deletions ci/311.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,28 @@ channels:
- conda-forge
dependencies:
- python=3.11
- platformdirs
- beautifulsoup4
- geopandas
- jinja2
- packaging
- pandas
- platformdirs
- requests
- scipy
- shapely
- xarray
# testing
- codecov
- matplotlib
- pytest
- pytest-cov
- pytest-mpl
- pytest-xdist
# optional
- geopandas>=0.12.0
- geodatasets
- joblib
- networkx
- packaging
- shapely>=2.0b1
- xarray
- zstd
- geodatasets
- numba
- pyarrow
- scikit-learn
- zstd
23 changes: 13 additions & 10 deletions ci/311-dev.yaml → ci/312-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,37 @@ name: test
channels:
- conda-forge
dependencies:
- python=3.11
- platformdirs
- python=3.12
- beautifulsoup4
- jinja2
- platformdirs
- requests
# testing
- codecov
- matplotlib
- pytest
- pytest-cov
- pytest-mpl
- pytest-xdist
# optional
- geos
- pyproj
- Cython
- fiona
- geodatasets
- geos
- joblib
- networkx
# - numba # follow up when numba is ready for 3.12
- packaging
- zstd
- Cython
- geodatasets
- pyarrow
- pyproj
- zstd
- pip
- pip:
# dev versions of packages
- --pre --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --extra-index-url https://pypi.org/simple
- scipy
- pandas
- xarray
- scikit-learn
- git+https://github.com/shapely/shapely.git@main
- scipy
- xarray
- git+https://github.com/geopandas/geopandas.git@main
- git+https://github.com/shapely/shapely.git@main
10 changes: 6 additions & 4 deletions ci/311-no-optional.yaml → ci/312-no-optional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ name: test
channels:
- conda-forge
dependencies:
- python=3.11
- platformdirs
- python=3.12
- beautifulsoup4
- fiona
- geopandas-base>=0.12.0 # base to avoid pulling sklearn
- jinja2
- pandas
- platformdirs
- requests
- scipy
- xarray
# testing
- codecov
- matplotlib
- pytest
- pytest-cov
- pytest-mpl
- pytest-xdist
# optional used in ci
- geopandas-base>=0.12.0 # base to avoid pulling sklearn
- fiona
- geodatasets
27 changes: 20 additions & 7 deletions ci/39.yaml → ci/312.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,38 @@ name: test
channels:
- conda-forge
dependencies:
- python=3.9
- platformdirs
- python=3.12
- beautifulsoup4
- geopandas
- jinja2
- packaging
- pandas
- platformdirs
- requests
- scipy
- shapely
- xarray
# testing
- codecov
- matplotlib
- pytest
- pytest-cov
- pytest-mpl
- pytest-xdist
# optional
- geopandas
- geodatasets
- joblib
- networkx
- numba
- packaging
- zstd
- geodatasets
# - numba # follow up when numba is ready for 3.12
- pyarrow
- scikit-learn
- zstd
# for docs build action (this env only)
- mkdocs-jupyter
- myst-parser
- nbsphinx
- numpydoc
- pandoc
- sphinx
- sphinxcontrib-bibtex
- sphinx_bootstrap_theme
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def setup(app):
"networkx": ("https://networkx.org/documentation/stable/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"python": ("https://docs.python.org/3.11/", None),
"python": ("https://docs.python.org/3.12/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
}

Expand Down
10 changes: 5 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ libpysal: Python Spatial Analysis Library Core
<div class="col-sm-1 col-xs-hidden">
</div>
<div class="col-sm-10 col-xs-12">
<a href="http://nbviewer.jupyter.org/github/pysal/libpysal/blob/master/notebooks/weights.ipynb" class="thumbnail">
<a href="http://nbviewer.jupyter.org/github/pysal/libpysal/blob/main/notebooks/weights.ipynb" class="thumbnail">
<img src="_static/images/npweights.png" class="img-responsive center-block">
<div class="caption text-center">
<h6>Weights for nonplanar enforced geometries</h6>
Expand All @@ -38,10 +38,10 @@ Introduction

**libpysal** offers four modules that form the building blocks in many upstream packages in the `PySAL family <https://pysal.org>`_:

- Spatial Weights: libpysal.weights
- Input-and output: libpysal.io
- Computational geometry: libpysal.cg
- Built-in example datasets libpysal.examples
- Spatial Weights: libpysal.weights
- Input-and output: libpysal.io
- Computational geometry: libpysal.cg
- Built-in example datasets libpysal.examples


Examples demonstrating some of **libpysal** functionality are available in the `tutorial <tutorial.html>`_.
Expand Down
Loading