envlib-api 0.3.0__py3-none-any.whl
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.
- envlib_api/__init__.py +3 -0
- envlib_api/__main__.py +3 -0
- envlib_api/api/__init__.py +7 -0
- envlib_api/api/app.py +435 -0
- envlib_api/api/compress.py +52 -0
- envlib_api/api/cost.py +107 -0
- envlib_api/api/edr.py +343 -0
- envlib_api/api/encode.py +285 -0
- envlib_api/api/errors.py +23 -0
- envlib_api/api/grid.py +317 -0
- envlib_api/api/params.py +71 -0
- envlib_api/api/read.py +65 -0
- envlib_api/api/resolve.py +191 -0
- envlib_api/api/server.py +35 -0
- envlib_api/api/stations.py +96 -0
- envlib_api/api/timesel.py +97 -0
- envlib_api/cli.py +179 -0
- envlib_api/config.py +158 -0
- envlib_api/healthcheck.py +38 -0
- envlib_api/mirror.py +353 -0
- envlib_api/refresher.py +265 -0
- envlib_api/tests/__init__.py +0 -0
- envlib_api/tests/api_support.py +307 -0
- envlib_api/tests/conftest.py +12 -0
- envlib_api/tests/grid_support.py +217 -0
- envlib_api/tests/schemas/README.md +12 -0
- envlib_api/tests/schemas/coveragejson/coveragejson.json +1794 -0
- envlib_api/tests/schemas/edr/schemas/collections/DataQuery.yaml +38 -0
- envlib_api/tests/schemas/edr/schemas/collections/areaDataQuery.yaml +10 -0
- envlib_api/tests/schemas/edr/schemas/collections/areaLink.yaml +9 -0
- envlib_api/tests/schemas/edr/schemas/collections/collection.yaml +137 -0
- envlib_api/tests/schemas/edr/schemas/collections/collections.yaml +26 -0
- envlib_api/tests/schemas/edr/schemas/collections/corridorDataQuery.yaml +29 -0
- envlib_api/tests/schemas/edr/schemas/collections/corridorLink.yaml +9 -0
- envlib_api/tests/schemas/edr/schemas/collections/crsObject.yaml +15 -0
- envlib_api/tests/schemas/edr/schemas/collections/cubeDataQuery.yaml +20 -0
- envlib_api/tests/schemas/edr/schemas/collections/cubeLink.yaml +9 -0
- envlib_api/tests/schemas/edr/schemas/collections/extent.yaml +311 -0
- envlib_api/tests/schemas/edr/schemas/collections/instancesDataQuery.yaml +21 -0
- envlib_api/tests/schemas/edr/schemas/collections/instancesLink.yaml +9 -0
- envlib_api/tests/schemas/edr/schemas/collections/itemsDataQuery.yaml +21 -0
- envlib_api/tests/schemas/edr/schemas/collections/itemsLink.yaml +9 -0
- envlib_api/tests/schemas/edr/schemas/collections/locationsDataQuery.yaml +10 -0
- envlib_api/tests/schemas/edr/schemas/collections/locationsLink.yaml +9 -0
- envlib_api/tests/schemas/edr/schemas/collections/observedPropertyCollection.yaml +51 -0
- envlib_api/tests/schemas/edr/schemas/collections/parameterNames.yaml +70 -0
- envlib_api/tests/schemas/edr/schemas/collections/positionDataQuery.yaml +12 -0
- envlib_api/tests/schemas/edr/schemas/collections/positionLink.yaml +9 -0
- envlib_api/tests/schemas/edr/schemas/collections/radiusDataQuery.yaml +18 -0
- envlib_api/tests/schemas/edr/schemas/collections/radiusLink.yaml +9 -0
- envlib_api/tests/schemas/edr/schemas/collections/trajectoryDataQuery.yaml +10 -0
- envlib_api/tests/schemas/edr/schemas/collections/trajectoryLink.yaml +9 -0
- envlib_api/tests/schemas/edr/schemas/collections/units.yaml +42 -0
- envlib_api/tests/schemas/edr/schemas/core/confClasses.yaml +8 -0
- envlib_api/tests/schemas/edr/schemas/core/exception.yaml +8 -0
- envlib_api/tests/schemas/edr/schemas/core/landingPage.yaml +76 -0
- envlib_api/tests/schemas/edr/schemas/core/link.yaml +31 -0
- envlib_api/tests/schemas/edr/schemas/covjson/anyAxis.yaml +11 -0
- envlib_api/tests/schemas/edr/schemas/covjson/coverage.yaml +14 -0
- envlib_api/tests/schemas/edr/schemas/covjson/coverageBase.yaml +68 -0
- envlib_api/tests/schemas/edr/schemas/covjson/coverageCollection.yaml +58 -0
- envlib_api/tests/schemas/edr/schemas/covjson/coverageJSON.yaml +46 -0
- envlib_api/tests/schemas/edr/schemas/covjson/covjsonI18n.yaml +9 -0
- envlib_api/tests/schemas/edr/schemas/covjson/covjsonObservedProperty.yaml +29 -0
- envlib_api/tests/schemas/edr/schemas/covjson/covjsonParameter.yaml +32 -0
- envlib_api/tests/schemas/edr/schemas/covjson/covjsonParameterGroup.yaml +31 -0
- envlib_api/tests/schemas/edr/schemas/covjson/covjsonUnit.yaml +31 -0
- envlib_api/tests/schemas/edr/schemas/covjson/domain.yaml +7 -0
- envlib_api/tests/schemas/edr/schemas/covjson/domainBase.yaml +337 -0
- envlib_api/tests/schemas/edr/schemas/covjson/ndArray.yaml +88 -0
- envlib_api/tests/schemas/edr/schemas/covjson/numericAxis.yaml +11 -0
- envlib_api/tests/schemas/edr/schemas/covjson/numericRegularlySpacedAxis.yaml +17 -0
- envlib_api/tests/schemas/edr/schemas/covjson/numericSingleValueAxis.yaml +9 -0
- envlib_api/tests/schemas/edr/schemas/covjson/numericValuesAxis.yaml +14 -0
- envlib_api/tests/schemas/edr/schemas/covjson/polygonValuesAxis.yaml +29 -0
- envlib_api/tests/schemas/edr/schemas/covjson/primitiveValuesAxis.yaml +22 -0
- envlib_api/tests/schemas/edr/schemas/covjson/referenceSystem.yaml +48 -0
- envlib_api/tests/schemas/edr/schemas/covjson/referenceSystemConnection.yaml +16 -0
- envlib_api/tests/schemas/edr/schemas/covjson/stringSingleValueAxis.yaml +9 -0
- envlib_api/tests/schemas/edr/schemas/covjson/stringValuesAxis.yaml +14 -0
- envlib_api/tests/schemas/edr/schemas/covjson/targetConcept.yaml +13 -0
- envlib_api/tests/schemas/edr/schemas/covjson/tiledNdArray.yaml +50 -0
- envlib_api/tests/schemas/edr/schemas/covjson/tupleValuesAxis.yaml +24 -0
- envlib_api/tests/schemas/edr/schemas/covjson/valuesAxis.yaml +27 -0
- envlib_api/tests/schemas/edr/schemas/covjson/valuesAxisBase.yaml +24 -0
- envlib_api/tests/schemas/edr/schemas/edr-geojson/edrFeatureCollectionGeoJSON.yaml +32 -0
- envlib_api/tests/schemas/edr/schemas/edr-geojson/edrProperties.yaml +49 -0
- envlib_api/tests/schemas/edr/schemas/edr-geojson/observedProperty.yaml +26 -0
- envlib_api/tests/schemas/edr/schemas/edr-geojson/parameter.yaml +28 -0
- envlib_api/tests/schemas/edr/schemas/edr-geojson/unit.yaml +24 -0
- envlib_api/tests/schemas/edr/schemas/geojson/featureGeoJSON.yaml +29 -0
- envlib_api/tests/schemas/edr/schemas/geojson/geometrycollectionGeoJSON.yaml +19 -0
- envlib_api/tests/schemas/edr/schemas/geojson/linestringGeoJSON.yaml +23 -0
- envlib_api/tests/schemas/edr/schemas/geojson/multilinestringGeoJSON.yaml +19 -0
- envlib_api/tests/schemas/edr/schemas/geojson/multipointGeoJSON.yaml +16 -0
- envlib_api/tests/schemas/edr/schemas/geojson/multipolygonGeoJSON.yaml +21 -0
- envlib_api/tests/schemas/edr/schemas/geojson/pointGeoJSON.yaml +14 -0
- envlib_api/tests/schemas/edr/schemas/geojson/polygonGeoJSON.yaml +19 -0
- envlib_api/tests/schemas/edr/schemas/i18n.yaml +4 -0
- envlib_api/tests/schemas/edr/schemas/numberMatched.yaml +7 -0
- envlib_api/tests/schemas/edr/schemas/numberReturned.yaml +12 -0
- envlib_api/tests/schemas/edr/schemas/parameterGroup.yaml +30 -0
- envlib_api/tests/schemas/edr/schemas/queries/instances.yaml +26 -0
- envlib_api/tests/support.py +320 -0
- envlib_api/tests/test_alerting_and_guards.py +325 -0
- envlib_api/tests/test_api.py +808 -0
- envlib_api/tests/test_api_review.py +428 -0
- envlib_api/tests/test_grid.py +1075 -0
- envlib_api/tests/test_ops.py +358 -0
- envlib_api/tests/test_refresher.py +354 -0
- envlib_api/tests/test_schemas.py +91 -0
- envlib_api-0.3.0.dist-info/METADATA +408 -0
- envlib_api-0.3.0.dist-info/RECORD +116 -0
- envlib_api-0.3.0.dist-info/WHEEL +4 -0
- envlib_api-0.3.0.dist-info/entry_points.txt +3 -0
- envlib_api-0.3.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: envlib-api
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: The envlib data API service: an OGC API - EDR server for envlib datasets, and the refresher mirroring the envlib catalogue and dataset indexes into MongoDB
|
|
5
|
+
Project-URL: Source, https://github.com/envlib/envlib-api
|
|
6
|
+
Author-email: Mike Kittridge <mullenkamp1@gmail.com>
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
11
|
+
Requires-Python: >=3.12
|
|
12
|
+
Requires-Dist: cfdb>=0.12.0
|
|
13
|
+
Requires-Dist: ebooklet[mongo]>=0.13.2
|
|
14
|
+
Requires-Dist: envlib>=0.1.8
|
|
15
|
+
Requires-Dist: fastapi>=0.115
|
|
16
|
+
Requires-Dist: orjson>=3.9
|
|
17
|
+
Requires-Dist: pyproj>=3.6
|
|
18
|
+
Requires-Dist: s3func>=0.10.0
|
|
19
|
+
Requires-Dist: sentry-sdk>=2.39
|
|
20
|
+
Requires-Dist: shapely>=2.0
|
|
21
|
+
Requires-Dist: typer>=0.12
|
|
22
|
+
Requires-Dist: uvicorn>=0.30
|
|
23
|
+
Requires-Dist: zstandard>=0.22
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# envlib-api
|
|
27
|
+
|
|
28
|
+
The envlib data API service, in two processes:
|
|
29
|
+
- the **refresher** keeps a MongoDB copy of the public envlib catalogue and of every catalogued
|
|
30
|
+
dataset's index, using `ebooklet.mongo.refresh()`;
|
|
31
|
+
- the **API** (`envlib-api-server`) is a read-only OGC API – EDR server that answers every request
|
|
32
|
+
from that MongoDB, and fetches a chunk from B2 only on a cache miss.
|
|
33
|
+
|
|
34
|
+
Its design record is `plans/edr_api_assessment.md` §11 in the envlib repo, and the work is tracked
|
|
35
|
+
under "EDR API (new service)" in envlib's `OPEN_WORK.md`. The API runs locally so far. Deploying it on
|
|
36
|
+
the swarm is "EDR plan 6: going public".
|
|
37
|
+
|
|
38
|
+
## What runs
|
|
39
|
+
|
|
40
|
+
| Service | What it does |
|
|
41
|
+
|---|---|
|
|
42
|
+
| `mongo` | MongoDB 9.0, on one node with a named volume, with auth and no published port. It holds only data derived from B2, so it has no backups. |
|
|
43
|
+
| `refresher` | Every 60 s it refreshes the catalogue, syncs the set of mirrored datasets with it, then refreshes every dataset. It is pinned to MongoDB's node. |
|
|
44
|
+
| `api` (local only so far) | The EDR API: station (`ts_ortho`) collections, `/locations`, `/area` and `/radius`, in CoverageJSON, CSV and GeoJSON. See "The API" below. |
|
|
45
|
+
|
|
46
|
+
Each cycle, in order:
|
|
47
|
+
1. **Refresh the catalogue.** It is an ebooklet RemoteConnGroup, mirrored like any dataset under the
|
|
48
|
+
id `catalogue`.
|
|
49
|
+
2. **Sync** (`envlib_api/mirror.py`):
|
|
50
|
+
- Membership is the catalogue index's keys.
|
|
51
|
+
- A new or changed entry is refreshed first and listed afterwards, in the `catalogue` collection.
|
|
52
|
+
- A removed entry is **retired**: its `datasets` document is tombstoned, never deleted, and its
|
|
53
|
+
entries are deleted. A retire happens only when every guard passes, so a broken, empty or
|
|
54
|
+
recreated catalogue, or one dropping more than 2 datasets at once, retires nothing and alerts.
|
|
55
|
+
Every retire alerts, whether or not a guard was involved.
|
|
56
|
+
- A changed `db_url` (a re-point) is followed only when the new remote answers and the
|
|
57
|
+
catalogue's uuid is acknowledged. Until then the old remote keeps being served and polled.
|
|
58
|
+
3. **Refresh every listed dataset**, oldest check first. Each one is isolated: a failure is logged
|
|
59
|
+
and reported to Sentry once until it clears. The same goes for every other alert, except retires
|
|
60
|
+
and catalogue adoptions, which alert every time.
|
|
61
|
+
4. **Send a Sentry cron check-in.** It is "ok" when the catalogue refresh and the sync succeeded and
|
|
62
|
+
at least one dataset refreshed to `applied` or `nochange`, and "error" otherwise. A missed check-in
|
|
63
|
+
alerts too.
|
|
64
|
+
|
|
65
|
+
MongoDB collections:
|
|
66
|
+
- from `ebooklet.mongo`: `datasets`, `entries` and `chunks` (ebooklet's `docs/ops.md`, "The MongoDB
|
|
67
|
+
read path");
|
|
68
|
+
- from this repo: `catalogue` (one document per dataset version) and `state` (the acknowledged
|
|
69
|
+
catalogue uuid).
|
|
70
|
+
|
|
71
|
+
## The API
|
|
72
|
+
|
|
73
|
+
`envlib-api-server` runs uvicorn with one worker; scale it with replicas. Each request builds its own
|
|
74
|
+
`MongoStore` and cfdb dataset. The process shares only the MongoDB client and the B2 HTTP session, so
|
|
75
|
+
nothing is cached in the process. Its code is in `envlib_api/api/`, and the refresher's CLI never
|
|
76
|
+
imports it.
|
|
77
|
+
|
|
78
|
+
**Routes** (EDR 1.2):
|
|
79
|
+
|
|
80
|
+
| Route | Answers |
|
|
81
|
+
|---|---|
|
|
82
|
+
| `/`, `/conformance`, `/api` | The landing page, the conformance classes, and FastAPI's generated OpenAPI 3.1 document. That document lists the routes but not their query parameters, so the conformance list does not claim `oas31` (plan 6). |
|
|
83
|
+
| `/collections`, `/collections/{id}` | One collection per `dataset_id`, serving its latest version: the greatest `user_meta.created_at`, with a tie going to the greater `dataset_version_id`. The full catalogue entry rides in its `envlib` object. `ts_ortho` (station) and `grid` collections are listed; a grid's native CRS, axes and spacing ride in `envlib:grid`. |
|
|
84
|
+
| `/collections/{id}/position?coords=POINT(...)` | Grids: the series of the cell nearest the point (see "Grids" below): a CoverageJSON `PointSeries` (a `CoverageCollection` of them, one per level, when several depths are selected), or CSV. |
|
|
85
|
+
| `/collections/{id}/cube?bbox=w,s,e,n` | Grids: the smallest grid rectangle holding every cell whose centre is in the bbox, as one CoverageJSON `Grid` (CoverageJSON only). |
|
|
86
|
+
| `/collections/{id}/locations` | The stations as an EDR GeoJSON FeatureCollection. The `id` is the `station_id`. |
|
|
87
|
+
| `/collections/{id}/locations/{station_id}` | One station's series: a CoverageJSON `PointSeries`, or CSV. |
|
|
88
|
+
| `/collections/{id}/area?coords=POLYGON(...)` | The stations a WKT POLYGON or MULTIPOLYGON covers, boundary included: a `CoverageCollection` of `PointSeries`, or CSV. |
|
|
89
|
+
| `/collections/{id}/radius?coords=POINT(...)&within=…&within-units=km\|m` | The stations within a great-circle distance (WGS84). |
|
|
90
|
+
|
|
91
|
+
**Query rules:**
|
|
92
|
+
- **`datetime`** is an instant or an interval, with `..` for an open end. Times are UTC: a naive
|
|
93
|
+
time is read as UTC, and an offset is converted. A time step is selected when its label t has
|
|
94
|
+
`start <= t <= end`, so `05:30/10:30` starts at the 06:00 step. An instant must equal a step.
|
|
95
|
+
A list of datetimes answers 400, a gap against EDR 1.2.
|
|
96
|
+
- **Other parameters:** `parameter-name` (a comma-separated list), `f` (`CoverageJSON`, `CSV`, or
|
|
97
|
+
`GeoJSON` for `/locations`), `crs` (CRS84 only, except a projected grid's cube: see "Grids") and,
|
|
98
|
+
on grids, `z`.
|
|
99
|
+
- **Queries by type:** station collections offer `/locations`, `/area` and `/radius`; grid
|
|
100
|
+
collections offer `/position` and `/cube`. Asking a collection for a query it does not offer
|
|
101
|
+
answers 404, naming the queries it does offer.
|
|
102
|
+
- **Strictness:** an unknown, repeated or missing parameter answers 400. A valid query that selects
|
|
103
|
+
no station or no time step answers 204.
|
|
104
|
+
- **`/area` and the antimeridian:** each station is tested at lon, lon − 360 and lon + 360, so a
|
|
105
|
+
polygon drawn across the antimeridian (the Chatham Islands) works in either longitude convention.
|
|
106
|
+
`/radius` is great-circle, so it needs no such rule.
|
|
107
|
+
- **Values** are printed at the variable's stored precision. NaN prints as `null` in JSON and as an
|
|
108
|
+
empty cell in CSV. Times print as `YYYY-MM-DDTHH:MM:SSZ`.
|
|
109
|
+
- What is printed equals a direct envlib read, rounded to that precision.
|
|
110
|
+
- It is not always the producer's decimal. A float32 variable cannot hold p decimals once
|
|
111
|
+
|value| × 10^p passes about 2²⁴: streamflow at precision 4 above about 1,677 m³/s. The
|
|
112
|
+
producer's float32 step already lost that digit, so there the last printed decimal is not
|
|
113
|
+
significant (code review `edr-api-code-3`).
|
|
114
|
+
- **Errors** are JSON in the OGC exception shape (`code`, `description`), including unknown routes
|
|
115
|
+
(404), other methods (405) and anything unexpected (500).
|
|
116
|
+
- **Compression** follows `Accept-Encoding` (q-values honoured): zstd level 1, else gzip level 1, else
|
|
117
|
+
none.
|
|
118
|
+
|
|
119
|
+
**The caps** (`[api]` in the API's TOML; `envlib_api/config.py` has the defaults):
|
|
120
|
+
- `max_values`: the values returned (stations or cells × levels × time steps × parameters);
|
|
121
|
+
- `max_decoded_bytes`: the data chunks a request touches × their decoded size;
|
|
122
|
+
- `max_csv_rows`: CSV rows.
|
|
123
|
+
|
|
124
|
+
They are counted from each dimension's chunk spans after the coordinates are read, before any key is
|
|
125
|
+
built or data chunk read. A request over one answers 413, naming the limit, the dataset's `db_url`
|
|
126
|
+
and an envlib snippet for reading it directly. The key list is then built from the same spans and
|
|
127
|
+
feeds the one batched fetch (`store.load_items`), so the estimate is exactly what is fetched. On the
|
|
128
|
+
live WRF grids the bytes cap (100 MB) is about 51 chunks: one cell over about 4.9 years, or a cube of
|
|
129
|
+
about 300 km square at one hour. A full WRF map at one hour touches 322 chunks (623 MB) and answers
|
|
130
|
+
413, deliberately: bulk reads belong to envlib (Mike, 2026-11-25).
|
|
131
|
+
|
|
132
|
+
### Grids
|
|
133
|
+
|
|
134
|
+
Rules for `/position` and `/cube` (`envlib_api/api/grid.py`; plan 4, its review `edr-api-plan-4`
|
|
135
|
+
and code review `edr-api-code-4`):
|
|
136
|
+
- **No reprojection.** The API never reprojects or regrids values: every value is a stored cell's, and
|
|
137
|
+
coordinates are transformed only to find cells and to say where they are. Regridding is the
|
|
138
|
+
caller's choice of method and far heavier per request; it belongs to envlib with `geointerp`, or
|
|
139
|
+
cfdb's `.interp()` (Mike, 2026-11-25).
|
|
140
|
+
- **Axes.** x and y are the coordinates cfdb records as the x and y axes. They need not be regular:
|
|
141
|
+
the live SST centres are float32 values whose spacing varies by about 3e-4. They are increasing,
|
|
142
|
+
because cfdb sorts a coordinate when it is created. A vertical axis is the coordinate whose CF attrs
|
|
143
|
+
say `axis: Z`.
|
|
144
|
+
- **The CRS.** A projected grid is served through pyproj. A geographic grid is served only on WGS 84;
|
|
145
|
+
any other geographic CRS (a rotated pole, or another datum such as NZGD49, 187 m away) is left out of
|
|
146
|
+
`/collections` and answers 404 `NotServed`, because reading it as CRS84 would serve the wrong cells
|
|
147
|
+
(Mike, 2026-11-25).
|
|
148
|
+
- **The cell.** A projected grid (the WRF grids' Lambert CRS) is reached by projecting the CRS84
|
|
149
|
+
point. A geographic grid's longitude is wrapped onto the window centred on its axis, so −179 and
|
|
150
|
+
181 reach the same SST cell. On each axis the cell is the nearest stored centre (`searchsorted` on
|
|
151
|
+
the midpoints). A point up to half a cell beyond an outer centre is in, with a tolerance of 0.1% of
|
|
152
|
+
the edge spacing; further is out (204). The tolerance is for SST, whose float32 centres put the
|
|
153
|
+
outer cell edges 4.5e-6° inside the round numbers 120°E and 60°S (Mike, 2026-11-25). On a midpoint
|
|
154
|
+
the lower index wins. SST's inner cell edges fall on round numbers too (multiples of 0.05°), so a
|
|
155
|
+
round-number point sits on a corner, and float32 noise in the centres decides its cell.
|
|
156
|
+
`envlib:cell` reports the indices and native coordinates of the cell served, and the `PointSeries`
|
|
157
|
+
x and y are its centre in CRS84, with lon in [−180, 180).
|
|
158
|
+
- **The cube.** A cell's centre is in the bbox when s ≤ lat ≤ n and it lies within the bbox's width
|
|
159
|
+
east of w, taken mod 360. So a bbox across the antimeridian works as west > east (`178,…,-178,…`) or
|
|
160
|
+
in the 0–360 convention (`178,…,182,…`). The answer is the smallest grid rectangle holding every such
|
|
161
|
+
cell, unmasked (Mike, 2026-11-25). The WRF grid is rotated about 37° against north, so a lon/lat
|
|
162
|
+
square returns about twice its own cells, and a thin strip many times more (28–70× measured on live
|
|
163
|
+
WRF; there is no bound); the caps count the rectangle. A bbox between centres (smaller than a cell)
|
|
164
|
+
answers 204. Malformed bboxes answer 400, numbers included (`1_0` is refused).
|
|
165
|
+
- **On a global lon/lat grid** (none is served today), a bbox across the axis's seam (±180 on a
|
|
166
|
+
−180..180 axis) returns the whole longitude axis, because the rectangle is one index range.
|
|
167
|
+
- **The cost before the caps:** the rectangle is found by projecting every cell centre to CRS84,
|
|
168
|
+
before the caps are checked. That is 15 ms on WRF's 168,210 cells, but about 2 s and 784 MB on a
|
|
169
|
+
16-million-cell grid. Bounding it first is the backlog item "[new service] Bound the cube hull's
|
|
170
|
+
projection on large grids", triggered by the first projected grid over about 1 million cells.
|
|
171
|
+
- **The cube's CRS.** A cube comes back on the grid's own axes. On SST that is CRS84, with
|
|
172
|
+
longitudes past 180 kept so the axis stays monotonic. On the WRF grids it is the Lambert CRS in
|
|
173
|
+
metres, as a `ProjectedCRS` whose WKT is in the custom member `envlib:wkt`. The collection lists
|
|
174
|
+
`crs: ["CRS84", "native"]`; each query's `crs_details` lists the one it returns (`native` for a WRF
|
|
175
|
+
cube, CRS84 for a position and for an SST cube). This is a documented deviation from
|
|
176
|
+
EDR's `/req/edr/REQ_rc-crs-response` A (data in the extent's CRS when `crs` is absent): a rotated
|
|
177
|
+
grid cannot be a CRS84 `Grid`. `crs=native` and no `crs` give the same answer; `crs=CRS84` on a WRF
|
|
178
|
+
cube answers 400. Input coordinates are always CRS84.
|
|
179
|
+
- **`z`** is a level or an interval (`a/b`, with `..` for an open end), matched after rounding both
|
|
180
|
+
sides to the coordinate's stored precision: the live soil level 1.0 m is stored as
|
|
181
|
+
0.9999999999999999. A list or a recurring interval answers 400 (EDR's MAY). On a grid without
|
|
182
|
+
levels `z` is ignored, as EDR requires.
|
|
183
|
+
- **CoverageJSON.** A `Grid` range is an `NdArray` in row-major (t, z, y, x) order; its `axisNames`
|
|
184
|
+
leave out the axes with a single value. `z` is referenced by a `VerticalCRS`. `resolution-x/y/z`
|
|
185
|
+
answer 400 (cubes are at native resolution). Grid `/area` and netCDF output come later (the item
|
|
186
|
+
"EDR grid `/area` and netCDF output" in envlib's `OPEN_WORK.md`).
|
|
187
|
+
- **CSV** is offered for `/position` only: one row per time step (and level), with the cell's native
|
|
188
|
+
coordinates and its centre in CRS84. A cube is CoverageJSON only (Mike, 2026-11-25). Long-form CSV
|
|
189
|
+
of a cube repeats every coordinate on every cell's row, and grid users want arrays: CoverageJSON
|
|
190
|
+
now, netCDF later. `f=CSV` on a cube answers 400, naming the formats offered.
|
|
191
|
+
- The pyproj transformers are cached per CRS (an `lru_cache` keyed by the WKT; Mike, 2026-11-25):
|
|
192
|
+
building them cost about 25 ms per request. pyproj builds its PROJ object per thread, so sharing
|
|
193
|
+
one is safe, but a `from_crs` transformer repeats PROJ's operation search in every new thread. So
|
|
194
|
+
the cache holds a `from_pipeline` transformer of the operation PROJ chose, which a new thread
|
|
195
|
+
rebuilds in 0.2 ms. That works when PROJ resolves one operation, as on the WRF CRS. For a CRS where
|
|
196
|
+
PROJ keeps several (EPSG:27200 or 27700, for example), the `from_crs` transformer is cached instead:
|
|
197
|
+
it is correct, but it pays about 30 ms in each new thread.
|
|
198
|
+
- `POINT Z` answers 400 (use `z` for a level). In position CSV, a native coordinate column named
|
|
199
|
+
`lon` or `lat` gets the suffix `_native`.
|
|
200
|
+
|
|
201
|
+
**Consistency** (`envlib_api/api/resolve.py`). Every attr is read first, then the selection and the
|
|
202
|
+
cap, then the batched fetch and the reads, then `store.verify()`. `verify()` runs before every answer
|
|
203
|
+
computed from the store, a 413, 204 or 404 included.
|
|
204
|
+
|
|
205
|
+
| Raised | Answer |
|
|
206
|
+
|---|---|
|
|
207
|
+
| A refresh overlapped the request (a refused store build, or a failed `verify()`) | A new store after `retry_wait_ms`, up to `retry_attempts` times; then 503 with `Retry-After` |
|
|
208
|
+
| The remote is ahead of the mirror (a chunk fetch found a newer commit, and nothing was applied since) | 503 with `Retry-After` at once: only the refresher's next poll helps |
|
|
209
|
+
| `RemoteMissingError` | No version of the `dataset_id` left: 404. Another version is now the latest: retry. Otherwise 503 |
|
|
210
|
+
| `RemoteIntegrityError`, or chunk bytes that do not decode | 500, logged at ERROR |
|
|
211
|
+
| Another B2 failure | 502 |
|
|
212
|
+
| MongoDB unavailable (selection times out after 5 s) | 503 with `Retry-After` |
|
|
213
|
+
| The request deadline passed | 503 with `Retry-After` |
|
|
214
|
+
|
|
215
|
+
The deadline (`request_deadline_seconds`) is checked between attempts and after the batched fetch.
|
|
216
|
+
It cannot interrupt a fetch in progress, so a request can overrun it by one B2 read: `read_timeout` ×
|
|
217
|
+
(`retries` + 1), plus s3func's backoff.
|
|
218
|
+
|
|
219
|
+
A collection whose store cannot be built is left out of `/collections` and logged. It never fails
|
|
220
|
+
the listing. A catalogue entry whose `created_at` does not parse counts as the oldest version, with a
|
|
221
|
+
warning. A latest version whose remote is `missing` hides an older working one, as envlib's
|
|
222
|
+
`query()` would.
|
|
223
|
+
|
|
224
|
+
**The API's MongoDB user** is `api`, with the role `envlib_api_reader` (`mongo/api-role.json`): `find`
|
|
225
|
+
on `datasets`, `entries`, `catalogue` and `chunks`, and `insert` on `chunks`. It never calls
|
|
226
|
+
`ensure_schema`. ebooklet only logs a WARNING when a chunk insert is refused, so a cache that refuses
|
|
227
|
+
inserts would serve correct data, always cold. Two checks make that loud (at ERROR, so Sentry reports
|
|
228
|
+
it):
|
|
229
|
+
- at start, the API reads its own privileges (`connectionStatus`) and reports any that are missing;
|
|
230
|
+
- at run time, the first refused insert of the process (a missing privilege, a validator, anything
|
|
231
|
+
else) is re-reported at ERROR.
|
|
232
|
+
- On a new volume, `init-users.js` creates the user when the secret
|
|
233
|
+
`envlib_api_mongo_api_password` is mounted.
|
|
234
|
+
- On the existing production volume, create it by hand as root in the `mongo` container, with the
|
|
235
|
+
privileges from `mongo/api-role.json` (`<password>` is the API TOML's):
|
|
236
|
+
```
|
|
237
|
+
db.getSiblingDB("envlib_api").createRole({role: "envlib_api_reader", roles: [], privileges: [
|
|
238
|
+
{resource: {db: "envlib_api", collection: "datasets"}, actions: ["find"]},
|
|
239
|
+
{resource: {db: "envlib_api", collection: "entries"}, actions: ["find"]},
|
|
240
|
+
{resource: {db: "envlib_api", collection: "catalogue"}, actions: ["find"]},
|
|
241
|
+
{resource: {db: "envlib_api", collection: "chunks"}, actions: ["find", "insert"]}]})
|
|
242
|
+
db.getSiblingDB("envlib_api").createUser({user: "api", pwd: "<password>", roles: [{role: "envlib_api_reader", db: "envlib_api"}]})
|
|
243
|
+
```
|
|
244
|
+
- The API's credential can write bytes under a chunk id that is not cached yet. That is inherent in a
|
|
245
|
+
cache the API fills itself, and plan 6 should weigh it.
|
|
246
|
+
|
|
247
|
+
**Running it locally:** `docker compose up -d mongo`, a refresher (`docker compose up refresher`, or
|
|
248
|
+
`uv run envlib-api refresher`), then `docker compose up api`, or
|
|
249
|
+
`ENVLIB_API_TOML=<the API's TOML> uv run envlib-api-server`.
|
|
250
|
+
- **Ports:** compose publishes the API on `127.0.0.1:8000`. The venv server binds `0.0.0.0:8000`
|
|
251
|
+
unless `ENVLIB_API_HOST` and `ENVLIB_API_PORT` say otherwise.
|
|
252
|
+
- **Secrets:** compose's `mongo` service now mounts the API's password secret, so
|
|
253
|
+
`mongo-api-password` must exist in the local secrets directory, even for the refresher alone.
|
|
254
|
+
|
|
255
|
+
## Rules that must not be broken
|
|
256
|
+
|
|
257
|
+
- **Exactly one refresher, ever.** Two overlapping refreshers can leave MongoDB permanently
|
|
258
|
+
inconsistent with B2 while every check says it is current (ebooklet `docs/ops.md`). There is no
|
|
259
|
+
lock. The stack prevents Swarm from running two: `replicas: 1`, stop-first updates, an exit within
|
|
260
|
+
seconds of SIGTERM, and pinning to MongoDB's node. **Never run a second refresher by hand.** That
|
|
261
|
+
means no `docker run … refresher`, and no development machine pointed at the production MongoDB.
|
|
262
|
+
There is deliberately no one-shot refresh command.
|
|
263
|
+
- If two refreshers are ever seen, build the lease the plan review designed (`planning/`): a
|
|
264
|
+
server-clock expiry via `$$NOW` with a bootstrap insert and a non-upsert update, a uuid4 owner, a
|
|
265
|
+
conditional release, and a 5-minute TTL renewed before each refresh. It is not built, because
|
|
266
|
+
nothing above can start a second one.
|
|
267
|
+
- **Never add Cloudflare cache rules on the `b2.*` hosts.** The refresher and the API rely on db-object
|
|
268
|
+
HEADs and GETs, and on 404s, never being cached. On 2026-11-23, every catalogued db object and 404s on
|
|
269
|
+
both hosts answered `cf-cache-status: DYNAMIC`. A refresh status of `stale_get` (HEAD and GET
|
|
270
|
+
disagree) means a cache has appeared, and it alerts.
|
|
271
|
+
- Cloudflare refuses Python's default `urllib` User-Agent with a 403, though ebooklet's sessions pass.
|
|
272
|
+
A new bot rule could block the refresher, which would show as error check-ins and an unhealthy
|
|
273
|
+
task.
|
|
274
|
+
|
|
275
|
+
## Deploy (Docker Swarm, on the manager)
|
|
276
|
+
|
|
277
|
+
**Where it runs (since 2026-11-24):** both services are on `uswest11.tethys-ts.xyz`, the manager, which
|
|
278
|
+
carries the `envlib_mongo` label. The checkout the stack is deployed from is
|
|
279
|
+
`~/git/envlib-repos/envlib-api` on that host. The live close-checks are
|
|
280
|
+
`planning/close-checks-live-2026-11-24.md`.
|
|
281
|
+
|
|
282
|
+
One time, on the manager:
|
|
283
|
+
1. **Pick MongoDB's node and label it.** The volume is node-local, and the refresher follows it.
|
|
284
|
+
Label **exactly one** node: with two, `mongo` and `refresher` could be placed apart, and a
|
|
285
|
+
restarted `mongo` could start on an empty volume.
|
|
286
|
+
```bash
|
|
287
|
+
docker node ls
|
|
288
|
+
docker node update --label-add envlib_mongo=true <node>
|
|
289
|
+
```
|
|
290
|
+
2. **Create the three secrets.** Generate the two passwords first, for example with
|
|
291
|
+
`python -c "import secrets; print(secrets.token_hex(24))"`.
|
|
292
|
+
- Hex needs no escaping. A password containing `@ : / %` must be percent-encoded in the URI, or the
|
|
293
|
+
refresher fails at start with `InvalidURI`.
|
|
294
|
+
- The refresher password goes in the TOML's URI, and it must match its secret.
|
|
295
|
+
- Pass each secret on stdin (`-`) or from a file you delete afterwards, so nothing stays on disk.
|
|
296
|
+
```bash
|
|
297
|
+
docker secret create envlib_api_mongo_root_password - # paste, then Ctrl-D
|
|
298
|
+
docker secret create envlib_api_mongo_refresher_password -
|
|
299
|
+
docker secret create envlib_api_toml - <<'EOF'
|
|
300
|
+
[mongo]
|
|
301
|
+
uri = "mongodb://refresher:<refresher password>@mongo:27017/envlib_api?authSource=envlib_api"
|
|
302
|
+
|
|
303
|
+
[sentry]
|
|
304
|
+
dsn = "https://<key>@<org>.ingest.sentry.io/<project>" # without it nothing alerts (the log says so at start)
|
|
305
|
+
monitor_slug = "envlib-api-refresher"
|
|
306
|
+
EOF
|
|
307
|
+
```
|
|
308
|
+
- `envlib_api/config.py` has every TOML key.
|
|
309
|
+
- The `dsn` must be a full `https://` URL. Anything else (a placeholder left in, for instance) makes
|
|
310
|
+
the refresher crash-loop at start with sentry-sdk's `BadDsn: Unsupported scheme ''`, which is what
|
|
311
|
+
happened on the first deploy.
|
|
312
|
+
- The Sentry cron monitor is created by the first check-in (`monitor_config`), so it needs no setup.
|
|
313
|
+
3. **Build and push the image** from a checkout whose lock comes from PyPI (the Dockerfile's header
|
|
314
|
+
explains why):
|
|
315
|
+
```bash
|
|
316
|
+
docker build -t mullenkamp/envlib-api:0.1.0 . && docker push mullenkamp/envlib-api:0.1.0
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Then, from the checkout on the manager:
|
|
320
|
+
```bash
|
|
321
|
+
git pull
|
|
322
|
+
docker stack deploy -c docker-swarm.yml envlib-api
|
|
323
|
+
```
|
|
324
|
+
Bump the image tag with every code change, and bump a config's `name:` with every change of its
|
|
325
|
+
file, because configs are immutable.
|
|
326
|
+
|
|
327
|
+
**Replacing a secret** (they are immutable too). A service holds the secrets it uses, so detach first:
|
|
328
|
+
```bash
|
|
329
|
+
docker service update --detach --secret-rm envlib_api_toml envlib-api_refresher
|
|
330
|
+
docker secret rm envlib_api_toml
|
|
331
|
+
docker secret create envlib_api_toml - # the corrected TOML on stdin
|
|
332
|
+
docker stack deploy -c docker-swarm.yml envlib-api # re-attaches it and restarts the refresher
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
## Operations
|
|
336
|
+
|
|
337
|
+
- **Status:** `docker exec -it $(docker ps -qf name=envlib-api_refresher) envlib-api status`. It
|
|
338
|
+
shows one row per dataset and exits 1 if any is stale (`checked_at` older than 3 polls), missing,
|
|
339
|
+
unapplied, or stuck applying. Retired datasets are listed but not flagged.
|
|
340
|
+
- **A blocked retire** (logged and alerted once): check the catalogue. If the removal is intended, run
|
|
341
|
+
`envlib-api allow-retires` in the refresher container.
|
|
342
|
+
- It acknowledges the current catalogue uuid.
|
|
343
|
+
- It allows **one** retire pass that ignores the cap and the empty-catalogue guard.
|
|
344
|
+
- That pass must come within an hour, and it is consumed when used.
|
|
345
|
+
- It refuses while the catalogue mirror is not applied.
|
|
346
|
+
- **Never mirrored:** `status` also lists catalogue entries that have no dataset document. A new
|
|
347
|
+
entry shows that way for up to one cycle; one that stays is failing, and Sentry has its error.
|
|
348
|
+
- **Changing the refresher password:** Swarm secrets are immutable, and `init-users.js` runs only on
|
|
349
|
+
an empty volume.
|
|
350
|
+
1. As root in the `mongo` container, run
|
|
351
|
+
`db.getSiblingDB("envlib_api").changeUserPassword("refresher", "<new>")`.
|
|
352
|
+
2. Create new secrets under new names (e.g. `envlib_api_toml_v2`), both the password and the TOML.
|
|
353
|
+
3. Point `docker-swarm.yml` at the new names, and redeploy.
|
|
354
|
+
- **If `mongo`'s first start fails** (for example, `init-users.js` could not read a secret), the volume
|
|
355
|
+
is already initialised and the script will not run again. Remove the stack and the volume
|
|
356
|
+
(`docker volume rm envlib_api_mongo` on its node), fix the cause, and deploy again.
|
|
357
|
+
- **Stopping the refresher:** `docker service scale envlib-api_refresher=0`, and `=1` to restart it.
|
|
358
|
+
While it is stopped, `checked_at` ages, `status` flags every dataset, and Sentry alerts on the missed
|
|
359
|
+
check-ins.
|
|
360
|
+
- **Rebuilding MongoDB**, for example after a lost volume or a suspected divergence:
|
|
361
|
+
1. scale the refresher to 0 (and the API);
|
|
362
|
+
2. drop the database: `docker exec -it <mongo container> mongosh -u root -p --authenticationDatabase admin --eval 'db.getSiblingDB("envlib_api").dropDatabase()'`;
|
|
363
|
+
3. scale the refresher back to 1.
|
|
364
|
+
|
|
365
|
+
Its start re-creates the schema, and the first cycle re-mirrors everything: about 220 MB of indexes
|
|
366
|
+
from B2, in about 75 s. Never drop collections under a running refresher, because it would
|
|
367
|
+
recreate them without validators, compressors or the TTL index. The refresher's role and user
|
|
368
|
+
survive `dropDatabase` (checked on 9.0.8). On a new, empty volume, `mongo/init-users.js` creates
|
|
369
|
+
them; it runs by itself only then.
|
|
370
|
+
- **Upgrading MongoDB:** follow the binary-then-feature-compatibility-version pattern in
|
|
371
|
+
`dshg/mvp/web_app/MONGO_DEPLOY.md`. Or, since the data is derived, rebuild on the new version.
|
|
372
|
+
- **autoheal is not running on the cluster** (checked 2026-11-24: no service, and no container on
|
|
373
|
+
uswest11), although `tethys-docker-swarm/autoheal/` defines one with `AUTOHEAL_CONTAINER_LABEL=all`.
|
|
374
|
+
Swarm replaces an unhealthy task itself, and waits for the old container to exit first. If autoheal is
|
|
375
|
+
ever deployed, its in-place restart of the old container beside Swarm's replacement could make a second
|
|
376
|
+
refresher. The refresher therefore carries the container label `autoheal=False`, which is autoheal's
|
|
377
|
+
opt-out according to the code review's reading of its source. The label is on the running container,
|
|
378
|
+
checked with `docker inspect`. Whether a deployed autoheal honours it is untested.
|
|
379
|
+
- **Seeing how a task stopped:** scaling a service down deletes its tasks, together with their logs,
|
|
380
|
+
so `docker service ps` and `docker service logs` no longer show them. Docker's event log still does:
|
|
381
|
+
`docker events --since 30m --until 0s --filter label=com.docker.swarm.service.name=envlib-api_refresher`
|
|
382
|
+
shows each `kill` (with its signal) and `die` (with its exit code).
|
|
383
|
+
- **The role** is `readWrite` plus `collMod` on `envlib_api` (`mongo/refresher-role.json`). It includes
|
|
384
|
+
`dropCollection`, which the refresher never uses. It is kept that broad because a hand-written action
|
|
385
|
+
list would break silently the first time ebooklet's schema code needs another action.
|
|
386
|
+
- **Local runs** (`docker-compose.yml`) take their secrets from `~/.envlib/envlib-api-local`, never
|
|
387
|
+
production's directory. Give the local TOML its own Sentry environment, or no DSN.
|
|
388
|
+
|
|
389
|
+
## Development
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
uv sync
|
|
393
|
+
docker run -d --rm --name envlib-api-test-mongo -p 127.0.0.1:27092:27017 --tmpfs /data/db \
|
|
394
|
+
-e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_ROOT_PASSWORD=testpw mongo:9.0.8
|
|
395
|
+
ENVLIB_API_TEST_MONGO_URI='mongodb://root:testpw@127.0.0.1:27092/?authSource=admin' uv run pytest
|
|
396
|
+
```
|
|
397
|
+
- The tests use real ebooklet remotes on a moto S3 server and a real MongoDB with auth, connecting
|
|
398
|
+
as the production roles (`mongo/refresher-role.json`, `mongo/api-role.json`).
|
|
399
|
+
- The API tests build their station datasets with envlib-ingest-base's `build_and_publish`, the real
|
|
400
|
+
producer, and compare every answer with a direct cfdb read and with the producer's input
|
|
401
|
+
(`envlib_api/tests/api_support.py`). The schema tests validate against the CoverageJSON and EDR 1.2
|
|
402
|
+
schemas vendored in `envlib_api/tests/schemas/`.
|
|
403
|
+
- `planning/mutate.py` runs the mutants in `planning/mutants.json` (the refresher) and
|
|
404
|
+
`planning/mutants_api.json` (the API). Every one must be KILLED except the documented equivalent
|
|
405
|
+
(`planning/mutants_result.txt`, `planning/mutants_api_result.txt`).
|
|
406
|
+
- `planning/close_check_api.py` compares a running API with direct envlib reads of the live datasets.
|
|
407
|
+
- `benchmarks/` times the API's hot paths, and an A/B of the previous release against the candidate
|
|
408
|
+
is a release step (`benchmarks/README.md`).
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
envlib_api/__init__.py,sha256=mSLW0_sknQ3Y47AQdq9ByTpZjXHvvsvPfsJbY-Vx6d8,145
|
|
2
|
+
envlib_api/__main__.py,sha256=kFyMLx_I6WqE6azz1Yxb1iee3lWcQIBFdCbpa4DwHYc,38
|
|
3
|
+
envlib_api/cli.py,sha256=H8r2S6zM9Ih-KNoSnS4hhE59a7KL-BhJipodEIwBl_0,6936
|
|
4
|
+
envlib_api/config.py,sha256=rdVgXkbejJDWGIc5_nRz7lhWzqln3qkN6-CDk_XLfgk,5965
|
|
5
|
+
envlib_api/healthcheck.py,sha256=EOQpAwRPx3tOy7BM9R_3GUyinl5vigc0EmrsICBjBzY,1289
|
|
6
|
+
envlib_api/mirror.py,sha256=4N4y9Dm79WqgtIn1Yavv087QgZNz9WSSy1CYJpDGjbY,15854
|
|
7
|
+
envlib_api/refresher.py,sha256=ZjrUnCyqXzNqSwQeuamx9NiVIeBrK6_wZTBP9G80uUg,12423
|
|
8
|
+
envlib_api/api/__init__.py,sha256=x36AIXEOjmMyYkv-soTntpST8M_1U2q39FaKasWwrCY,358
|
|
9
|
+
envlib_api/api/app.py,sha256=o0hnVQIRazeox6Mzs8FLy6mIEEz4-oYEVX8Ts1WlA9k,18449
|
|
10
|
+
envlib_api/api/compress.py,sha256=y5CjotNRTVhuirvBgI-Io5_777wasO27fS5I-d-oG7E,1653
|
|
11
|
+
envlib_api/api/cost.py,sha256=5PJtVcmOkYZigTZTNsR8ndYw62r4qatlxxdLoMhYg0I,4316
|
|
12
|
+
envlib_api/api/edr.py,sha256=EvzjpKOMMuACP1PAbqQJbo8DilKZvF9EsLqNgtr-2Cw,13002
|
|
13
|
+
envlib_api/api/encode.py,sha256=HbD7Bn9hxpRGz1Og1Mst2U17LsMJa5LAZBKdIscR6Vo,11305
|
|
14
|
+
envlib_api/api/errors.py,sha256=I7d1JVnp25eseTieWuJlebd0AwRQUUGWmidaThYE4sk,811
|
|
15
|
+
envlib_api/api/grid.py,sha256=N7vHjG-3Vd3qH4uVP1un2AKahUtfEKFF9OKp-CYUq78,14661
|
|
16
|
+
envlib_api/api/params.py,sha256=h4fPiq4hYPnBtcmzGnc3Yq3_1lWSEeCGW5KcZZYsNJw,2824
|
|
17
|
+
envlib_api/api/read.py,sha256=oPKBwmzjPFfTcPnnIvlP-X4azF8mXoY-mX7NjoMZETk,2749
|
|
18
|
+
envlib_api/api/resolve.py,sha256=BMp7mHoLTWhrzias4NRqeGVCJXpibKz7Be3nE9V0aDI,8157
|
|
19
|
+
envlib_api/api/server.py,sha256=HH2zenem8as5bjD8fxRn5ZWAcmlwZFCcIaHrCJp9HYM,958
|
|
20
|
+
envlib_api/api/stations.py,sha256=Fv5_b9peDvMA5JSt63rLFQ_qdl_NOP1ilrKjZwwsmsw,3806
|
|
21
|
+
envlib_api/api/timesel.py,sha256=_DTP6XPVHhmWFr7fbS1cLOGGEbrSkF6s3WEZUPuivvE,3947
|
|
22
|
+
envlib_api/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
+
envlib_api/tests/api_support.py,sha256=jIX17bfBiSEbctH53A3HG9S5X8ebHpkdo6Wkwffjsqw,12065
|
|
24
|
+
envlib_api/tests/conftest.py,sha256=U2zFh9e7RqGP8AUaJ6jAeIUo7DhOBlXuMAuttZy44gE,404
|
|
25
|
+
envlib_api/tests/grid_support.py,sha256=RGhbPu8oCNAQDtqL3HUaD0cM4xDzxMz_UhCwzLAhHJA,9169
|
|
26
|
+
envlib_api/tests/support.py,sha256=tx1cSPpYOAlpxXnoxPaPdHFJEAm6pwQdC9MzNqTzsa0,11912
|
|
27
|
+
envlib_api/tests/test_alerting_and_guards.py,sha256=wACLQqN9za3GBmH7JywrKSZ8sxTd1BSMwDFBf0HcmoI,13196
|
|
28
|
+
envlib_api/tests/test_api.py,sha256=FtNxAlk0Edawny7Ezk9Qd5KXjm_HwVP4R-RVwPV3p8M,36250
|
|
29
|
+
envlib_api/tests/test_api_review.py,sha256=OKs0VTxp6mbRXlu-QKxlWWMk7lIhpR7EhV09OcBgnpU,19501
|
|
30
|
+
envlib_api/tests/test_grid.py,sha256=1w5_pLxV6J7dCA6TIPh0EgvLGbsuiJJGPhZlE8_tFLo,49497
|
|
31
|
+
envlib_api/tests/test_ops.py,sha256=hK2xwoWHa_0dgzGPB5XkAiAOKyqlSIESKmkmD_PbVL4,13733
|
|
32
|
+
envlib_api/tests/test_refresher.py,sha256=nK6DDXwpUmiblN8bKal-pJwj1d7z26qGgTrkPybs_BU,14306
|
|
33
|
+
envlib_api/tests/test_schemas.py,sha256=1PgQxc7Jq86Pfub_n6iJhUdrvph72ZIBjWLr2fgflRQ,3389
|
|
34
|
+
envlib_api/tests/schemas/README.md,sha256=0iyavQS1WeCrGNoMpl1cEh5Q5GEYo2qqa683weovjq8,784
|
|
35
|
+
envlib_api/tests/schemas/coveragejson/coveragejson.json,sha256=VA3GRVhjtjFgladGNxAwpNXhqZ4tYTUwP8-Ojv_EFu8,47629
|
|
36
|
+
envlib_api/tests/schemas/edr/schemas/i18n.yaml,sha256=Zn1NR7wXo88vA67lxTHm6X3Wzl29N1hCARFQuLsZcd4,112
|
|
37
|
+
envlib_api/tests/schemas/edr/schemas/numberMatched.yaml,sha256=eYaqojHbh-iaAYiUcLwPadkUod4HdCIMn6HcKjZkf2Q,155
|
|
38
|
+
envlib_api/tests/schemas/edr/schemas/numberReturned.yaml,sha256=gy_jO86ISRcAISZCZW5pCa4QS1y274bhIU9abRpT2uU,359
|
|
39
|
+
envlib_api/tests/schemas/edr/schemas/parameterGroup.yaml,sha256=gQrzy5CbZSInkSq0B1IUgQSMwIKpS3UxTxEnqF7qg7M,555
|
|
40
|
+
envlib_api/tests/schemas/edr/schemas/collections/DataQuery.yaml,sha256=kcLdcKtYyO6b9RVcjsx_Y-10jLP-IR_70Sjk8J6ENVw,1058
|
|
41
|
+
envlib_api/tests/schemas/edr/schemas/collections/areaDataQuery.yaml,sha256=JsPhn4Lxog8lQYqUmjBEbhwlaM0x5-5r60creaJXj3w,162
|
|
42
|
+
envlib_api/tests/schemas/edr/schemas/collections/areaLink.yaml,sha256=ylSlsm21qlEQOlZfyvIrHPMbKFkpgAGDbCoySsge3HA,190
|
|
43
|
+
envlib_api/tests/schemas/edr/schemas/collections/collection.yaml,sha256=L0jkziTcPcHVeseT3xDpiM1RzEEPu38E5RrR81lOyNg,3329
|
|
44
|
+
envlib_api/tests/schemas/edr/schemas/collections/collections.yaml,sha256=jd2gVcjetiSQ-JZ1k7CvJfXOQ4g7ehzgNTPhoIlhejU,610
|
|
45
|
+
envlib_api/tests/schemas/edr/schemas/collections/corridorDataQuery.yaml,sha256=8qOeMp61XT5HnnxFUbjrYrL6b1-NaeTpnbs--k7fQ4I,590
|
|
46
|
+
envlib_api/tests/schemas/edr/schemas/collections/corridorLink.yaml,sha256=bBZw63Bboz357ewBF-GFwA5CSxWhAYA70-JrkcXlYVA,198
|
|
47
|
+
envlib_api/tests/schemas/edr/schemas/collections/crsObject.yaml,sha256=ILWtqlQ_Sgm24j5PxW1a898DeybfteKxn8G5WwF88sY,628
|
|
48
|
+
envlib_api/tests/schemas/edr/schemas/collections/cubeDataQuery.yaml,sha256=TubXm-8hxKptTyunfp0YZTBykFcETnHSBgEpdg5pliQ,371
|
|
49
|
+
envlib_api/tests/schemas/edr/schemas/collections/cubeLink.yaml,sha256=PSS794zMnfkPNPoc7sCbEFWFXfcdakRurxFckLX_Xwo,190
|
|
50
|
+
envlib_api/tests/schemas/edr/schemas/collections/extent.yaml,sha256=DfDjGJqk3G8Jo_tl3kSRwGp4ts7VmbLIh5DGfPblrfg,11040
|
|
51
|
+
envlib_api/tests/schemas/edr/schemas/collections/instancesDataQuery.yaml,sha256=sNFzn9N-IUeocyqdDLmFvYRQTlbwvMLVCsLSuW5VIhs,531
|
|
52
|
+
envlib_api/tests/schemas/edr/schemas/collections/instancesLink.yaml,sha256=WPIB40lfcgWfqmDBxhEGVezl6CUXCOKpNBUc4oH9F3o,200
|
|
53
|
+
envlib_api/tests/schemas/edr/schemas/collections/itemsDataQuery.yaml,sha256=j2Ozbw-jBbR8UK9hlfX4gHVP9YZ3TfxC51oevkHvahU,509
|
|
54
|
+
envlib_api/tests/schemas/edr/schemas/collections/itemsLink.yaml,sha256=DafkIegp_i-TULhyYQDuBTD3Zyej0sIqRNSiepyAAPM,192
|
|
55
|
+
envlib_api/tests/schemas/edr/schemas/collections/locationsDataQuery.yaml,sha256=50fznf0ntm-IsQdULbYTHZe35zkEwRi5qQux0j8CvqQ,171
|
|
56
|
+
envlib_api/tests/schemas/edr/schemas/collections/locationsLink.yaml,sha256=Oz3F99zyh1a8fJSs_tB8QkLCHKAFyDPNhXA4Z6Cu9Ng,200
|
|
57
|
+
envlib_api/tests/schemas/edr/schemas/collections/observedPropertyCollection.yaml,sha256=H3mwURTMF8xqyNOlofPG0ZzDkt0S_cXbpH5R_oYjuYs,1120
|
|
58
|
+
envlib_api/tests/schemas/edr/schemas/collections/parameterNames.yaml,sha256=KMwTnvn7BQkuFFf4Hzzo0yM10AvBLSEOKG0c7SrF7_o,1695
|
|
59
|
+
envlib_api/tests/schemas/edr/schemas/collections/positionDataQuery.yaml,sha256=eO4uYKppwLacoA2nJQsh0sY0EqpY3sokqoTjPUekYv4,195
|
|
60
|
+
envlib_api/tests/schemas/edr/schemas/collections/positionLink.yaml,sha256=1RQJ9MGC4jcR1_UtrSDyDZtugS_-SDYqKUdaH_LMkO4,198
|
|
61
|
+
envlib_api/tests/schemas/edr/schemas/collections/radiusDataQuery.yaml,sha256=BXBD2pdY8w9_6NphDTBeJDHseJ6iZ6Plq2OcYMlGOP8,346
|
|
62
|
+
envlib_api/tests/schemas/edr/schemas/collections/radiusLink.yaml,sha256=1oUf51L_mlkNtGzRjANYpux9CMVKurOPGA9QAaWph0k,194
|
|
63
|
+
envlib_api/tests/schemas/edr/schemas/collections/trajectoryDataQuery.yaml,sha256=RDi4KFQnSZ4GH9JnV6Tup8Fs50hkWbK-_RsjZmJ9Wc0,174
|
|
64
|
+
envlib_api/tests/schemas/edr/schemas/collections/trajectoryLink.yaml,sha256=iKNZtm8-aFrgjh7nl3fN2ATatzloGOt5mIvrnz3kh3k,202
|
|
65
|
+
envlib_api/tests/schemas/edr/schemas/collections/units.yaml,sha256=chAyyUuFyfj-E0G1wsE-MJNqQKZIlUNAXIsSuio457k,922
|
|
66
|
+
envlib_api/tests/schemas/edr/schemas/core/confClasses.yaml,sha256=6J5iKa8b3p13lUNo9v8Aa__Rnwcc6jCqSWVjS1XlFh4,110
|
|
67
|
+
envlib_api/tests/schemas/edr/schemas/core/exception.yaml,sha256=5EcYeEfg3j4Lt1prvqFuqGxyu1z2nwjHKo8TP6f-_Tw,100
|
|
68
|
+
envlib_api/tests/schemas/edr/schemas/core/landingPage.yaml,sha256=pcsSmhNoBhIEy8uw6zkWCAVxY_J-O1GUCb0wpuDUTEA,1781
|
|
69
|
+
envlib_api/tests/schemas/edr/schemas/core/link.yaml,sha256=fjybsHhsvk4XPxGvdXuDzPbdPx3Z1bo1PcridLKdYTs,575
|
|
70
|
+
envlib_api/tests/schemas/edr/schemas/covjson/anyAxis.yaml,sha256=_S3e4E05_O-AmRT6rHyz2KUwhJD555OXuJsoPnGxU7s,368
|
|
71
|
+
envlib_api/tests/schemas/edr/schemas/covjson/coverage.yaml,sha256=7RM9d5FatKUJihYS2FedL90F2OW1T__2mNyvURwqWNg,425
|
|
72
|
+
envlib_api/tests/schemas/edr/schemas/covjson/coverageBase.yaml,sha256=nNjPUcAfcITsDm50NqQF8m40QQs-F9ixNxdxKYMyLQU,1613
|
|
73
|
+
envlib_api/tests/schemas/edr/schemas/covjson/coverageCollection.yaml,sha256=AGwyXORuW5EltTqTqkeU4jtrWrMZXbMlN0Y4tpahTzo,1452
|
|
74
|
+
envlib_api/tests/schemas/edr/schemas/covjson/coverageJSON.yaml,sha256=RbI2ZwCGIJExhi7nLgXOAJ99TH6VQ1M8JPjKVUEdSnE,958
|
|
75
|
+
envlib_api/tests/schemas/edr/schemas/covjson/covjsonI18n.yaml,sha256=5xveA0S-q10piqVqs274oPQjit-QAjV9hAI1J_dUjcQ,621
|
|
76
|
+
envlib_api/tests/schemas/edr/schemas/covjson/covjsonObservedProperty.yaml,sha256=g2lxAf65WUJefhhMUtSAGy7XjiA83lSvoBSDtiPvXJk,720
|
|
77
|
+
envlib_api/tests/schemas/edr/schemas/covjson/covjsonParameter.yaml,sha256=hjk2GCNRrYXE8Vi-GWkRnBrmc8iSd57js63X3D949Dg,935
|
|
78
|
+
envlib_api/tests/schemas/edr/schemas/covjson/covjsonParameterGroup.yaml,sha256=Hl3a-REUglgVrvHBtUhpMVNcTmCc3M3DJh7SoM-jnHg,788
|
|
79
|
+
envlib_api/tests/schemas/edr/schemas/covjson/covjsonUnit.yaml,sha256=vNnwr-Sa-k8DE5BeYyGL81ipT7SH7UNkt9pl6wL9i0s,704
|
|
80
|
+
envlib_api/tests/schemas/edr/schemas/covjson/domain.yaml,sha256=c2hJ05ksBHtNj7EJzjiexrSJdlIOxxP13N50Wgceduc,297
|
|
81
|
+
envlib_api/tests/schemas/edr/schemas/covjson/domainBase.yaml,sha256=1s4o07klUAeOjDqMmj63hMrWOa7PYOd0zNMskZzjtOQ,10845
|
|
82
|
+
envlib_api/tests/schemas/edr/schemas/covjson/ndArray.yaml,sha256=E_rG1tJJEuYCqdnEsaWxc5ba6CKeAKvXHWcwDDckCHs,1771
|
|
83
|
+
envlib_api/tests/schemas/edr/schemas/covjson/numericAxis.yaml,sha256=vpDxqFleDTTeFni12P0Nkg4wsedpk3BU07EZPby0FSw,392
|
|
84
|
+
envlib_api/tests/schemas/edr/schemas/covjson/numericRegularlySpacedAxis.yaml,sha256=kXQZswSGFQZQEtutFBX7WA23A4CYl2sF7OWO7-bytMM,463
|
|
85
|
+
envlib_api/tests/schemas/edr/schemas/covjson/numericSingleValueAxis.yaml,sha256=gAtATyGMRDqRdiBAkrzswxrnxd6IOz07Pj0GwHejctg,386
|
|
86
|
+
envlib_api/tests/schemas/edr/schemas/covjson/numericValuesAxis.yaml,sha256=BUrY5XEI4TmqH1OTgZyDic5Iz71v8rv7JW3J_h7TbwU,507
|
|
87
|
+
envlib_api/tests/schemas/edr/schemas/covjson/polygonValuesAxis.yaml,sha256=qTqKD57FAxHfX8jU0J_C6reP0Krw97QPb3Hm4Ub5k_g,858
|
|
88
|
+
envlib_api/tests/schemas/edr/schemas/covjson/primitiveValuesAxis.yaml,sha256=0Ivl0OIFumE2XuBog71nVMEiSzmhdJq35GMY9pXJ5Pg,701
|
|
89
|
+
envlib_api/tests/schemas/edr/schemas/covjson/referenceSystem.yaml,sha256=akbHRJ3-drJeUAJQlIycY-2yzuS--aZ0hykpRBhj3mQ,1173
|
|
90
|
+
envlib_api/tests/schemas/edr/schemas/covjson/referenceSystemConnection.yaml,sha256=6G6eOAEd3Mtkrt_ScIyrMfVgcfacl0_GxSidGYe94Ok,522
|
|
91
|
+
envlib_api/tests/schemas/edr/schemas/covjson/stringSingleValueAxis.yaml,sha256=wgUEYvqcRS_WXyde3j6SHqXpHLL8T_K9ckpAisU3KP4,383
|
|
92
|
+
envlib_api/tests/schemas/edr/schemas/covjson/stringValuesAxis.yaml,sha256=_KM3HpB7c0k-4HaqNpMi1X41yRsUSo7b_8tvnrxQH2o,493
|
|
93
|
+
envlib_api/tests/schemas/edr/schemas/covjson/targetConcept.yaml,sha256=n5K8-vzhKzXyMcMboblKz-5nA500YrDbp-Acubbx-Rg,383
|
|
94
|
+
envlib_api/tests/schemas/edr/schemas/covjson/tiledNdArray.yaml,sha256=o_RQPUtfPVEz7MRpRmtK_kKmLfq10YHVef2WZcAbpfY,1119
|
|
95
|
+
envlib_api/tests/schemas/edr/schemas/covjson/tupleValuesAxis.yaml,sha256=6ZTilrJ4ieHiDu1ghto9DObJZhSw2eilRT9iB955vfQ,700
|
|
96
|
+
envlib_api/tests/schemas/edr/schemas/covjson/valuesAxis.yaml,sha256=GK9l4NHyifeqetjTS-b8N411k4tqxvdYB7j9GUhVhI8,734
|
|
97
|
+
envlib_api/tests/schemas/edr/schemas/covjson/valuesAxisBase.yaml,sha256=YR0mVFmDZRIxpI9MYw58Hc-xUx6L7YjWltsO7MfpWcs,661
|
|
98
|
+
envlib_api/tests/schemas/edr/schemas/edr-geojson/edrFeatureCollectionGeoJSON.yaml,sha256=ymIaQe4Uu7u9B_hEF3UioGwPVvNFN7HoSPpE9onqNs4,746
|
|
99
|
+
envlib_api/tests/schemas/edr/schemas/edr-geojson/edrProperties.yaml,sha256=TujclBWLLaewMDOEiITXAaTTyQI6NvvYFlUZQVomoOI,1778
|
|
100
|
+
envlib_api/tests/schemas/edr/schemas/edr-geojson/observedProperty.yaml,sha256=i269pHjRrQ_qYwodQzc86TybGQvN_iHexEe7lcijqbA,464
|
|
101
|
+
envlib_api/tests/schemas/edr/schemas/edr-geojson/parameter.yaml,sha256=VSldS7D_EGkxHnM4DUzXaoPIxGkqaqueZ4R_b8FFtyc,639
|
|
102
|
+
envlib_api/tests/schemas/edr/schemas/edr-geojson/unit.yaml,sha256=ZybDt15PCkCqIX9-xlgPcBh3FvbXlrvMS4eLHxZ9Q-g,397
|
|
103
|
+
envlib_api/tests/schemas/edr/schemas/geojson/featureGeoJSON.yaml,sha256=kNgoJYsFcK1SOP51ljYFrzQbdxV2zod0KV2WJcWpDiU,596
|
|
104
|
+
envlib_api/tests/schemas/edr/schemas/geojson/geometrycollectionGeoJSON.yaml,sha256=IaZQLmHXptb17R1zYe8pi87nAOcu4JLV2fUJh3-yXwg,396
|
|
105
|
+
envlib_api/tests/schemas/edr/schemas/geojson/linestringGeoJSON.yaml,sha256=zIHkqOhPB3BkGHNnK7Pjt8DIz7caYEY6Ef97xazhqIE,363
|
|
106
|
+
envlib_api/tests/schemas/edr/schemas/geojson/multilinestringGeoJSON.yaml,sha256=mcbPCKP8964YAKu-fgtCCDkkv7glQqQP4_e9jkdGEXs,287
|
|
107
|
+
envlib_api/tests/schemas/edr/schemas/geojson/multipointGeoJSON.yaml,sha256=eUhFOJ_Ew0t3Ll34KG6c8EEBF2cFXUygpq2BWhaIC2U,225
|
|
108
|
+
envlib_api/tests/schemas/edr/schemas/geojson/multipolygonGeoJSON.yaml,sha256=QUSjGvai1heGukcI0oBI7MuB814LZGDdUeoqh4RazwM,329
|
|
109
|
+
envlib_api/tests/schemas/edr/schemas/geojson/pointGeoJSON.yaml,sha256=8tq2EH_izXySu53wglTtewN9qnrSod-hGRAIMkppTtI,185
|
|
110
|
+
envlib_api/tests/schemas/edr/schemas/geojson/polygonGeoJSON.yaml,sha256=h_z8pOM9V0yXK4XbpbrJn1dXSbZy7w7rOu-axzWQla4,279
|
|
111
|
+
envlib_api/tests/schemas/edr/schemas/queries/instances.yaml,sha256=TH4SQUvhUHcX4NdhMKdZSIxPkIHEI_HSAgpmIJCUgyE,681
|
|
112
|
+
envlib_api-0.3.0.dist-info/METADATA,sha256=KwvlTiaHdxsmk7mR77TWX51Z3hQFraTI3Z1p3XrPNt4,28497
|
|
113
|
+
envlib_api-0.3.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
114
|
+
envlib_api-0.3.0.dist-info/entry_points.txt,sha256=KsSKItfqMD6C9AeZe64p4rJKvwm2B0I63jAeZwkzfPQ,97
|
|
115
|
+
envlib_api-0.3.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
116
|
+
envlib_api-0.3.0.dist-info/RECORD,,
|