Skip to content

Commit e86fb4d

Browse files
authored
Coerce SPE to SFE (#8)
- Supporting dolomite/alabaster workflows and refactoring image classes - Coerce spatial experiment to spatial feature experiment - Migrate to the newer github actions - Update typehints, docs and tests
1 parent 4488f04 commit e86fb4d

File tree

10 files changed

+1414
-368
lines changed

10 files changed

+1414
-368
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ jobs:
2424
with:
2525
python-version: 3.11
2626

27+
- name: Install system dependencies
28+
run: |
29+
sudo apt-get install libxml2-dev libxslt-dev
30+
2731
- name: Install dependencies
2832
run: |
2933
python -m pip install --upgrade pip

.github/workflows/run-tests.yml

Lines changed: 59 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,77 @@
1-
name: Run tests
1+
name: Test the library
22

33
on:
44
push:
5-
branches: [master]
5+
branches:
6+
- master # for legacy repos
7+
- main
68
pull_request:
7-
branches: [master]
9+
branches:
10+
- master # for legacy repos
11+
- main
12+
workflow_dispatch: # Allow manually triggering the workflow
13+
schedule:
14+
# Run roughly every 15 days at 00:00 UTC
15+
# (useful to check if updates on dependencies break the package)
16+
- cron: "0 0 1,16 * *"
17+
18+
permissions:
19+
contents: read
20+
21+
concurrency:
22+
group: >-
23+
${{ github.workflow }}-${{ github.ref_type }}-
24+
${{ github.event.pull_request.number || github.sha }}
25+
cancel-in-progress: true
826

927
jobs:
10-
build:
11-
runs-on: ubuntu-latest
28+
test:
1229
strategy:
1330
matrix:
14-
python-version: ["3.9", "3.10", "3.11", "3.12"]
15-
16-
name: Python ${{ matrix.python-version }}
31+
python: ["3.9", "3.10", "3.11", "3.12"] # , "3.13"
32+
platform:
33+
- ubuntu-latest
34+
# - macos-latest
35+
# - windows-latest
36+
runs-on: ${{ matrix.platform }}
37+
name: Python ${{ matrix.python }}, ${{ matrix.platform }}
1738
steps:
1839
- uses: actions/checkout@v4
1940

20-
- name: Setup Python
21-
uses: actions/setup-python@v5
41+
- uses: actions/setup-python@v5
42+
id: setup-python
2243
with:
23-
python-version: ${{ matrix.python-version }}
24-
cache: "pip"
44+
python-version: ${{ matrix.python }}
45+
46+
- name: Install system dependencies
47+
run: |
48+
sudo apt-get install libxml2-dev libxslt-dev
2549
2650
- name: Install dependencies
2751
run: |
2852
python -m pip install --upgrade pip
29-
pip install tox
53+
pip install tox coverage
3054
31-
- name: Test with tox
32-
run: |
55+
- name: Run tests
56+
run: >-
57+
pipx run --python '${{ steps.setup-python.outputs.python-path }}'
3358
tox
59+
-- -rFEx --durations 10 --color yes --cov --cov-branch --cov-report=xml # pytest args
60+
61+
- name: Check for codecov token availability
62+
id: codecov-check
63+
shell: bash
64+
run: |
65+
if [ ${{ secrets.CODECOV_TOKEN }} != '' ]; then
66+
echo "codecov=true" >> $GITHUB_OUTPUT;
67+
else
68+
echo "codecov=false" >> $GITHUB_OUTPUT;
69+
fi
70+
71+
- name: Upload coverage reports to Codecov with GitHub Action
72+
uses: codecov/codecov-action@v5
73+
if: ${{ steps.codecov-check.outputs.codecov == 'true' }}
74+
env:
75+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
76+
slug: ${{ github.repository }}
77+
flags: ${{ matrix.platform }} - py${{ matrix.python }}

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Version 0.0.3
4+
5+
- Supporting dolomite/alabaster workflows and refactoring image classes
6+
- Coerce spatial experiment to spatial feature experiment
7+
- Migrate to the newer github actions
8+
39
## Version 0.0.1 - 0.0.2
410

511
- Migrating the class from the SpatialExperiment package

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ version_scheme = "no-guess-dev"
1212
line-length = 120
1313
src = ["src"]
1414
exclude = ["tests"]
15-
extend-ignore = ["F821"]
15+
lint.extend-ignore = ["F821"]
1616

17-
[tool.ruff.pydocstyle]
17+
[tool.ruff.lint.pydocstyle]
1818
convention = "google"
1919

2020
[tool.ruff.format]
2121
docstring-code-format = true
2222
docstring-code-line-length = 20
2323

24-
[tool.ruff.per-file-ignores]
24+
[tool.ruff.lint.per-file-ignores]
2525
"__init__.py" = ["E402", "F401"]

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ install_requires =
5757
rasterio
5858
aicsimageio
5959
numcodecs<=0.15.1
60+
libpysal
6061

6162
[options.packages.find]
6263
where = src

0 commit comments

Comments
 (0)