Skip to content

Commit

Permalink
add 310 to CI matrix (#208)
Browse files Browse the repository at this point in the history
* add 310 to CI matrix

* resolve collections.Iterable failure

* slim down testing matrix

* path correction

* streamline matrix logic
  • Loading branch information
jGaboardi authored Dec 24, 2021
1 parent e231ce0 commit 1abfc56
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .ci/39-DEV.yaml → .ci/310-DEV.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: test
channels:
- conda-forge
dependencies:
- python=3.9
- python=3.10
- geopandas>=0.7.0
- matplotlib
- networkx
Expand Down
27 changes: 27 additions & 0 deletions .ci/310.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: test
channels:
- conda-forge
dependencies:
- python=3.10
- geopandas>=0.7.0
- libpysal
- matplotlib
- networkx
- numpy>=1.3
- pandas>=1
- scikit-learn>=0.22
- scipy>=1.0
- shapely
- spenc
- spaghetti
# testing
- codecov
- coverage
- pytest
- pytest-cov
# docs
- nbsphinx
- numpydoc
- sphinx
- sphinxcontrib-bibtex
- sphinx_bootstrap_theme
12 changes: 7 additions & 5 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
timeout-minutes: 30
strategy:
matrix:
os: ['macos-latest', 'ubuntu-latest', 'windows-latest']
environment-file: [.ci/37.yaml, .ci/38.yaml, .ci/39.yaml]
os: [ubuntu-latest]
environment-file: [.ci/37.yaml, .ci/38.yaml, .ci/39.yaml, .ci/310.yaml, .ci/310-DEV.yaml]
include:
- environment-file: .ci/39-DEV.yaml
os: ubuntu-latest
- environment-file: .ci/310.yaml
os: macos-latest
- environment-file: .ci/310.yaml
os: windows-latest

steps:
- name: checkout repo
Expand All @@ -34,7 +36,7 @@
shell: bash -l {0}
run: pip install pulp

- name: install bleeding edge libpysal (only Ubuntu / Python 3.9)
- name: install bleeding edge libpysal (only Ubuntu / Python 3.10)
shell: bash -l {0}
run: pip install git+https://github.com/pysal/libpysal.git@master
if: matrix.os == 'ubuntu-latest' && contains(matrix.environment-file, 'DEV')
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def setup_package():
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
license="3-Clause BSD",
packages=find_packages(),
Expand Down
2 changes: 1 addition & 1 deletion spopt/region/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def array_from_dict_values(dct, sorted_keys=None, flat_output=False, dtype=np.fl
"""
if sorted_keys is None:
sorted_keys = sorted(dct)
iterable_values = isinstance(dct[sorted_keys[0]], collections.Iterable)
iterable_values = isinstance(dct[sorted_keys[0]], collections.abc.Iterable)
if iterable_values:
it = itertools.chain.from_iterable(dct[key] for key in sorted_keys)
else:
Expand Down

0 comments on commit 1abfc56

Please sign in to comment.