diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 8e28f22..d96aed8 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -10,6 +10,7 @@ on: description: Manual Doc Build default: test required: false + jobs: docs: name: build & push docs @@ -23,26 +24,32 @@ jobs: - ci/314-latest.yaml experimental: - false + defaults: run: shell: bash -l {0} + steps: - name: checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 + - name: setup micromamba - uses: mamba-org/setup-micromamba@v2 + uses: mamba-org/setup-micromamba@v3 with: environment-file: ${{ matrix.environment-file }} micromamba-version: latest + - name: reinstall for version run: | pip install -e . --no-deps --force-reinstall + - name: make docs run: | cd docs make html + - name: Publish to Github Pages uses: peaceiris/actions-gh-pages@v4 with: diff --git a/.github/workflows/release_and_publish.yml b/.github/workflows/release_and_publish.yml index 8ad4384..2249f3c 100644 --- a/.github/workflows/release_and_publish.yml +++ b/.github/workflows/release_and_publish.yml @@ -10,6 +10,7 @@ on: description: Manual Release default: test required: false + jobs: build: name: Create release & publish to PyPI @@ -20,20 +21,23 @@ jobs: steps: - name: checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 + - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v6 with: python-version: 3.x + - name: Build source and wheel distributions run: | python -m pip install --upgrade build twine python -m build twine check --strict dist/* + - name: Create Release Notes - uses: actions/github-script@v6 + uses: actions/github-script@v9 with: github-token: ${{secrets.GITHUB_TOKEN}} script: > @@ -41,5 +45,6 @@ jobs: tag_name: "${{ github.ref }}", generate_release_notes: true }); + - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ba311a2..bcf1259 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,8 +2,7 @@ name: Continuous Integration on: push: - branches: - - "*" + branches: [main] pull_request: branches: - "*" @@ -15,6 +14,7 @@ on: description: Manual Unittest Run default: test required: false + jobs: unittests: name: ${{ matrix.os }}, ${{ matrix.environment-file }} @@ -28,8 +28,7 @@ jobs: os: - ubuntu-latest environment-file: - - ci/311-oldest.yaml - - ci/311-latest.yaml + - ci/312-oldest.yaml - ci/312-latest.yaml - ci/313-latest.yaml - ci/314-latest.yaml @@ -42,25 +41,30 @@ jobs: - environment-file: ci/314-latest.yaml os: windows-latest fail-fast: false + steps: - name: checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 + - name: setup micromamba - uses: mamba-org/setup-micromamba@v2 + uses: mamba-org/setup-micromamba@v3 with: environment-file: ${{ matrix.environment-file }} micromamba-version: latest + - name: environment info shell: bash -l {0} run: | micromamba info micromamba list + - name: spatial versions (if geopandas is installed) shell: bash -l {0} run: python -c "import geopandas; geopandas.show_versions();" if: contains(matrix.environment-file, 'dev') + - name: run pytest run: | pytest \ @@ -73,6 +77,7 @@ jobs: --cov-append \ --cov-report xml \ --cov-report term-missing + - name: run docstring tests if: contains(matrix.environment-file, 'dev') && contains(matrix.os, 'ubuntu') run: | @@ -88,8 +93,9 @@ jobs: --cov-report term-missing \ --doctest-only \ --doctest-continue-on-failure + - name: codecov - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: token: ${{ secrets.CODECOV_TOKEN }} name: giddy-codecov diff --git a/ci/311-latest.yaml b/ci/311-latest.yaml deleted file mode 100644 index 21b22f6..0000000 --- a/ci/311-latest.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: 311-latest -channels: - - conda-forge -dependencies: - - python=3.11 - # required - - esda - - libpysal - - mapclassify - - quantecon - - scipy - - seaborn - # testing - - codecov - - ipywidgets - - matplotlib - - pytest - - pytest-cov - - pytest-xdist diff --git a/ci/312-latest.yaml b/ci/312-latest.yaml index fd97451..c74d59b 100644 --- a/ci/312-latest.yaml +++ b/ci/312-latest.yaml @@ -4,7 +4,7 @@ channels: dependencies: - python=3.12 # required - - esda + - esda<3 - libpysal - mapclassify - quantecon diff --git a/ci/311-oldest.yaml b/ci/312-oldest.yaml similarity index 82% rename from ci/311-oldest.yaml rename to ci/312-oldest.yaml index 971c776..99d4723 100644 --- a/ci/311-oldest.yaml +++ b/ci/312-oldest.yaml @@ -1,14 +1,14 @@ -name: 311-oldest +name: 312-oldest channels: - conda-forge dependencies: - - python=3.11 + - python=3.12 # required - esda=2.7 - libpysal=4.12 - mapclassify=2.7 - quantecon=0.8 - - scipy=1.12 + - scipy=1.14 - seaborn # testing - codecov diff --git a/ci/313-latest.yaml b/ci/313-latest.yaml index 3246545..29f9af8 100644 --- a/ci/313-latest.yaml +++ b/ci/313-latest.yaml @@ -4,7 +4,7 @@ channels: dependencies: - python=3.13 # required - - esda + - esda<3 - libpysal - mapclassify - quantecon diff --git a/ci/314-dev.yaml b/ci/314-dev.yaml index 9dfe78f..6efc99e 100644 --- a/ci/314-dev.yaml +++ b/ci/314-dev.yaml @@ -15,7 +15,7 @@ dependencies: - pip: # dev versions of packages - --pre \ - --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ + --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ --extra-index-url https://pypi.org/simple - matplotlib - seaborn @@ -27,5 +27,3 @@ dependencies: - git+https://github.com/pysal/libpysal.git@main - git+https://github.com/pysal/mapclassify.git@main - git+https://github.com/QuantEcon/QuantEcon.py.git@main - - diff --git a/ci/314-latest.yaml b/ci/314-latest.yaml index 982f44b..95fdd5d 100644 --- a/ci/314-latest.yaml +++ b/ci/314-latest.yaml @@ -4,7 +4,7 @@ channels: dependencies: - python=3.14 # required - - esda + - esda<3 - libpysal - mapclassify - quantecon diff --git a/docs/installation.rst b/docs/installation.rst index 89ca8a7..71fd058 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -3,7 +3,7 @@ Installation ============ -giddy currently supports python `3.11`_ and above. +giddy currently supports python `3.12`_ and above. Please make sure that you are operating in a supported environment. Installing released version @@ -40,7 +40,7 @@ your fork. By making changes to your local clone and submitting a pull request to `pysal/giddy`_, you can contribute to the giddy development. -.. _3.11: https://docs.python.org/3.11/ +.. _3.12: https://docs.python.org/3.12/ .. _Python Package Index: https://pypi.org/project/giddy/ .. _pysal/giddy: https://github.com/pysal/giddy .. _fork: https://help.github.com/articles/fork-a-repo/ diff --git a/pyproject.toml b/pyproject.toml index 6f7bce4..0cee911 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,13 +21,13 @@ classifiers = [ "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering :: GIS", ] -requires-python = ">=3.11" +requires-python = ">=3.12" dependencies = [ "esda>=2.7, <3", "libpysal>=4.12", "mapclassify>=2.7", "quantecon>=0.8", - "scipy>=1.12", + "scipy>=1.14", "seaborn", "matplotlib", ]