eolas-data 1.3.21__tar.gz → 1.4.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.
Files changed (48) hide show
  1. {eolas_data-1.3.21 → eolas_data-1.4.0}/.github/workflows/publish.yml +17 -0
  2. eolas_data-1.4.0/CHANGELOG.md +68 -0
  3. {eolas_data-1.3.21 → eolas_data-1.4.0}/PKG-INFO +4 -1
  4. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/__init__.py +13 -1
  5. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/cli.py +460 -222
  6. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/client.py +307 -110
  7. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/library.py +68 -13
  8. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/meta.py +14 -7
  9. {eolas_data-1.3.21 → eolas_data-1.4.0}/pyproject.toml +4 -2
  10. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_changes_http.py +25 -2
  11. eolas_data-1.4.0/tests/test_preview_dimensions.py +82 -0
  12. eolas_data-1.4.0/tests/test_resilience.py +95 -0
  13. {eolas_data-1.3.21 → eolas_data-1.4.0}/.github/workflows/catalog-drift.yml +0 -0
  14. {eolas_data-1.3.21 → eolas_data-1.4.0}/.github/workflows/pre-release.yml +0 -0
  15. {eolas_data-1.3.21 → eolas_data-1.4.0}/.github/workflows/smoke.yml +0 -0
  16. {eolas_data-1.3.21 → eolas_data-1.4.0}/.github/workflows/test.yml +0 -0
  17. {eolas_data-1.3.21 → eolas_data-1.4.0}/.gitignore +0 -0
  18. {eolas_data-1.3.21 → eolas_data-1.4.0}/LICENSE +0 -0
  19. {eolas_data-1.3.21 → eolas_data-1.4.0}/README.md +0 -0
  20. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/_dataset_names.py +0 -0
  21. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/_regen_names.py +0 -0
  22. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/cdc.py +0 -0
  23. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/console.py +0 -0
  24. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/dataset.py +0 -0
  25. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/exceptions.py +0 -0
  26. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/rows.py +0 -0
  27. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/schedule.py +0 -0
  28. {eolas_data-1.3.21 → eolas_data-1.4.0}/eolas_data/search.py +0 -0
  29. {eolas_data-1.3.21 → eolas_data-1.4.0}/scripts/check_client_contract.py +0 -0
  30. {eolas_data-1.3.21 → eolas_data-1.4.0}/scripts/preflight.sh +0 -0
  31. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/fixtures/source_helpers.json +0 -0
  32. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_as_arrow.py +0 -0
  33. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_cdc_roundtrip.py +0 -0
  34. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_cli.py +0 -0
  35. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_client.py +0 -0
  36. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_date_filter.py +0 -0
  37. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_get_local.py +0 -0
  38. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_keyring.py +0 -0
  39. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_library.py +0 -0
  40. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_meta.py +0 -0
  41. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_progress.py +0 -0
  42. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_rows.py +0 -0
  43. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_schedule.py +0 -0
  44. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_search.py +0 -0
  45. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_smoke_live.py +0 -0
  46. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_source_helpers.py +0 -0
  47. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_sync_bulk.py +0 -0
  48. {eolas_data-1.3.21 → eolas_data-1.4.0}/tests/test_sync_changes.py +0 -0
@@ -49,6 +49,23 @@ jobs:
49
49
  pip install "$WHL"
50
50
  pip install pytest responses geopandas shapely pandas pyarrow typer rich keyring
51
51
 
52
+ - name: Version self-report parity (REL-1)
53
+ env:
54
+ TAG: ${{ github.ref_name }}
55
+ run: |
56
+ set -euo pipefail
57
+ expected="${TAG#v}"
58
+ # __version__ is read from installed distribution metadata, so this
59
+ # asserts the wheel the user pip-installs self-reports the tag — the
60
+ # exact drift (shipped 1.3.21 said 1.3.20) that this gate structurally
61
+ # closes. Run from /tmp so the source tree's __init__ can't shadow.
62
+ reported=$(cd /tmp && python -c "import eolas_data; print(eolas_data.__version__)")
63
+ echo "Tag: $expected | __version__: $reported"
64
+ if [ "$reported" != "$expected" ]; then
65
+ echo "::error::Installed eolas_data.__version__ ($reported) != tag ($expected)"
66
+ exit 1
67
+ fi
68
+
52
69
  - name: Client contract matrix
53
70
  run: python scripts/check_client_contract.py
54
71
 
