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

update min supported Python and testing workflow #140

Merged
merged 6 commits into from
Jul 4, 2024
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
28 changes: 10 additions & 18 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ jobs:
matrix:
os: [ubuntu-latest]
environment-file:
- ci/envs/38-minimal.yaml
- ci/envs/39-latest.yaml
- ci/envs/310-minimal.yaml
- ci/envs/310-latest.yaml
- ci/envs/311-latest.yaml
- ci/envs/311-dev.yaml
- ci/envs/312-latest.yaml
- ci/envs/312-dev.yaml
include:
- environment-file: ci/envs/311-latest.yaml
os: macos-latest
- environment-file: ci/envs/311-latest.yaml
- environment-file: ci/envs/312-latest.yaml
os: macos-13 # Intel
- environment-file: ci/envs/312-latest.yaml
os: macos-14 # Apple Silicon
- environment-file: ci/envs/312-latest.yaml
os: windows-latest
defaults:
run:
Expand All @@ -46,16 +48,6 @@ jobs:

- name: Test pointpats
run: |
pytest -v --color yes --cov pointpats --cov-config .coveragerc --cov-append --cov-report term-missing --cov-report xml .
pytest -v --color yes --cov pointpats --cov-append --cov-report term-missing --cov-report xml .

- uses: codecov/codecov-action@v3

- name: Generate and publish the report
if: |
failure()
&& steps.status.outcome == 'failure'
&& github.event_name == 'schedule'
&& github.repository_owner == 'pysal'
uses: xarray-contrib/issue-from-pytest-log@v1
with:
log-path: pytest-log.jsonl
- uses: codecov/codecov-action@v4
10 changes: 5 additions & 5 deletions ci/envs/310-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ channels:
- conda-forge
dependencies:
- python=3.10
- scipy
- geopandas
- libpysal
- matplotlib
- numpy
- pandas
- matplotlib
- libpysal
- scipy
- shapely
# tests
- scikit-learn
- shapely
- geopandas
- statsmodels
- pytest
- pytest-cov
Expand Down
18 changes: 18 additions & 0 deletions ci/envs/310-minimal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: test
channels:
- conda-forge
dependencies:
- python=3.10
- geopandas=0.12
- libpysal=4.8
- matplotlib=3.6
- numpy=1.24
- pandas=1.4
- scipy=1.10
- shapely=2
# tests
- scikit-learn=1.2
- statsmodels
- pytest
- pytest-cov
- codecov
16 changes: 5 additions & 11 deletions ci/envs/311-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,19 @@ channels:
- conda-forge
dependencies:
- python=3.11
- scipy
- geopandas
- libpysal
- matplotlib
- numpy
- pandas
- matplotlib
- libpysal
- scipy
- shapely
# tests
- scikit-learn
- shapely
- geopandas
- statsmodels
- pytest
- pytest-cov
- codecov
- pip
- pip:
- KDEpy
# for docs build action (this env only)
- nbsphinx
- numpydoc
- sphinx
- sphinxcontrib-bibtex
- sphinx_bootstrap_theme
22 changes: 11 additions & 11 deletions ci/envs/311-dev.yaml → ci/envs/312-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@ name: test
channels:
- conda-forge
dependencies:
- python=3.11
- numpy
- pandas
- matplotlib
- python=3.12
- folium
- libpysal
- mapclassify
- folium
# tests
- matplotlib
- numpy
- pandas
- shapely
- pyproj
# tests
- codecov
- fiona
- pytest
- pytest-cov
- codecov
- pyproj
- pip
- pip:
- --pre --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --extra-index-url https://pypi.org/simple
- git+https://github.com/geopandas/geopandas.git
- git+https://github.com/pysal/libpysal.git
- KDEpy
- scipy
- scikit-learn
- statsmodels
- KDEpy
- git+https://github.com/pysal/libpysal.git
- git+https://github.com/geopandas/geopandas.git
18 changes: 12 additions & 6 deletions ci/envs/39-latest.yaml → ci/envs/312-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,26 @@ name: test
channels:
- conda-forge
dependencies:
- python=3.9
- scipy
- python=3.12
- geopandas
- libpysal
- matplotlib
- numpy
- pandas
- matplotlib
- libpysal
- scipy
- shapely
# tests
- scikit-learn
- shapely
- geopandas
- statsmodels
- pytest
- pytest-cov
- codecov
- pip
- pip:
- KDEpy
# for docs build action (this env only)
- nbsphinx
- numpydoc
- sphinx
- sphinxcontrib-bibtex
- sphinx_bootstrap_theme
17 changes: 0 additions & 17 deletions ci/envs/38-minimal.yaml

This file was deleted.

7 changes: 5 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ channels:
- conda-forge
- defaults
dependencies:
- pandas
- python
- geopandas
- libpysal
- matplotlib
- numpy
- pandas
- scipy>=0.11
- scipy
- shapley
3 changes: 2 additions & 1 deletion pointpats/tests/test_spacetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ def test_explore(self):
[0.0008675512091255166, 28.514975377735905],
],
)
assert len(m.to_dict()["children"]) == 5
# old folium returns 5, new folium returns 3
assert len(m.to_dict()["children"]) >= 3


def test_hotspots_without_neighbors(self):
Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ classifiers = [
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: GIS",
]
requires-python = ">=3.7"
requires-python = ">=3.10"
dependencies = [
"numpy",
"pandas",
"scipy >=1.8",
"libpysal >=4",
"matplotlib",
"geopandas",
"libpysal >=4.8",
"geopandas >= 0.12",
"matplotlib >=3.6",
"numpy >=1.24",
"pandas >=1.4, !=1.5.0",
"scipy >=1.10",
"shapely >=2"
]

Expand All @@ -53,12 +53,13 @@ docs = [
"myst-parser"
]
tests = [
"geopandas",
"codecov",
"coverage",
"pytest",
"pytest-mpl",
"pytest-cov",
"scikit-learn >=1.2",
"statsmodels",
"watermark",
]

Expand All @@ -71,7 +72,6 @@ line-length = 88
[tool.ruff]
line-length = 88
select = ["E", "F", "W", "I", "UP", "N", "B", "A", "C4", "SIM", "ARG"]
target-version = "py39"
ignore = [
"B006",
"B008",
Expand Down