From bf864bd5dd57a2fd94d98f3ca9fc5fe45f362f1b Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Tue, 5 Sep 2023 21:49:07 -0400 Subject: [PATCH 1/2] update CI --> supported Python --- .github/workflows/build_docs.yml | 59 +++++++++++++++++++++++++++++++ .github/workflows/unittests.yml | 29 ++++++--------- ci/310-DEV_shapely_dev.yaml | 20 ----------- ci/{310-DEV.yaml => 311-DEV.yaml} | 2 +- ci/{37.yaml => 311.yaml} | 2 +- ci/38.yaml | 19 ---------- environment.yml | 2 +- setup.py | 3 +- 8 files changed, 74 insertions(+), 62 deletions(-) create mode 100644 .github/workflows/build_docs.yml delete mode 100644 ci/310-DEV_shapely_dev.yaml rename ci/{310-DEV.yaml => 311-DEV.yaml} (93%) rename ci/{37.yaml => 311.yaml} (94%) delete mode 100644 ci/38.yaml diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml new file mode 100644 index 0000000..fc97023 --- /dev/null +++ b/.github/workflows/build_docs.yml @@ -0,0 +1,59 @@ + name: Build Docs + + on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + workflow_dispatch: + inputs: + version: + description: Manual Doc Build + default: test + required: false + jobs: + docs: + name: build & push docs + runs-on: ${{ matrix.os }} + timeout-minutes: 90 + strategy: + matrix: + os: ['ubuntu-latest'] + environment-file: [ci/310.yaml] + experimental: [false] + defaults: + run: + shell: bash -l {0} + + steps: + - name: checkout repo + uses: actions/checkout@v3 + + - name: setup micromamba + uses: mamba-org/provision-with-micromamba@main + with: + environment-file: ${{ matrix.environment-file }} + micromamba-version: 'latest' + + - name: make docs + run: cd docs; make html + + - name: commit docs + run: | + git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages + cp -r docs/_build/html/* gh-pages/ + cd gh-pages + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add . + git commit -m "Update documentation" -a || true + # The above command will fail if no changes were present, + # so we ignore the return code. + + - name: push to gh-pages + uses: ad-m/github-push-action@master + with: + branch: gh-pages + directory: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + force: true diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index d581569..889488e 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -22,36 +22,36 @@ jobs: RUN_TEST: pytest giddy --cov giddy -v -n auto -r a --cov-config .coveragerc --cov-report xml --color yes --cov-append --cov-report term-missing name: ${{ matrix.os }}, ${{ matrix.environment-file }} runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash -l {0} timeout-minutes: 60 strategy: matrix: os: [ubuntu-latest] environment-file: - - ci/37.yaml - - ci/38.yaml - ci/39.yaml - ci/310.yaml - - ci/310-DEV.yaml - - ci/310-DEV_shapely_dev.yaml + - ci/311.yaml + - ci/311-DEV.yaml include: - - environment-file: ci/310.yaml + - environment-file: ci/311.yaml os: macos-latest - - environment-file: ci/310.yaml + - environment-file: ci/311.yaml os: windows-latest fail-fast: false steps: - name: checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: setup micromamba - uses: mamba-org/provision-with-micromamba@main + uses: mamba-org/setup-micromamba@v1 with: environment-file: ${{ matrix.environment-file }} micromamba-version: 'latest' - channel-priority: 'flexible' - - name: install bleeding edge libpysal, esda, mapclassify & splot (Ubuntu / Python 3.10) + - name: install bleeding edge libpysal, esda, mapclassify & splot (Ubuntu / Python 3.11) shell: bash -l {0} run: | pip install git+https://github.com/pysal/libpysal.git@main @@ -71,15 +71,8 @@ jobs: run: 'python -c "import geopandas; geopandas.show_versions();"' if: contains(matrix.environment-file, 'DEV') - - name: run tests - bash - shell: bash -l {0} - run: ${{ env.RUN_TEST }} - if: matrix.os != 'windows-latest' - - - name: run tests - powershell - shell: powershell + - name: run tests run: ${{ env.RUN_TEST }} - if: matrix.os == 'windows-latest' - name: codecov uses: codecov/codecov-action@v3 diff --git a/ci/310-DEV_shapely_dev.yaml b/ci/310-DEV_shapely_dev.yaml deleted file mode 100644 index a0a7f80..0000000 --- a/ci/310-DEV_shapely_dev.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: test -channels: - - conda-forge - - conda-forge/label/shapely_dev -dependencies: - - python=3.10 - # required - - geopandas>=0.12.0 - - pip - - quantecon>=0.4.7 - - scipy>=1.3.0 - - shapely>=2.0b1 - # testing - - codecov - - ipywidgets - - matplotlib - - pandas - - pytest - - pytest-cov - - pytest-xdist diff --git a/ci/310-DEV.yaml b/ci/311-DEV.yaml similarity index 93% rename from ci/310-DEV.yaml rename to ci/311-DEV.yaml index 69aef2b..77582ab 100644 --- a/ci/310-DEV.yaml +++ b/ci/311-DEV.yaml @@ -2,7 +2,7 @@ name: test channels: - conda-forge dependencies: - - python=3.10 + - python=3.11 # required - geopandas>=0.4.0 - pip diff --git a/ci/37.yaml b/ci/311.yaml similarity index 94% rename from ci/37.yaml rename to ci/311.yaml index dc501ae..850a5d3 100644 --- a/ci/37.yaml +++ b/ci/311.yaml @@ -2,7 +2,7 @@ name: test channels: - conda-forge dependencies: - - python=3.7 + - python=3.11 # required - esda>=2.1.1 - libpysal>=4.0.1 diff --git a/ci/38.yaml b/ci/38.yaml deleted file mode 100644 index ca05cc2..0000000 --- a/ci/38.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: test -channels: - - conda-forge -dependencies: - - python=3.8 - # required - - esda>=2.1.1 - - libpysal>=4.0.1 - - mapclassify>=2.1.1 - - quantecon>=0.4.7 - - scipy>=1.3.0 - - splot - # testing - - codecov - - ipywidgets - - matplotlib - - pytest - - pytest-cov - - pytest-xdist diff --git a/environment.yml b/environment.yml index c8b7f75..f38a055 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,7 @@ name: binder-env channels: - conda-forge dependencies: - - python=3.10 + - python=3.11 - geopandas - libspatialindex - matplotlib diff --git a/setup.py b/setup.py index e308f15..9f90916 100644 --- a/setup.py +++ b/setup.py @@ -78,10 +78,9 @@ def setup_package(): "Topic :: Scientific/Engineering :: GIS", "License :: OSI Approved :: BSD License", "Programming Language :: Python", - "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", ], license="3-Clause BSD", packages=find_packages(), From 84e2c053d69e966585cd0d115a1fdf4fcf025fe6 Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Wed, 6 Sep 2023 12:54:51 -0400 Subject: [PATCH 2/2] remove build_docs yml for now --- .github/workflows/build_docs.yml | 59 -------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 .github/workflows/build_docs.yml diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml deleted file mode 100644 index fc97023..0000000 --- a/.github/workflows/build_docs.yml +++ /dev/null @@ -1,59 +0,0 @@ - name: Build Docs - - on: - push: - # Sequence of patterns matched against refs/tags - tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - workflow_dispatch: - inputs: - version: - description: Manual Doc Build - default: test - required: false - jobs: - docs: - name: build & push docs - runs-on: ${{ matrix.os }} - timeout-minutes: 90 - strategy: - matrix: - os: ['ubuntu-latest'] - environment-file: [ci/310.yaml] - experimental: [false] - defaults: - run: - shell: bash -l {0} - - steps: - - name: checkout repo - uses: actions/checkout@v3 - - - name: setup micromamba - uses: mamba-org/provision-with-micromamba@main - with: - environment-file: ${{ matrix.environment-file }} - micromamba-version: 'latest' - - - name: make docs - run: cd docs; make html - - - name: commit docs - run: | - git clone https://github.com/ammaraskar/sphinx-action-test.git --branch gh-pages --single-branch gh-pages - cp -r docs/_build/html/* gh-pages/ - cd gh-pages - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add . - git commit -m "Update documentation" -a || true - # The above command will fail if no changes were present, - # so we ignore the return code. - - - name: push to gh-pages - uses: ad-m/github-push-action@master - with: - branch: gh-pages - directory: gh-pages - github_token: ${{ secrets.GITHUB_TOKEN }} - force: true