Skip to content

Commit 80b8f85

Browse files
CopilotRitesh313
andauthored
Fix failing GitHub Actions CI workflows (#6)
* Initial plan * Fix Black formatting and CI dependencies issues Co-authored-by: Ritesh313 <36135489+Ritesh313@users.noreply.github.com> * Add comprehensive CI with processing dependencies and update Python requirements Co-authored-by: Ritesh313 <36135489+Ritesh313@users.noreply.github.com> * Fix rpy2 build issue by adding libtirpc-dev dependency Co-authored-by: Ritesh313 <36135489+Ritesh313@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Ritesh313 <36135489+Ritesh313@users.noreply.github.com>
1 parent 4aaa160 commit 80b8f85

3 files changed

Lines changed: 41 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest]
15-
python-version: ['3.9', '3.10', '3.11', '3.12']
15+
python-version: ['3.10', '3.11', '3.12']
1616

1717
steps:
1818
- uses: actions/checkout@v4
@@ -27,7 +27,7 @@ jobs:
2727

2828
- name: Install dependencies
2929
run: |
30-
uv sync --all-extras
30+
uv sync --extra dev --extra logging
3131
3232
- name: Test imports
3333
run: |
@@ -41,6 +41,41 @@ jobs:
4141
- name: Run tests
4242
run: uv run pytest tests/ -v --tb=short
4343

44+
test-with-processing:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- name: Set up Python
50+
uses: actions/setup-python@v4
51+
with:
52+
python-version: '3.11'
53+
54+
- name: Install R and development dependencies
55+
run: |
56+
sudo apt-get update
57+
sudo apt-get install -y r-base r-base-dev libtirpc-dev
58+
59+
- name: Install uv
60+
run: pip install uv
61+
62+
- name: Install all dependencies including processing
63+
run: |
64+
uv sync --all-extras
65+
66+
- name: Test processing imports
67+
run: |
68+
uv run python -c "
69+
import neon_tree_classification
70+
from neon_tree_classification import NeonCrownDataset
71+
print('Core imports successful!')
72+
try:
73+
import rpy2
74+
print('Processing dependencies (rpy2) available!')
75+
except ImportError as e:
76+
print(f'Processing dependencies not available: {e}')
77+
"
78+
4479
lint:
4580
runs-on: ubuntu-latest
4681
steps:

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ authors = [
1111
]
1212
license = {text = "MIT"}
1313
readme = "README.md"
14-
requires-python = ">=3.9"
14+
requires-python = ">=3.10"
1515
keywords = ["neon", "tree-species", "classification", "remote-sensing", "hyperspectral", "lidar", "pytorch-lightning"]
1616
classifiers = [
1717
"Development Status :: 4 - Beta",
1818
"Intended Audience :: Science/Research",
1919
"License :: OSI Approved :: MIT License",
2020
"Operating System :: OS Independent",
2121
"Programming Language :: Python :: 3",
22-
"Programming Language :: Python :: 3.9",
2322
"Programming Language :: Python :: 3.10",
2423
"Programming Language :: Python :: 3.11",
2524
"Programming Language :: Python :: 3.12",
@@ -88,7 +87,7 @@ include = ["neon_tree_classification*"]
8887

8988
[tool.black]
9089
line-length = 88
91-
target-version = ['py39', 'py310', 'py311', 'py312']
90+
target-version = ['py310', 'py311', 'py312']
9291
include = '\.pyi?$'
9392
extend-exclude = '''
9493
/(
@@ -118,7 +117,7 @@ filterwarnings = [
118117
]
119118

120119
[tool.ruff]
121-
target-version = "py39"
120+
target-version = "py310"
122121
line-length = 88
123122
select = [
124123
"E", # pycodestyle errors

scripts/get_dataloaders.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@
3737
from neon_tree_classification.core.dataset import NeonCrownDataset
3838

3939

40-
DATASET_URL = (
41-
"https://www.dropbox.com/scl/fi/v49xi6d7wtetctqphebx0/neon_tree_classification_dataset.zip?rlkey=fb7bz6kd0ckip4u0qd5xdor58&st=dvjyd5ry&dl=1"
42-
)
40+
DATASET_URL = "https://www.dropbox.com/scl/fi/v49xi6d7wtetctqphebx0/neon_tree_classification_dataset.zip?rlkey=fb7bz6kd0ckip4u0qd5xdor58&st=dvjyd5ry&dl=1"
4341

4442

4543
def _dataset_exists(dataset_dir: Path) -> bool:

0 commit comments

Comments
 (0)