Skip to content

Commit 7028a8b

Browse files
committed
docs: show the new capabilities output; add pre-commit config
1 parent 21a7eff commit 7028a8b

2 files changed

Lines changed: 35 additions & 7 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
ci:
2+
autoupdate_schedule: quarterly
3+
autofix_prs: false
4+
5+
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v6.0.0
8+
hooks:
9+
- id: check-yaml
10+
- id: check-toml
11+
exclude: "^template/"
12+
- id: check-json
13+
- id: check-added-large-files
14+
- id: check-merge-conflict
15+
- id: end-of-file-fixer
16+
exclude: ".*\\.ipynb$"
17+
- id: trailing-whitespace
18+
exclude: ".*\\.ipynb$"
19+
- id: mixed-line-ending
20+
21+
- repo: https://github.com/astral-sh/ruff-pre-commit
22+
rev: v0.15.20
23+
hooks:
24+
- id: ruff
25+
args: ["--fix", "--exit-non-zero-on-fix"]
26+
exclude: "^template/"

‎README.md‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,9 @@ available:
7878
Not every service supports every operation for every collection; check first:
7979

8080
```python
81-
ea.plugins.harmony.capabilities("MUR-JPL-L4-GLOB-v4.1")
82-
# operations: reproject, subset_bbox, subset_dimension, subset_shape,
83-
# subset_temporal, subset_variable
84-
# formats: application/netcdf, image/jpeg, image/png, image/tiff
81+
caps = ea.plugins.harmony.capabilities("MUR-JPL-L4-GLOB-v4.1")
82+
print(caps) # one summary line per operation
83+
caps.explain() # options, output kinds and an example for each
8584
```
8685

8786
Example — subset, reproject to a polar grid and return a GeoTIFF:
@@ -145,9 +144,12 @@ service:
145144

146145
```python
147146
ea.plugins.harmony.capabilities(results)
148-
# Capabilities('harmony supported ATL06', operations=3)
149-
# operations: subset_bbox, subset_temporal, subset_variable
150-
# formats: application/netcdf4
147+
# harmony supported ATL06
148+
# subset_bbox restrict the result to a spatial extent (bbox or wkt)
149+
# subset_temporal restrict the result to a time interval (temporal)
150+
# subset_variable select a subset of variables; an unknown name raises
151+
# formats: netcdf4
152+
# hint: use .explain() for options and examples
151153

152154
ea.plugins.harmony.capabilities("ATL06") # by short name
153155
```

0 commit comments

Comments
 (0)