Skip to content

Commit 151f5cb

Browse files
authored
Overhaul repo infrastructure (#353)
* ruff-en code base * remove versioneer * adopt pyproject.toml * clean up envs, etc. * update codecov * test again master and main libpysal (temp) * only test dev against libpysal@main * update other dev pins * add mapclassify, etc. to dev env * ensure all deps are installed in dev * re-ruff repo * ruff based on py39 * ruff based on py38 * resolve typing issues <3.9 [1] * resolve typing issues <3.9 [2] * address review comments
1 parent 9246839 commit 151f5cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+526
-3554
lines changed

.ci/310.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ dependencies:
1313
- scipy>=1.3.2
1414
- shapely
1515
- spaghetti
16-
- tqdm=>4.27.0
16+
- tqdm>=4.27.0
1717
# testing
1818
- codecov
1919
- coverage
2020
- pytest
2121
- pytest-cov
2222
- pytest-xdist
23+
# with pip
24+
- pip
25+
- pip:
26+
- pulp

.ci/311-DEV.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ channels:
33
- conda-forge
44
dependencies:
55
- python=3.11
6-
- geopandas>=0.10.0
6+
- geopandas
7+
- libpysal
78
- matplotlib
89
- networkx
910
- numpy>=1.21
1011
- pandas>=1.0.5
11-
- pip
1212
- scikit-learn>=0.22
1313
- scipy>=1.3.2
1414
- spaghetti
@@ -19,3 +19,12 @@ dependencies:
1919
- pytest
2020
- pytest-cov
2121
- pytest-xdist
22+
# with pip
23+
- pip
24+
- pip:
25+
- pulp
26+
- git+https://github.com/geopandas/geopandas.git
27+
- git+https://github.com/networkx/networkx.git
28+
- git+https://github.com/pysal/libpysal.git
29+
- git+https://github.com/pysal/mapclassify.git
30+
- git+https://github.com/pysal/spaghetti.git

.ci/311-DEV_shapely_dev.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.ci/311.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ channels:
33
- conda-forge
44
dependencies:
55
- python=3.11
6-
- geopandas>=0.10.0
6+
- geopandas
77
- libpysal
88
- matplotlib
99
- networkx
1010
- numpy>=1.21
1111
- pandas>=1.0.5
1212
- scikit-learn>=0.22
1313
- scipy>=1.3.2
14-
- shapely
1514
- spaghetti
1615
- tqdm=>4.27.0
1716
# testing
@@ -26,3 +25,8 @@ dependencies:
2625
- sphinx
2726
- sphinxcontrib-bibtex
2827
- sphinx_bootstrap_theme
28+
# with pip
29+
- pip
30+
- pip:
31+
- pulp
32+

.ci/38-MIN.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ dependencies:
1919
- pytest
2020
- pytest-cov
2121
- pytest-xdist
22+
# with pip
23+
- pip
24+
- pip:
25+
- pulp

.ci/39.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
dependencies:
55
- python=3.9
6-
- geopandas>=0.10.0
6+
- geopandas
77
- libpysal
88
- matplotlib
99
- networkx
@@ -20,3 +20,7 @@ dependencies:
2020
- pytest
2121
- pytest-cov
2222
- pytest-xdist
23+
# with pip
24+
- pip
25+
- pip:
26+
- pulp

.coveragerc

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/testing.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
runs-on: ${{ matrix.os }}
1717
timeout-minutes: 30
1818
env:
19-
RUN_TEST: pytest spopt -v -r a -n auto --cov spopt --cov-config .coveragerc --cov-report xml --color yes --cov-append --cov-report term-missing
19+
RUN_TEST: pytest spopt -v -r a -n auto --cov spopt --color yes --cov-report term-missing --cov-append --cov-report xml .
2020
strategy:
2121
matrix:
2222
os: [ubuntu-latest]
@@ -26,7 +26,6 @@
2626
.ci/310.yaml,
2727
.ci/311.yaml,
2828
.ci/311-DEV.yaml,
29-
.ci/311-DEV_shapely_dev.yaml,
3029
]
3130
include:
3231
- environment-file: .ci/311.yaml
@@ -45,15 +44,12 @@
4544
environment-file: ${{ matrix.environment-file }}
4645
micromamba-version: 'latest'
4746
channel-priority: 'flexible'
48-
49-
- name: install pulp via pip
50-
shell: bash -l {0}
51-
run: pip install pulp
52-
53-
- name: install bleeding edge libpysal (only Ubuntu w/ latest Python)
54-
shell: bash -l {0}
55-
run: pip install git+https://github.com/pysal/libpysal.git@master
56-
if: matrix.os == 'ubuntu-latest' && contains(matrix.environment-file, 'DEV')
47+
48+
##############################################################################
49+
#- name: install pulp via pip
50+
# shell: bash -l {0}
51+
# run: pip install pulp
52+
##############################################################################
5753

5854
- name: environment info
5955
shell: bash -l {0}
@@ -80,4 +76,14 @@
8076
with:
8177
token: ${{ secrets.CODECOV_TOKEN }}
8278
file: ./coverage.xml
83-
name: spot-codecov
79+
name: spopt-codecov
80+
81+
- name: Generate and publish the report
82+
if: |
83+
failure()
84+
&& steps.status.outcome == 'failure'
85+
&& github.event_name == 'schedule'
86+
&& github.repository_owner == 'pysal'
87+
uses: xarray-contrib/issue-from-pytest-log@v1
88+
with:
89+
log-path: pytest-log.jsonl

.github/workflows/versioneer.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,7 @@ lib
2525
lib64
2626
__pycache__
2727

28-
.coverage
28+
.coverage
29+
30+
.ruff_cache
31+
.pytest_cache

0 commit comments

Comments
 (0)