spectraccess 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spectraccess-0.1.0/.github/workflows/ci.yml +27 -0
- spectraccess-0.1.0/.github/workflows/commit-messages.yml +53 -0
- spectraccess-0.1.0/.github/workflows/live-smoke.yml +91 -0
- spectraccess-0.1.0/.github/workflows/publish.yml +81 -0
- spectraccess-0.1.0/.gitignore +18 -0
- spectraccess-0.1.0/.release-please-manifest.json +1 -0
- spectraccess-0.1.0/CHANGELOG.md +52 -0
- spectraccess-0.1.0/CITATION.cff +9 -0
- spectraccess-0.1.0/CONTRIBUTING.md +32 -0
- spectraccess-0.1.0/LICENSE +203 -0
- spectraccess-0.1.0/OVERVIEW.md +164 -0
- spectraccess-0.1.0/PKG-INFO +208 -0
- spectraccess-0.1.0/pyproject.toml +90 -0
- spectraccess-0.1.0/release-please-config.json +15 -0
- spectraccess-0.1.0/scripts/live_smoke.py +353 -0
- spectraccess-0.1.0/src/spectraccess/__init__.py +11 -0
- spectraccess-0.1.0/src/spectraccess/connectors/__init__.py +2 -0
- spectraccess-0.1.0/src/spectraccess/connectors/aeronet/DATA_TERMS.md +24 -0
- spectraccess-0.1.0/src/spectraccess/connectors/aeronet/__init__.py +23 -0
- spectraccess-0.1.0/src/spectraccess/connectors/aeronet/connector.py +286 -0
- spectraccess-0.1.0/src/spectraccess/connectors/cams/DATA_TERMS.md +16 -0
- spectraccess-0.1.0/src/spectraccess/connectors/cams/__init__.py +43 -0
- spectraccess-0.1.0/src/spectraccess/connectors/cams/connector.py +847 -0
- spectraccess-0.1.0/src/spectraccess/connectors/cams/overlap.py +161 -0
- spectraccess-0.1.0/src/spectraccess/connectors/emit_earthaccess/DATA_TERMS.md +21 -0
- spectraccess-0.1.0/src/spectraccess/connectors/emit_earthaccess/__init__.py +21 -0
- spectraccess-0.1.0/src/spectraccess/connectors/emit_earthaccess/connector.py +636 -0
- spectraccess-0.1.0/src/spectraccess/connectors/gsics/DATA_TERMS.md +36 -0
- spectraccess-0.1.0/src/spectraccess/connectors/gsics/__init__.py +3 -0
- spectraccess-0.1.0/src/spectraccess/connectors/gsics/connector.py +464 -0
- spectraccess-0.1.0/src/spectraccess/connectors/landsat_eodag/DATA_TERMS.md +14 -0
- spectraccess-0.1.0/src/spectraccess/connectors/landsat_eodag/__init__.py +22 -0
- spectraccess-0.1.0/src/spectraccess/connectors/landsat_eodag/connector.py +596 -0
- spectraccess-0.1.0/src/spectraccess/connectors/modis_viirs_cal/DATA_TERMS.md +10 -0
- spectraccess-0.1.0/src/spectraccess/connectors/modis_viirs_cal/__init__.py +4 -0
- spectraccess-0.1.0/src/spectraccess/connectors/modis_viirs_cal/connector.py +105 -0
- spectraccess-0.1.0/src/spectraccess/connectors/radcalnet/DATA_TERMS.md +56 -0
- spectraccess-0.1.0/src/spectraccess/connectors/radcalnet/__init__.py +16 -0
- spectraccess-0.1.0/src/spectraccess/connectors/radcalnet/connector.py +760 -0
- spectraccess-0.1.0/src/spectraccess/connectors/sentinel2_cdse/DATA_TERMS.md +20 -0
- spectraccess-0.1.0/src/spectraccess/connectors/sentinel2_cdse/__init__.py +23 -0
- spectraccess-0.1.0/src/spectraccess/connectors/sentinel2_cdse/connector.py +638 -0
- spectraccess-0.1.0/src/spectraccess/connectors/thredds.py +197 -0
- spectraccess-0.1.0/src/spectraccess/core/__init__.py +24 -0
- spectraccess-0.1.0/src/spectraccess/core/assumptions.py +46 -0
- spectraccess-0.1.0/src/spectraccess/core/connector.py +100 -0
- spectraccess-0.1.0/src/spectraccess/core/fetch.py +69 -0
- spectraccess-0.1.0/src/spectraccess/core/schema.py +273 -0
- spectraccess-0.1.0/src/spectraccess/core/session.py +59 -0
- spectraccess-0.1.0/src/spectraccess/py.typed +0 -0
- spectraccess-0.1.0/tests/fixtures/README.md +56 -0
- spectraccess-0.1.0/tests/fixtures/aeronet/Granada_2024_06_15_L2.0.csv +10 -0
- spectraccess-0.1.0/tests/fixtures/aeronet/Ispra_2024_07_15_L2.0.csv +10 -0
- spectraccess-0.1.0/tests/fixtures/gsics_coefficients.csv +4 -0
- spectraccess-0.1.0/tests/fixtures/gsics_msg4_seviri_metopb_iasi_nrtc_20260704.nc +0 -0
- spectraccess-0.1.0/tests/fixtures/radcalnet/GSCN01_2025_334_v04.05.output +46 -0
- spectraccess-0.1.0/tests/fixtures/sentinel2_cdse/S2B_T31UFT_20240501_feature.json +47 -0
- spectraccess-0.1.0/tests/fixtures/viirs_factors.csv +4 -0
- spectraccess-0.1.0/tests/test_cams.py +682 -0
- spectraccess-0.1.0/tests/test_connectors.py +855 -0
- spectraccess-0.1.0/tests/test_core.py +70 -0
- spectraccess-0.1.0/tests/test_emit_earthaccess.py +350 -0
- spectraccess-0.1.0/tests/test_landsat_eodag.py +254 -0
- spectraccess-0.1.0/tests/test_schema.py +209 -0
- spectraccess-0.1.0/tests/test_sentinel2_cdse.py +338 -0
- spectraccess-0.1.0/tests/test_thredds.py +140 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
tests:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
# Every version requires-python and the classifiers promise.
|
|
17
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
- name: Install
|
|
24
|
+
run: python -m pip install -e ".[test]"
|
|
25
|
+
- name: Run fixture tests
|
|
26
|
+
run: pytest
|
|
27
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Commit messages
|
|
2
|
+
|
|
3
|
+
# release-please builds versions and release notes from commit subjects, so
|
|
4
|
+
# every non-merge commit must follow Conventional Commits (see CONTRIBUTING.md).
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
pull_request:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
conventional-commits:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
- name: Check commit subjects
|
|
21
|
+
env:
|
|
22
|
+
EVENT: ${{ github.event_name }}
|
|
23
|
+
PUSH_BEFORE: ${{ github.event.before }}
|
|
24
|
+
PUSH_AFTER: ${{ github.event.after }}
|
|
25
|
+
PR_BASE: ${{ github.event.pull_request.base.sha }}
|
|
26
|
+
PR_HEAD: ${{ github.event.pull_request.head.sha }}
|
|
27
|
+
run: |
|
|
28
|
+
if [ "$EVENT" = "pull_request" ]; then
|
|
29
|
+
range="$PR_BASE..$PR_HEAD"
|
|
30
|
+
elif [ -z "${PUSH_BEFORE//0/}" ]; then
|
|
31
|
+
echo "New branch or tag push: no previous head to compare against; skipping."
|
|
32
|
+
exit 0
|
|
33
|
+
elif ! git cat-file -e "$PUSH_BEFORE^{commit}" 2>/dev/null; then
|
|
34
|
+
echo "Previous head $PUSH_BEFORE is not in history (force push); skipping."
|
|
35
|
+
exit 0
|
|
36
|
+
else
|
|
37
|
+
range="$PUSH_BEFORE..$PUSH_AFTER"
|
|
38
|
+
fi
|
|
39
|
+
pattern='^(feat|fix|docs|chore|ci|build|refactor|test|perf|style|revert)(\([A-Za-z0-9._/-]+\))?!?: [^ ].*$'
|
|
40
|
+
bad=0
|
|
41
|
+
while IFS= read -r line; do
|
|
42
|
+
sha="${line%% *}"
|
|
43
|
+
subject="${line#* }"
|
|
44
|
+
if ! printf '%s\n' "$subject" | grep -Eq "$pattern"; then
|
|
45
|
+
echo "::error::${sha:0:12} does not follow Conventional Commits: $subject"
|
|
46
|
+
bad=1
|
|
47
|
+
fi
|
|
48
|
+
done < <(git log --no-merges --format='%H %s' "$range")
|
|
49
|
+
if [ "$bad" -ne 0 ]; then
|
|
50
|
+
echo "Expected 'type(scope)?!?: subject' with type one of feat, fix, docs, chore, ci, build, refactor, test, perf, style, revert." >&2
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
echo "All commit subjects in $range follow Conventional Commits."
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
name: Live connector smoke tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "17 3 * * 1"
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
issues: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
smoke:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
connector:
|
|
19
|
+
[gsics, modis_viirs_cal, radcalnet, sentinel2_cdse, aeronet, cams, emit_earthaccess, landsat_eodag]
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
- name: Install
|
|
26
|
+
# The test extra carries every connector's maintained client
|
|
27
|
+
# (cdsetool, cdsapi, earthaccess on 3.12+, eodag[usgs]).
|
|
28
|
+
run: python -m pip install -e ".[test]"
|
|
29
|
+
- name: Run live smoke
|
|
30
|
+
id: smoke
|
|
31
|
+
continue-on-error: true
|
|
32
|
+
# GSICS catalog vars are optional overrides: the connector ships live
|
|
33
|
+
# defaults for EUMETSAT + CMA, so these only need to be set to point
|
|
34
|
+
# at a different catalog URL (e.g. once NOAA STAR is reachable again).
|
|
35
|
+
# VIIRS has no live default yet, so its var remains required for that
|
|
36
|
+
# smoke to do anything.
|
|
37
|
+
env:
|
|
38
|
+
SPECTRACCESS_GSICS_EUMETSAT_CATALOG_URL: ${{ vars.SPECTRACCESS_GSICS_EUMETSAT_CATALOG_URL }}
|
|
39
|
+
SPECTRACCESS_GSICS_NOAA_STAR_CATALOG_URL: ${{ vars.SPECTRACCESS_GSICS_NOAA_STAR_CATALOG_URL }}
|
|
40
|
+
SPECTRACCESS_GSICS_CMA_CATALOG_URL: ${{ vars.SPECTRACCESS_GSICS_CMA_CATALOG_URL }}
|
|
41
|
+
SPECTRACCESS_VIIRS_CATALOG_URL: ${{ vars.SPECTRACCESS_VIIRS_CATALOG_URL }}
|
|
42
|
+
# BYO-credentials: the radcalnet smoke prints SKIP and exits 0 until
|
|
43
|
+
# these repo secrets are configured (a free RadCalNet portal account).
|
|
44
|
+
RADCALNET_USERNAME: ${{ secrets.RADCALNET_USERNAME }}
|
|
45
|
+
RADCALNET_PASSWORD: ${{ secrets.RADCALNET_PASSWORD }}
|
|
46
|
+
# BYO-credentials: the landsat_eodag smoke prints SKIP and exits 0
|
|
47
|
+
# until these repo secrets are set (USGS EarthExplorer username and
|
|
48
|
+
# M2M application token; USGS needs them even for search). Names are
|
|
49
|
+
# EODAG's own USGS credential variables, read by the connector.
|
|
50
|
+
EODAG__USGS__API__CREDENTIALS__USERNAME: ${{ secrets.EODAG__USGS__API__CREDENTIALS__USERNAME }}
|
|
51
|
+
EODAG__USGS__API__CREDENTIALS__PASSWORD: ${{ secrets.EODAG__USGS__API__CREDENTIALS__PASSWORD }}
|
|
52
|
+
# BYO-credentials: the cams smoke always checks the public JASMIN
|
|
53
|
+
# mirror; its ADS half prints SKIP until this repo secret is set
|
|
54
|
+
# (free ADS account personal access token).
|
|
55
|
+
ADS_TOKEN: ${{ secrets.ADS_TOKEN }}
|
|
56
|
+
run: python scripts/live_smoke.py "${{ matrix.connector }}"
|
|
57
|
+
- name: Open or update upstream-back issue
|
|
58
|
+
# The modis_viirs_cal smoke skips while NOAA STAR THREDDS is down but
|
|
59
|
+
# probes it every week; when it answers, say so in an issue. Never
|
|
60
|
+
# fails the job.
|
|
61
|
+
if: matrix.connector == 'modis_viirs_cal' && steps.smoke.outputs.star_thredds == 'reachable'
|
|
62
|
+
continue-on-error: true
|
|
63
|
+
env:
|
|
64
|
+
GH_TOKEN: ${{ github.token }}
|
|
65
|
+
run: |
|
|
66
|
+
title="upstream-back: NOAA STAR THREDDS reachable"
|
|
67
|
+
body="Weekly live smoke found https://www.star.nesdis.noaa.gov/thredds/gsics/catalog.xml serving a THREDDS catalog again in ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}. Verify the NOAA STAR GSICS and VIIRS F-factor catalog URLs, then configure SPECTRACCESS_VIIRS_CATALOG_URL / the GSICS NOAA STAR default."
|
|
68
|
+
gh label create upstream-back --description "An upstream portal that was down answers again" --color 0E8A16 --force
|
|
69
|
+
existing="$(gh issue list --state open --label upstream-back --search "$title in:title" --json number --jq '.[0].number')"
|
|
70
|
+
if [ -n "$existing" ]; then
|
|
71
|
+
gh issue comment "$existing" --body "$body"
|
|
72
|
+
else
|
|
73
|
+
gh issue create --title "$title" --label upstream-back --body "$body"
|
|
74
|
+
fi
|
|
75
|
+
- name: Open or update connector-broken issue
|
|
76
|
+
if: steps.smoke.outcome == 'failure'
|
|
77
|
+
env:
|
|
78
|
+
GH_TOKEN: ${{ github.token }}
|
|
79
|
+
CONNECTOR: ${{ matrix.connector }}
|
|
80
|
+
run: |
|
|
81
|
+
title="connector-broken: ${CONNECTOR}"
|
|
82
|
+
body="Weekly live smoke failed for ${CONNECTOR} in ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}."
|
|
83
|
+
# Fresh repos have no such label; --force makes this idempotent.
|
|
84
|
+
gh label create connector-broken --description "A connector's live portal smoke test is failing" --color B60205 --force
|
|
85
|
+
existing="$(gh issue list --state open --label connector-broken --search "$title in:title" --json number --jq '.[0].number')"
|
|
86
|
+
if [ -n "$existing" ]; then
|
|
87
|
+
gh issue comment "$existing" --body "$body"
|
|
88
|
+
else
|
|
89
|
+
gh issue create --title "$title" --label connector-broken --body "$body"
|
|
90
|
+
fi
|
|
91
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: Release and publish to PyPI
|
|
2
|
+
|
|
3
|
+
# One workflow on purpose: a GitHub Release created with GITHUB_TOKEN does not
|
|
4
|
+
# trigger `release: published` in other workflows, so release-please and the
|
|
5
|
+
# PyPI upload must run in the same run. Keep this filename and the `pypi`
|
|
6
|
+
# environment: the PyPI trusted-publisher registration names both.
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches: [main]
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
release-please:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
permissions:
|
|
19
|
+
contents: write
|
|
20
|
+
pull-requests: write
|
|
21
|
+
outputs:
|
|
22
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
23
|
+
tag_name: ${{ steps.release.outputs.tag_name }}
|
|
24
|
+
steps:
|
|
25
|
+
# Opens or updates the release PR from Conventional Commits; when that PR
|
|
26
|
+
# is merged, tags v<version> and creates the GitHub Release.
|
|
27
|
+
- uses: googleapis/release-please-action@v4
|
|
28
|
+
id: release
|
|
29
|
+
with:
|
|
30
|
+
config-file: release-please-config.json
|
|
31
|
+
manifest-file: .release-please-manifest.json
|
|
32
|
+
|
|
33
|
+
build:
|
|
34
|
+
needs: release-please
|
|
35
|
+
if: ${{ needs.release-please.outputs.release_created == 'true' }}
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
|
+
with:
|
|
40
|
+
ref: ${{ needs.release-please.outputs.tag_name }}
|
|
41
|
+
- uses: actions/setup-python@v5
|
|
42
|
+
with:
|
|
43
|
+
python-version: "3.12"
|
|
44
|
+
- name: Release tag matches the package version
|
|
45
|
+
env:
|
|
46
|
+
TAG: ${{ needs.release-please.outputs.tag_name }}
|
|
47
|
+
run: |
|
|
48
|
+
version=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
|
|
49
|
+
if [ "$TAG" != "v$version" ]; then
|
|
50
|
+
echo "Release tag $TAG does not match pyproject version v$version" >&2
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
- name: Install build backend
|
|
54
|
+
run: python -m pip install build
|
|
55
|
+
- name: Build sdist and wheel
|
|
56
|
+
run: python -m build
|
|
57
|
+
- uses: actions/upload-artifact@v4
|
|
58
|
+
with:
|
|
59
|
+
name: dist
|
|
60
|
+
path: dist/
|
|
61
|
+
|
|
62
|
+
publish:
|
|
63
|
+
needs: build
|
|
64
|
+
runs-on: ubuntu-latest
|
|
65
|
+
environment:
|
|
66
|
+
name: pypi
|
|
67
|
+
url: https://pypi.org/p/spectraccess
|
|
68
|
+
permissions:
|
|
69
|
+
# Required for PyPI trusted publishing (OIDC). No API token/secret
|
|
70
|
+
# is stored in this repo: PyPI exchanges this token for a short-lived
|
|
71
|
+
# upload credential based on the publisher registered for this project
|
|
72
|
+
# (owner, repository, workflow filename publish.yml, and environment
|
|
73
|
+
# name pypi must match exactly).
|
|
74
|
+
id-token: write
|
|
75
|
+
steps:
|
|
76
|
+
- uses: actions/download-artifact@v4
|
|
77
|
+
with:
|
|
78
|
+
name: dist
|
|
79
|
+
path: dist/
|
|
80
|
+
- name: Publish to PyPI
|
|
81
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{".":"0.1.0"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to spectrAccess are documented in this file.
|
|
4
|
+
|
|
5
|
+
Release entries are generated by release-please from Conventional Commit
|
|
6
|
+
messages (see CONTRIBUTING.md), and this project adheres to
|
|
7
|
+
[Semantic Versioning](https://semver.org/).
|
|
8
|
+
|
|
9
|
+
## 0.1.0 (2026-09-26)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **cams:** read cache dir and fallback mirror from SPECTRACCESS_* env vars ([75abb85](https://github.com/SpectraWorksOSS/SpectrAccess/commit/75abb8574a0288cda0b0af7808995617876602b2))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Documentation
|
|
18
|
+
|
|
19
|
+
* rename front page to OVERVIEW.md ([9f81522](https://github.com/SpectraWorksOSS/SpectrAccess/commit/9f81522a20a0ec19cfd4d2933cbd445d8a9d7240))
|
|
20
|
+
* state live-verification honestly; release 0.1.0 via one-shot footer ([00b87b9](https://github.com/SpectraWorksOSS/SpectrAccess/commit/00b87b9029a3d06e3d20f72a9cd28030bd993120))
|
|
21
|
+
|
|
22
|
+
### 0.1.0 scope: initial public release
|
|
23
|
+
|
|
24
|
+
#### Added
|
|
25
|
+
|
|
26
|
+
- Core `Connector` interface (`discover()`, `fetch()`, `parse()`, `run()`) for
|
|
27
|
+
source-specific spectral reference data adapters.
|
|
28
|
+
- Canonical long/tidy schema v1.0 (`spectraccess.core.schema`): one row per
|
|
29
|
+
quantity value with an uncertainty record whose status (`provided`,
|
|
30
|
+
`derived`, `prior`, `unknown`) is never null, even when the value is.
|
|
31
|
+
- GSICS connector for GPPA inter-calibration products (EUMETSAT and CMA
|
|
32
|
+
catalogs; NOAA STAR as an optional override).
|
|
33
|
+
- VIIRS calibration connector shape (NOAA STAR F-factor catalog pending
|
|
34
|
+
verification; MODIS planned).
|
|
35
|
+
- RadCalNet connector on the official JSON API with BYO portal credentials,
|
|
36
|
+
including per-wavelength uncertainties mapped to `provided` / `prior`;
|
|
37
|
+
`.output` files parse to `toa_reflectance`, `.input` files to
|
|
38
|
+
`surface_reflectance`.
|
|
39
|
+
- NASA AERONET v3 connector for the public web service, with a 550 nm AOD
|
|
40
|
+
interpolation helper.
|
|
41
|
+
- Sentinel-2 L1C discovery and download via CDSETool (`spectraccess[cdse]`).
|
|
42
|
+
- CAMS EAC4 access via the JASMIN mirror and ECMWF's ADS API, plus explicit
|
|
43
|
+
CAMS forecast products (`spectraccess[cams]`).
|
|
44
|
+
- NASA EMIT L1B/L2A discovery and download via earthaccess
|
|
45
|
+
(`spectraccess[emit]`, requires Python 3.12 or newer).
|
|
46
|
+
- Landsat 8/9 Collection-2 L1TP discovery and download via EODAG/USGS
|
|
47
|
+
(`spectraccess[landsat]`); area searches skip non-L1TP products the
|
|
48
|
+
provider returns alongside.
|
|
49
|
+
- Weekly live-smoke workflow that opens or updates a `connector-broken` issue
|
|
50
|
+
when a portal stops answering as expected.
|
|
51
|
+
- Fixture-based CI test suite on Python 3.10 to 3.13.
|
|
52
|
+
- `py.typed` marker: the public API ships inline type hints.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use spectrAccess, please cite it as below."
|
|
3
|
+
title: "spectrAccess"
|
|
4
|
+
authors:
|
|
5
|
+
- name: "SpectraWorks B.V."
|
|
6
|
+
version: "0.1.0" # x-release-please-version
|
|
7
|
+
license: "Apache-2.0"
|
|
8
|
+
repository-code: "https://github.com/SpectraWorksOSS/SpectrAccess"
|
|
9
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Community contributions are welcome, especially new connectors for spectral reference data portals that lack maintained Python access layers.
|
|
4
|
+
|
|
5
|
+
## Add a Connector
|
|
6
|
+
|
|
7
|
+
1. Create a package under `src/spectraccess/connectors/<source_name>/`.
|
|
8
|
+
2. Implement the `spectraccess.core.connector.Connector` interface:
|
|
9
|
+
`discover()` lists available targets, `fetch()` retrieves raw bytes or files,
|
|
10
|
+
and `parse()` converts raw content into a tidy `pandas.DataFrame` or
|
|
11
|
+
`xarray.Dataset`.
|
|
12
|
+
3. Add a `DATA_TERMS.md` file in the connector package describing the source
|
|
13
|
+
portal's data license or terms of use. The Apache-2.0 project license covers
|
|
14
|
+
code only, not source data.
|
|
15
|
+
4. Add fixture-based tests under `tests/` using small recorded files checked
|
|
16
|
+
into `tests/fixtures/`. Default pytest runs must not make live network calls.
|
|
17
|
+
5. Add or update live-smoke coverage in `.github/workflows/live-smoke.yml` for
|
|
18
|
+
public endpoints that should be monitored weekly.
|
|
19
|
+
|
|
20
|
+
Do not hardcode credentials or redistribute third-party data through this
|
|
21
|
+
project. Connectors should use the BYO-credentials helpers in
|
|
22
|
+
`spectraccess.core.session` when authentication is required.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## Commit Messages
|
|
26
|
+
|
|
27
|
+
Commit subjects follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
28
|
+
`type(scope)!: subject`, with type one of `feat`, `fix`, `docs`, `chore`, `ci`,
|
|
29
|
+
`build`, `refactor`, `test`, `perf`, `style`, `revert`; `!` marks a breaking change.
|
|
30
|
+
CI rejects other subjects. Versions, `CHANGELOG.md` entries, and GitHub Releases
|
|
31
|
+
are generated from these messages by release-please; do not bump the version or
|
|
32
|
+
write release entries by hand.
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright 2026 SpectraWorks B.V.
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the work
|
|
40
|
+
(an example is provided in the Appendix below).
|
|
41
|
+
|
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
48
|
+
the Work and Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or additions
|
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
63
|
+
|
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
66
|
+
subsequently incorporated within the Work.
|
|
67
|
+
|
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
|
74
|
+
|
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
patent license to make, have made, use, offer to sell, sell, import,
|
|
79
|
+
and otherwise transfer the Work, where such license applies only to
|
|
80
|
+
those patent claims licensable by such Contributor that are necessarily
|
|
81
|
+
infringed by their Contribution(s) alone or by combination of their
|
|
82
|
+
Contribution(s) with the Work to which such Contribution(s) was
|
|
83
|
+
submitted. If You institute patent litigation against any entity
|
|
84
|
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
85
|
+
the Work or a Contribution incorporated within the Work constitutes
|
|
86
|
+
direct or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate as of
|
|
88
|
+
the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
|
160
|
+
incidental, or consequential damages of any character arising as a
|
|
161
|
+
result of this License or out of the use or inability to use the
|
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
164
|
+
other commercial damages or losses), even if such Contributor
|
|
165
|
+
has been advised of the possibility of such damages.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
170
|
+
or other liability obligations and/or rights consistent with this
|
|
171
|
+
License. However, in accepting such obligations, You may act only
|
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
176
|
+
of your accepting any such warranty or additional liability.
|
|
177
|
+
|
|
178
|
+
END OF TERMS AND CONDITIONS
|
|
179
|
+
|
|
180
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
181
|
+
|
|
182
|
+
To apply the Apache License to your work, attach the following
|
|
183
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
184
|
+
replaced with your own identifying information. (Don't include
|
|
185
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
186
|
+
comment syntax for the file format. We also recommend that a
|
|
187
|
+
file or class name and description of purpose be included on the
|
|
188
|
+
same "printed page" as the copyright notice for easier
|
|
189
|
+
identification within third-party archives.
|
|
190
|
+
|
|
191
|
+
Copyright 2026 SpectraWorks B.V.
|
|
192
|
+
|
|
193
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
194
|
+
you may not use this file except in compliance with the License.
|
|
195
|
+
You may obtain a copy of the License at
|
|
196
|
+
|
|
197
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
198
|
+
|
|
199
|
+
Unless required by applicable law or agreed to in writing, software
|
|
200
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
201
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
202
|
+
See the License for the specific language governing permissions and
|
|
203
|
+
limitations under the License.
|