diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 567a18911..16d92b33f 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -20,7 +20,7 @@ strategy: matrix: os: ['ubuntu-latest'] - environment-file: [ci/310.yaml] + environment-file: [ci/312.yaml] experimental: [false] defaults: run: @@ -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: @@ -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 diff --git a/.github/workflows/release_and_publish.yml b/.github/workflows/release_and_publish.yml index 99fc9b434..dade61228 100644 --- a/.github/workflows/release_and_publish.yml +++ b/.github/workflows/release_and_publish.yml @@ -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 diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 814f094b8..f5c1f92c9 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -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 }} @@ -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: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 819dfc0e9..bef3987e3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/README.rst b/README.rst index 8bf368875..12ad3f57f 100644 --- a/README.rst +++ b/README.rst @@ -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 @@ -59,7 +59,7 @@ If you have any suggestions, feature requests, or bug reports, please open new `issues `_ on GitHub. To submit patches, please review `PySAL's documentation for developers `_, the PySAL `development guidelines `_, -the `libpysal contributing guidelines `_ +the `libpysal contributing guidelines `_ before opening a `pull request `_. Once your changes get merged, you’ll automatically be added to the `Contributors List `_. @@ -76,6 +76,6 @@ To search for or report bugs, please see `libpysal's issues `_ +See the `LICENSE `_ for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES. diff --git a/ci/38-minimal.yaml b/ci/310-oldest.yaml similarity index 51% rename from ci/38-minimal.yaml rename to ci/310-oldest.yaml index b0ecd5711..5ffe7f1a6 100644 --- a/ci/38-minimal.yaml +++ b/ci/310-oldest.yaml @@ -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 diff --git a/ci/310.yaml b/ci/310.yaml index 3e0a60ccd..54b4edb41 100644 --- a/ci/310.yaml +++ b/ci/310.yaml @@ -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 diff --git a/ci/311.yaml b/ci/311.yaml index 1798e9929..00988bc1d 100644 --- a/ci/311.yaml +++ b/ci/311.yaml @@ -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 diff --git a/ci/311-dev.yaml b/ci/312-dev.yaml similarity index 87% rename from ci/311-dev.yaml rename to ci/312-dev.yaml index e3e10d272..7a40eb72f 100644 --- a/ci/311-dev.yaml +++ b/ci/312-dev.yaml @@ -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 diff --git a/ci/311-no-optional.yaml b/ci/312-no-optional.yaml similarity index 87% rename from ci/311-no-optional.yaml rename to ci/312-no-optional.yaml index 1ffacef71..59e0a35cf 100644 --- a/ci/311-no-optional.yaml +++ b/ci/312-no-optional.yaml @@ -2,11 +2,14 @@ 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 @@ -14,8 +17,7 @@ dependencies: - matplotlib - pytest - pytest-cov + - pytest-mpl - pytest-xdist # optional used in ci - - geopandas-base>=0.12.0 # base to avoid pulling sklearn - - fiona - geodatasets diff --git a/ci/39.yaml b/ci/312.yaml similarity index 50% rename from ci/39.yaml rename to ci/312.yaml index d9e0bb04f..72c0bdd97 100644 --- a/ci/39.yaml +++ b/ci/312.yaml @@ -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 diff --git a/docs/conf.py b/docs/conf.py index 384dc552c..0c0208cbd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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), } diff --git a/docs/index.rst b/docs/index.rst index 8040ac2e3..bf71e97fb 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -19,7 +19,7 @@ libpysal: Python Spatial Analysis Library Core
- +
Weights for nonplanar enforced geometries
@@ -38,10 +38,10 @@ Introduction **libpysal** offers four modules that form the building blocks in many upstream packages in the `PySAL family `_: -- 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 `_. diff --git a/environment.yml b/environment.yml index d917c91fc..70a37d268 100644 --- a/environment.yml +++ b/environment.yml @@ -2,35 +2,27 @@ name: libpysal channels: - conda-forge dependencies: + # core env deps + - python - jupyterlab + # core libpysal deps - beautifulsoup4 + - geopandas + - jinja2 + - packaging - pandas + - platformdirs - requests - - jinja2 - - numpydoc - - nbsphinx - - pandoc - - sphinx - - sphinxcontrib-bibtex - - sphinx_bootstrap_theme - - bokeh>=0.11.1 - - folium>=0.2.1 - - geojson>=1.3.2 - - geopandas>=0.2 - - matplotlib>=1.5.1 - - mplleaflet>=0.0.5 - - numba - - numexpr - - networkx - - scikit-learn>=0.17.1 - - seaborn>=0.7.0 - - sqlalchemy - - statsmodels>=0.6.1 + - scipy + - shapely - xarray - - codecov + # optional libpysal deps + - geodatasets - joblib - - packaging - - pytest - - pytest-cov - - pytest-xdist - - mapclassify + - matplotlib + - networkx + - numba + - pyarrow + - scikit-learn + - sqlalchemy + - zstd diff --git a/pyproject.toml b/pyproject.toml index fa2657614..bc98a3667 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,17 +23,18 @@ classifiers = [ "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering :: GIS", ] -requires-python = ">=3.8" +requires-python = ">=3.10" dependencies = [ - "platformdirs>=2.0.2", "beautifulsoup4>=4.10", - "geopandas>=0.9", - "shapely>=2", - "numpy>=1.20", + "geopandas>=0.10.0", + "numpy>=1.22", + "packaging>=22", "pandas>=1.4", - "requests", + "platformdirs>=2.0.2", + "requests>=2.27", "scipy>=1.8", - "packaging" + "shapely>=2.0.1", + "xarray>=2022.3", ] [project.urls] @@ -41,30 +42,37 @@ Home = "https://github.com/pysal/libpysal/" Repository = "https://github.com/pysal/libpysal" [project.optional-dependencies] -dev = ["pre-commit"] +plus = [ + "joblib>=1.2", + "networkx>=2.7", + "numba>=0.55", + "pyarrow>=7.0", + "scikit-learn>=1.1", + "zstd", +] +dev = [ + "black", + "pre-commit", + "watermark", +] docs = [ + "mkdocs-jupyter", + "myst-parser", "nbsphinx", "numpydoc", "pandoc", "sphinx", "sphinxcontrib-bibtex", "sphinx_bootstrap_theme", - "mkdocs-jupyter", - "myst-parser" ] tests = [ - "geopandas", "codecov", - "coverage", + "geodatasets>=2023.3.0", + "matplotlib>=3.6", "pytest", "pytest-mpl", "pytest-cov", - "watermark", - "pyarrow", "pytest-xdist", - "matplotlib", - "geodatasets", - "black" ] [tool.setuptools.packages.find] @@ -76,7 +84,7 @@ line-length = 88 [tool.ruff] line-length = 88 select = ["E", "F", "W", "I", "UP", "N", "B", "A", "C4", "SIM", "ARG"] -target-version = "py38" +target-version = "py310" ignore = [ "B006", "B008",