@@ -0,0 +1,68 @@
1
+ # Changelog
2
+
3
+ All notable changes to `eolas-data` are recorded here. This project follows
4
+ [Semantic Versioning](https://semver.org/).
5
+
6
+ ## 1.4.0
7
+
8
+ ### Added
9
+
10
+ - **`Client.preview(name)`** — up to 10 sample rows via the unauthenticated
11
+ `/preview` endpoint. No API key required, no rate-limit cost, geometry hidden.
12
+ `eolas datasets preview` now uses it instead of burning an authenticated,
13
+ rate-limited `/data` call (DRIFT-5).
14
+ - **`dimensions=` filter on `get()`** and `eolas get --dimensions` — a
15
+ case-insensitive substring filter on dimension columns, applied server-side on
16
+ the live `/data` path (the filter was live in prod but exposed by no client;
17
+ DRIFT-4).
18
+
19
+ ## 1.3.22
20
+
21
+ Network-hardening + correctness release, addressing findings from the
22
+ 2026-07-05 client-library audit.
23
+
24
+ ### Fixed
25
+
26
+ - **Request timeouts everywhere (EH-1).** Every HTTP call now carries a default
27
+ `(10, 300)` second (connect, read) timeout via a session subclass. A
28
+ black-holed connection raises instead of hanging the caller forever. Override
29
+ with `Client(timeout=...)`.
30
+ - **Clean errors on transport failures (EH-2).** Connection refused / DNS /
31
+ timeout / reset now surface as `EolasError("Network error talking to
32
+ api.eolas.fyi: ...")` instead of a raw urllib3 traceback. The CLI's existing
33
+ error handler renders them cleanly.
34
+ - **Atomic downloads (EH-5).** `download()` / `download_bulk()` write to a temp
35
+ file and atomically rename on success, and verify bytes received against
36
+ `Content-Length`. An interrupted or truncated download now leaves **no file**
37
+ at the final path instead of a silent partial.
38
+ - **`get()` no longer degrades a bulk failure to a misleading 413 (EH-3).** The
39
+ auto-route swallow is narrowed to the routing decision; a real failure in the
40
+ bulk path now propagates instead of falling through to "use bulk download".
41
+ - **Arrow negotiation no longer masks real errors (EH-7).** An auth/404/429
42
+ during the Arrow attempt now propagates immediately, without the bogus "Arrow
43
+ IPC unavailable" nag and without re-sending the failed request as JSON. Only a
44
+ non-Arrow 200 or a genuine pyarrow/IPC decode error downgrades the session.
45
+ - **Watermark floor parsed correctly (DRIFT-2).** The HTTP 410 re-baseline
46
+ response nests its fields under `detail`; `WatermarkExpired.min_available_seq`
47
+ was always 0. Now read from the correct level with a top-level fallback.
48
+ - **No more pandas-3 warning on every `get()` (PY-3).** Metadata accessors are
49
+ set via `object.__setattr__`, bypassing the pandas 3 `UserWarning`.
50
+ - **Orphaned partial downloads are swept (PY-5).** `*.eolas-tmp-*` files >24h
51
+ old are cleaned on download start; a full `cache_clear()` removes them all.
52
+ - **`download()` docstring corrected (PY-1).** It no longer claims to work for
53
+ "all datasets" — it is the live path and 413s on whole-dataset pulls of
54
+ large/geo tables; use `get()` or `download_bulk()` there.
55
+ - **`eolas datasets list` no longer renders a blank ghost column (CLI-1).** On
56
+ narrow (<100 col) terminals the title column is dropped with a hint instead of
57
+ being squeezed to zero width.
58
+ - **Bulk-download docs corrected (DRIFT-3).** `download_bulk()` / the CLI
59
+ `--freshness` help no longer claim Free plans get monthly bulk — bulk is
60
+ Pro/Enterprise and Free keys receive HTTP 402.
61
+
62
+ ### Changed
63
+
64
+ - **Single-sourced version (REL-1).** `__version__` is read from installed
65
+ distribution metadata, so it can never drift from `pyproject.toml` again
66
+ (shipped 1.3.21 previously self-reported 1.3.20). The publish workflow asserts
67
+ the installed `__version__` equals the release tag.
68
+ - **`merge_changes` is now a public export (DRIFT-6)** — added to `__all__`.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eolas-data
3
- Version: 1.3.21
3
+ Version: 1.4.0
4
4
  Summary: Python client for the eolas.fyi statistical data API (NZ + OECD; Australia on roadmap)
5
5
  Project-URL: Homepage, https://eolas.fyi
6
6
  Project-URL: Documentation, https://docs.eolas.fyi/
@@ -32,6 +32,7 @@ Requires-Dist: rich>=13; extra == 'cli'
32
32
  Requires-Dist: typer>=0.12; extra == 'cli'
33
33
  Provides-Extra: dev
34
34
  Requires-Dist: geopandas>=0.14; extra == 'dev'
35
+ Requires-Dist: mcp>=1.0; extra == 'dev'
35
36
  Requires-Dist: pandas; extra == 'dev'
36
37
  Requires-Dist: pytest; extra == 'dev'
37
38
  Requires-Dist: responses; extra == 'dev'
@@ -41,6 +42,8 @@ Requires-Dist: typer>=0.12; extra == 'dev'
41
42
  Provides-Extra: geo
42
43
  Requires-Dist: geopandas>=0.14; extra == 'geo'
43
44
  Requires-Dist: shapely>=2.0; extra == 'geo'
45
+ Provides-Extra: mcp
46
+ Requires-Dist: mcp>=1.0; extra == 'mcp'
44
47
  Provides-Extra: polars
45
48
  Requires-Dist: polars>=0.20; extra == 'polars'
46
49
  Provides-Extra: secure
@@ -1,4 +1,8 @@
1
1
  """eolas-data — Python client for the eolas.fyi statistical data API."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version as _pkg_version
4
+
5
+ from .cdc import merge_changes
2
6
  from .client import Client, SyncResult
3
7
  from .dataset import Dataset
4
8
  from .exceptions import (
@@ -15,12 +19,20 @@ from .exceptions import (
15
19
  WatermarkExpired,
16
20
  )
17
21
 
18
- __version__ = "1.3.20"
22
+ # Single source of truth: read the installed distribution's version so
23
+ # __version__, `eolas version`, and the User-Agent can never drift from
24
+ # pyproject again (REL-1). Falls back to the pyproject value only for an
25
+ # editable tree that was never `pip install`-ed.
26
+ try:
27
+ __version__ = _pkg_version("eolas-data")
28
+ except PackageNotFoundError: # pragma: no cover - uninstalled source checkout
29
+ __version__ = "1.4.0"
19
30
 
20
31
  __all__ = [
21
32
  "Client",
22
33
  "Dataset",
23
34
  "SyncResult",
35
+ "merge_changes",
24
36
  "EolasError",
25
37
  "AuthenticationError",
26
38
  "RateLimitError",