From 6bbe10a46330f40dfbc1b539219f960e287d604c Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Fri, 6 Oct 2023 21:02:33 -0400 Subject: [PATCH 1/5] initial SPGLM modernization --- .github/workflows/testing.yml | 75 +++++++++++++++++++++++++++++++++++ ci/310.yaml | 17 ++++++++ ci/311-DEV.yaml | 13 ++++++ ci/311.yaml | 23 +++++++++++ ci/39-MIN.yaml | 17 ++++++++ requirements.txt | 2 +- setup.py | 3 +- 7 files changed, 147 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/testing.yml create mode 100644 ci/310.yaml create mode 100644 ci/311-DEV.yaml create mode 100644 ci/311.yaml create mode 100644 ci/39-MIN.yaml diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 00000000..f261d6d3 --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,75 @@ +name: Continuous Integration + +on: + push: + branches: + - '*' + pull_request: + branches: + - '*' + schedule: + - cron: '59 23 * * *' + workflow_dispatch: + inputs: + version: + description: Manual Unittest Run + default: test + required: false + +jobs: + unittests: + env: + RUN_TEST: pytest spglm --cov spglm -v -n auto -r a --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/39-MIN.yaml + - ci/310.yaml + - ci/311.yaml + - ci/311-DEV.yaml + include: + - environment-file: ci/311.yaml + os: macos-latest + - environment-file: ci/311.yaml + os: windows-latest + fail-fast: false + + steps: + - name: checkout repo + uses: actions/checkout@v4 + + - name: setup micromamba + uses: mamba-org/setup-micromamba@v1 + with: + environment-file: ${{ matrix.environment-file }} + micromamba-version: 'latest' + + - name: install bleeding edge libpysal & spreg (Ubuntu / latest Python) + shell: bash -l {0} + run: | + pip install git+https://github.com/pysal/libpysal.git@main + pip install git+https://github.com/pysal/spreg.git@main + if: matrix.os == 'ubuntu-latest' && contains(matrix.environment-file, 'DEV') + + - name: environment info + shell: bash -l {0} + run: | + micromamba info + micromamba list + + - name: run tests + run: ${{ env.RUN_TEST }} + + - name: codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.xml + name: spglm-codecov diff --git a/ci/310.yaml b/ci/310.yaml new file mode 100644 index 00000000..e4566484 --- /dev/null +++ b/ci/310.yaml @@ -0,0 +1,17 @@ +name: test +channels: + - conda-forge +dependencies: + - python=3.10 + # required + - git + - libpysal + - numpy + - pip + - scipy + - spreg + # testing + - codecov + - pytest + - pytest-cov + - pytest-xdist diff --git a/ci/311-DEV.yaml b/ci/311-DEV.yaml new file mode 100644 index 00000000..b1c9a28d --- /dev/null +++ b/ci/311-DEV.yaml @@ -0,0 +1,13 @@ +name: test +channels: + - conda-forge +dependencies: + - python=3.11 + # required + - git + - pip + # testing + - codecov + - pytest + - pytest-cov + - pytest-xdist diff --git a/ci/311.yaml b/ci/311.yaml new file mode 100644 index 00000000..dd08ad33 --- /dev/null +++ b/ci/311.yaml @@ -0,0 +1,23 @@ +name: test +channels: + - conda-forge +dependencies: + - python=3.11 + # required + - git + - libpysal + - numpy + - pip + - scipy + - spreg + # testing + - codecov + - pytest + - pytest-cov + - pytest-xdist + # docs (this env only) + - nbsphinx + - numpydoc + - sphinx>=1.4.3 + - sphinxcontrib-bibtex + - sphinx_bootstrap_theme diff --git a/ci/39-MIN.yaml b/ci/39-MIN.yaml new file mode 100644 index 00000000..0eef310b --- /dev/null +++ b/ci/39-MIN.yaml @@ -0,0 +1,17 @@ +name: test +channels: + - conda-forge +dependencies: + - python=3.9 + # required + - git + - libpysal=4.0.0 + - numpy=1.23 + - pip + - scipy=0.11 + - spreg=1.0.4 + # testing + - codecov + - pytest + - pytest-cov + - pytest-xdist diff --git a/requirements.txt b/requirements.txt index 8ddd537d..4bf3e18d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ scipy>=0.11 -numpy>=1.3 +numpy>=1.23 libpysal>=4.0.0 spreg>=1.0.4 diff --git a/setup.py b/setup.py index 61a0ffcd..e6a47624 100644 --- a/setup.py +++ b/setup.py @@ -50,8 +50,7 @@ def setup_package(): 'Topic :: Scientific/Engineering :: GIS', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7' + 'Programming Language :: Python :: 3', ], license='3-Clause BSD', packages=find_packages(), From 86f0095b17c605e25462662d0bc637ee5a2a2eb7 Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Fri, 6 Oct 2023 21:13:23 -0400 Subject: [PATCH 2/5] initial SPGLM modernization [2] --- README.md | 2 +- ci/39-MIN.yaml | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2680ebc4..96a592df 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ **G**eneralized **L**inear **M**odeling ======================================= -[![Build Status](https://travis-ci.org/pysal/spglm.svg?branch=master)](https://travis-ci.org/pysal/spglm) +[![Continuous Integration](https://github.com/pysal/spglm/actions/workflows/testing.yml/badge.svg)] [![Documentation Status](https://readthedocs.org/projects/spglm/badge/?version=latest)](https://spglm.readthedocs.io/en/latest/?badge=latest) [![PyPI version](https://badge.fury.io/py/spglm.svg)](https://badge.fury.io/py/spglm) diff --git a/ci/39-MIN.yaml b/ci/39-MIN.yaml index 0eef310b..c0e19525 100644 --- a/ci/39-MIN.yaml +++ b/ci/39-MIN.yaml @@ -8,7 +8,7 @@ dependencies: - libpysal=4.0.0 - numpy=1.23 - pip - - scipy=0.11 + - scipy=1.8 - spreg=1.0.4 # testing - codecov diff --git a/requirements.txt b/requirements.txt index 4bf3e18d..b446b05a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -scipy>=0.11 +scipy>=1.8 numpy>=1.23 libpysal>=4.0.0 spreg>=1.0.4 From 635f32ca377b57bf424b47958d8289dd3c55fbd0 Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Fri, 6 Oct 2023 21:16:15 -0400 Subject: [PATCH 3/5] initial SPGLM modernization [3] --- ci/39-MIN.yaml | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/39-MIN.yaml b/ci/39-MIN.yaml index c0e19525..109bda2b 100644 --- a/ci/39-MIN.yaml +++ b/ci/39-MIN.yaml @@ -5,7 +5,7 @@ dependencies: - python=3.9 # required - git - - libpysal=4.0.0 + - libpysal=4.5.0 - numpy=1.23 - pip - scipy=1.8 diff --git a/requirements.txt b/requirements.txt index b446b05a..7b69f54e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ scipy>=1.8 numpy>=1.23 -libpysal>=4.0.0 +libpysal>=4.5.0 spreg>=1.0.4 From 9e733f9339e267013e532ff60d30656dc6371e84 Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Fri, 6 Oct 2023 21:22:26 -0400 Subject: [PATCH 4/5] run min only --- .github/workflows/testing.yml | 16 ++++++++-------- ci/39-MIN.yaml | 4 ++-- requirements.txt | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index f261d6d3..4fda5165 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -31,14 +31,14 @@ jobs: os: [ubuntu-latest] environment-file: - ci/39-MIN.yaml - - ci/310.yaml - - ci/311.yaml - - ci/311-DEV.yaml - include: - - environment-file: ci/311.yaml - os: macos-latest - - environment-file: ci/311.yaml - os: windows-latest + #- ci/310.yaml + #- ci/311.yaml + #- ci/311-DEV.yaml + #include: + #- environment-file: ci/311.yaml + # os: macos-latest + #- environment-file: ci/311.yaml + # os: windows-latest fail-fast: false steps: diff --git a/ci/39-MIN.yaml b/ci/39-MIN.yaml index 109bda2b..820fd964 100644 --- a/ci/39-MIN.yaml +++ b/ci/39-MIN.yaml @@ -5,11 +5,11 @@ dependencies: - python=3.9 # required - git - - libpysal=4.5.0 + - libpysal=4.5 - numpy=1.23 - pip - scipy=1.8 - - spreg=1.0.4 + - spreg=1.2 # testing - codecov - pytest diff --git a/requirements.txt b/requirements.txt index 7b69f54e..e8269053 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ scipy>=1.8 numpy>=1.23 -libpysal>=4.5.0 -spreg>=1.0.4 +libpysal>=4.5 +spreg>=1.2 From 443abacd2f1503591d0b93ff30633c8f1e1cac24 Mon Sep 17 00:00:00 2001 From: James Gaboardi Date: Fri, 6 Oct 2023 21:24:48 -0400 Subject: [PATCH 5/5] succesful min pins --- .github/workflows/testing.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 4fda5165..f261d6d3 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -31,14 +31,14 @@ jobs: os: [ubuntu-latest] environment-file: - ci/39-MIN.yaml - #- ci/310.yaml - #- ci/311.yaml - #- ci/311-DEV.yaml - #include: - #- environment-file: ci/311.yaml - # os: macos-latest - #- environment-file: ci/311.yaml - # os: windows-latest + - ci/310.yaml + - ci/311.yaml + - ci/311-DEV.yaml + include: + - environment-file: ci/311.yaml + os: macos-latest + - environment-file: ci/311.yaml + os: windows-latest fail-fast: false steps: