v1.8.0 - Chronological observations, correct last_n, and clearer ABS 404s #56
AnthonyPuggs
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
v1.8.0 - Chronological observations, correct
last_n, and clearer ABS 404sThis release fixes a family of correctness bugs around "latest value" retrieval that
affected every ABS dataset, and makes ABS error handling honest about what a 404 means.
🐛 Fixed:
last_nreturned the oldest ABS observationsThe ABS SDMX API returns CSV rows in arbitrary order, but latest-N selection assumed
chronological input — so
last_n=2onheadline_cpireturned 1986-Q2/Q3 instead of thetwo most recent quarters.
get_latest_observationsandget_economic_seriesinheritedthe same bug.
Observations are now sorted by parsed period before selection:
last_nselects the true most recent N observations per series, regardless ofupstream row order.
guarantee, documented in the response schema docs.
strings, so bounds like
start=2025-11-15interact correctly with quarterly data.A new shared
periods.pymodule handles all five period formats (YYYY,YYYY-QN,YYYY-SN,YYYY-MM,YYYY-MM-DD), replacing duplicated parsing inderived.pyandbounds.py— and adding the previously missing semester support.🐛 Fixed: ABS 404s are no longer one opaque error
The ABS API answers HTTP 404 for two very different situations. The server now tells
them apart by response body:
NoRecordsFound) → returns a valid empty payloadwith a plain-English
metadata.warningsentry instead of raising.AuseconNotFoundErrorwith guidanceto check
search_datasetsorlist_catalogue.still do.
📦 Retail Trade (RT) marked as discontinued
The ABS ceased the Retail Trade publication after the June 2025 reference month. The
catalogue entry is now marked
ceased(hidden from default discovery, available viainclude_ceased=true) with a successor pointer to the Monthly Household SpendingIndicator (
household_spendingconcept, dataflowHSI_M), surfaced throughdescribe_dataset. Theretail_turnoverconcept still retrieves the full historicalseries (1982–2025).
✨ Improvements
metadata.observations_droppedfield records how many observationslast_nremoved;
truncatedistrueexactly when this is non-zero.describe_datasetnow reportsceasedandsuccessorfor every dataset.absent parameters and literal
"None"values.last_n/countparameter descriptions on the MCP tool surface.🧪 Testing
failure mode that production CSVs exhibit and small ordered fixtures could never catch.
cache-key collisions.
platform default cp1252 encoding).
ascending (RBA/APRA were already chronological, now guaranteed).
RTno longer appears in defaultsearch_datasets/list_catalogueresults.No breaking schema changes — all new metadata fields are additive and optional.
This discussion was created from the release v1.8.0 - Chronological observations, correct last_n, and clearer ABS 404s.
Beta Was this translation helpful? Give feedback.
All reactions