Skip to content

Commit 1afbb65

Browse files
authored
Merge pull request #47 from OvertureMaps/46-onboard-stac-check-validation
[FEATURE](ci) Validate STAC output with stac-check
2 parents 609d1ed + fd6e05c commit 1afbb65

6 files changed

Lines changed: 47 additions & 13 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set up Python
2828
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2929
with:
30-
python-version: "3.11"
30+
python-version-file: .python-version
3131

3232
- name: Install UV
3333
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
@@ -51,10 +51,10 @@ jobs:
5151
with:
5252
persist-credentials: false
5353

54-
- name: Set up Python 3.11
54+
- name: Set up Python
5555
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
5656
with:
57-
python-version: "3.11"
57+
python-version-file: .python-version
5858

5959
- name: Install UV
6060
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
@@ -79,7 +79,7 @@ jobs:
7979
- name: Set up Python
8080
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
8181
with:
82-
python-version: "3.11"
82+
python-version-file: .python-version
8383

8484
- name: Install UV
8585
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
@@ -98,12 +98,45 @@ jobs:
9898
python -c "from overture_stac.overture_stac import OvertureRelease; print('OvertureRelease imported')"
9999
python -c "from overture_stac.registry_manifest import RegistryManifest; print('RegistryManifest imported')"
100100
101+
stac-validate:
102+
name: STAC Validation
103+
runs-on: ubuntu-latest
104+
steps:
105+
- name: Checkout code
106+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
107+
with:
108+
persist-credentials: false
109+
110+
- name: Set up Python
111+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
112+
with:
113+
python-version-file: .python-version
114+
115+
- name: Install UV
116+
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
117+
118+
- name: Install dependencies
119+
run: uv sync --all-groups
120+
121+
- name: Generate local STAC catalog (debug mode)
122+
run: uv run python tests/setup_test_catalog.py --output tests/data --workers 2
123+
124+
- name: Validate root catalog
125+
uses: lowlydba/stac-check-action@3b06576bbf96c8d172f627c1639ac128f4fd7e38 # v1.0.0
126+
with:
127+
stac-check-version: "1.14.0"
128+
file: tests/data/catalog.json
129+
recursive: "true"
130+
fast-linting: "true"
131+
job-summary: "true"
132+
101133
all-checks-pass:
102134
name: All Checks Pass
103-
needs: [lint, test, test-package-install]
135+
needs: [lint, test, test-package-install, stac-validate]
104136
runs-on: ubuntu-latest
105137
if: always()
106138
steps:
107-
- uses: lowlydba/are-we-good@7efad05442f92a1203940ca8b79dd4fb930e75d4 # v1.0.2
139+
- uses: lowlydba/are-we-good@bb8ee9e793e4233fac1992bb880e2a28bed7f42f # v1.0.3
108140
with:
109141
jobs: ${{ toJSON(needs) }}
142+
allowed-to-fail: "stac-validate" #TODO: Remove after issues #48, 49, 50, 51 are resolved and this passes

.github/workflows/publish-stac.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
with:
3232
persist-credentials: false
3333

34-
- name: Set up Python 3.11
34+
- name: Set up Python
3535
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3636
with:
37-
python-version: "3.11"
37+
python-version-file: .python-version
3838

3939
- name: Install UV
4040
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0

.github/workflows/staging.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
with:
2424
persist-credentials: false
2525

26-
- name: Set up Python 3.11
26+
- name: Set up Python
2727
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2828
with:
29-
python-version: "3.11"
29+
python-version-file: .python-version
3030

3131
- name: Install UV
3232
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ dmypy.json
6060
.ipynb_checkpoints
6161

6262
# pyenv
63-
.python-version
63+
# .python-version is intentionally tracked — it is the canonical Python version pin for CI and uv
6464

6565
# UV
6666
.uv/

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.11

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ maintainers = [
1111
]
1212
readme = "README.md"
1313
license = {text = "MIT"}
14-
requires-python = ">=3.9"
14+
requires-python = ">=3.11"
1515
keywords = ["stac", "catalog", "overture", "geospatial", "metadata", "maps"]
1616
dependencies = [
1717
"pystac>=1.8.4",
@@ -58,7 +58,7 @@ filterwarnings = [
5858

5959
[tool.ruff]
6060
line-length = 88
61-
target-version = "py39"
61+
target-version = "py311"
6262

6363
[tool.ruff.lint]
6464
select = [

0 commit comments

Comments
 (0)