eolas-data 1.3.20__tar.gz → 1.3.22__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 (47) hide show
  1. {eolas_data-1.3.20 → eolas_data-1.3.22}/.github/workflows/publish.yml +17 -0
  2. eolas_data-1.3.22/CHANGELOG.md +55 -0
  3. {eolas_data-1.3.20 → eolas_data-1.3.22}/PKG-INFO +4 -1
  4. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/__init__.py +13 -1
  5. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/cli.py +445 -219
  6. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/client.py +312 -112
  7. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/library.py +68 -13
  8. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/meta.py +14 -7
  9. {eolas_data-1.3.20 → eolas_data-1.3.22}/pyproject.toml +4 -2
  10. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_changes_http.py +25 -2
  11. eolas_data-1.3.22/tests/test_resilience.py +95 -0
  12. {eolas_data-1.3.20 → eolas_data-1.3.22}/.github/workflows/catalog-drift.yml +0 -0
  13. {eolas_data-1.3.20 → eolas_data-1.3.22}/.github/workflows/pre-release.yml +0 -0
  14. {eolas_data-1.3.20 → eolas_data-1.3.22}/.github/workflows/smoke.yml +0 -0
  15. {eolas_data-1.3.20 → eolas_data-1.3.22}/.github/workflows/test.yml +0 -0
  16. {eolas_data-1.3.20 → eolas_data-1.3.22}/.gitignore +0 -0
  17. {eolas_data-1.3.20 → eolas_data-1.3.22}/LICENSE +0 -0
  18. {eolas_data-1.3.20 → eolas_data-1.3.22}/README.md +0 -0
  19. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/_dataset_names.py +0 -0
  20. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/_regen_names.py +0 -0
  21. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/cdc.py +0 -0
  22. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/console.py +0 -0
  23. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/dataset.py +0 -0
  24. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/exceptions.py +0 -0
  25. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/rows.py +0 -0
  26. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/schedule.py +0 -0
  27. {eolas_data-1.3.20 → eolas_data-1.3.22}/eolas_data/search.py +0 -0
  28. {eolas_data-1.3.20 → eolas_data-1.3.22}/scripts/check_client_contract.py +0 -0
  29. {eolas_data-1.3.20 → eolas_data-1.3.22}/scripts/preflight.sh +0 -0
  30. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/fixtures/source_helpers.json +0 -0
  31. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_as_arrow.py +0 -0
  32. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_cdc_roundtrip.py +0 -0
  33. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_cli.py +0 -0
  34. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_client.py +0 -0
  35. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_date_filter.py +0 -0
  36. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_get_local.py +0 -0
  37. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_keyring.py +0 -0
  38. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_library.py +0 -0
  39. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_meta.py +0 -0
  40. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_progress.py +0 -0
  41. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_rows.py +0 -0
  42. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_schedule.py +0 -0
  43. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_search.py +0 -0
  44. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_smoke_live.py +0 -0
  45. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_source_helpers.py +0 -0
  46. {eolas_data-1.3.20 → eolas_data-1.3.22}/tests/test_sync_bulk.py +0 -0
  47. {eolas_data-1.3.20 → eolas_data-1.3.22}/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,55 @@
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.3.22
7
+
8
+ Network-hardening + correctness release, addressing findings from the
9
+ 2026-07-05 client-library audit.
10
+
11
+ ### Fixed
12
+
13
+ - **Request timeouts everywhere (EH-1).** Every HTTP call now carries a default
14
+ `(10, 300)` second (connect, read) timeout via a session subclass. A
15
+ black-holed connection raises instead of hanging the caller forever. Override
16
+ with `Client(timeout=...)`.
17
+ - **Clean errors on transport failures (EH-2).** Connection refused / DNS /
18
+ timeout / reset now surface as `EolasError("Network error talking to
19
+ api.eolas.fyi: ...")` instead of a raw urllib3 traceback. The CLI's existing
20
+ error handler renders them cleanly.
21
+ - **Atomic downloads (EH-5).** `download()` / `download_bulk()` write to a temp
22
+ file and atomically rename on success, and verify bytes received against
23
+ `Content-Length`. An interrupted or truncated download now leaves **no file**
24
+ at the final path instead of a silent partial.
25
+ - **`get()` no longer degrades a bulk failure to a misleading 413 (EH-3).** The
26
+ auto-route swallow is narrowed to the routing decision; a real failure in the
27
+ bulk path now propagates instead of falling through to "use bulk download".
28
+ - **Arrow negotiation no longer masks real errors (EH-7).** An auth/404/429
29
+ during the Arrow attempt now propagates immediately, without the bogus "Arrow
30
+ IPC unavailable" nag and without re-sending the failed request as JSON. Only a
31
+ non-Arrow 200 or a genuine pyarrow/IPC decode error downgrades the session.
32
+ - **Watermark floor parsed correctly (DRIFT-2).** The HTTP 410 re-baseline
33
+ response nests its fields under `detail`; `WatermarkExpired.min_available_seq`
34
+ was always 0. Now read from the correct level with a top-level fallback.
35
+ - **No more pandas-3 warning on every `get()` (PY-3).** Metadata accessors are
36
+ set via `object.__setattr__`, bypassing the pandas 3 `UserWarning`.
37
+ - **Orphaned partial downloads are swept (PY-5).** `*.eolas-tmp-*` files >24h
38
+ old are cleaned on download start; a full `cache_clear()` removes them all.
39
+ - **`download()` docstring corrected (PY-1).** It no longer claims to work for
40
+ "all datasets" — it is the live path and 413s on whole-dataset pulls of
41
+ large/geo tables; use `get()` or `download_bulk()` there.
42
+ - **`eolas datasets list` no longer renders a blank ghost column (CLI-1).** On
43
+ narrow (<100 col) terminals the title column is dropped with a hint instead of
44
+ being squeezed to zero width.
45
+ - **Bulk-download docs corrected (DRIFT-3).** `download_bulk()` / the CLI
46
+ `--freshness` help no longer claim Free plans get monthly bulk — bulk is
47
+ Pro/Enterprise and Free keys receive HTTP 402.
48
+
49
+ ### Changed
50
+
51
+ - **Single-sourced version (REL-1).** `__version__` is read from installed
52
+ distribution metadata, so it can never drift from `pyproject.toml` again
53
+ (shipped 1.3.21 previously self-reported 1.3.20). The publish workflow asserts
54
+ the installed `__version__` equals the release tag.
55
+ - **`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.20
3
+ Version: 1.3.22
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.3.22"
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",