Skip to content

Deprecate 'FCAS Providers' static table — AEMO migrated the data (#92)#93

Merged
nick-gorman merged 1 commit into
masterfrom
deprecate-fcas-providers
May 25, 2026
Merged

Deprecate 'FCAS Providers' static table — AEMO migrated the data (#92)#93
nick-gorman merged 1 commit into
masterfrom
deprecate-fcas-providers

Conversation

@nick-gorman
Copy link
Copy Markdown
Member

Summary

  • AEMO emptied the Ancillary Services sheet of NEM Registration and Exemption List.xlsx (the workbook NEMOSIS reads for FCAS Providers) and migrated the data to a weekly archive at https://www.nemweb.com.au/REPORTS/CURRENT/ANCILLARY_SERVICES_REPORTS/. The existing handler downloads the workbook, finds the sheet empty, and chokes on the drop_duplicates(['Bid Type', 'DUID']) step because those columns no longer exist anywhere in the file. select_columns='all' doesn't sidestep it — the dedup runs unconditionally.
  • static_table('FCAS Providers', ...) now raises a clear UserInputError immediately, with a message naming the new endpoint and linking to AEMO migrated FCAS Providers data out of the registration XLS; current handler returns nothing #92 for tracking.
  • Drops FCAS Providers from defaults.static_tables so it no longer appears in the user-iterable list of supported tables. Other metadata dicts keep their entries (smaller diff, no user-visible difference).
  • Two tests replace the old happy-path FCAS Providers tests: one asserts the exception fires, one locks the new endpoint URL and issue number into the deprecation message so doc-drift breaks the test in either direction.
  • README's print(defaults.static_tables) doctest output updated, with a follow-up note explaining the migration and pointing at AEMO migrated FCAS Providers data out of the registration XLS; current handler returns nothing #92.

Relationship to #69

#69 was about a missing entry in static_downloader_map causing NoDataToReturn on a cold cache for FCAS Providers. The workaround at the time was to prime the cache via the sibling Generators and Scheduled Loads table (same workbook). That workaround still gets the file on disk but no longer helps because the sheet's contents are gone at the AEMO source — making #69 effectively obsolete. Closing it in favour of #92.

Why deprecate now vs. rewrite

A rewrite against the new endpoint is the right long-term answer but requires schema discovery from scratch — the new PUBLIC_ANCILLARY_SERVICES_YYYYMMDD.zip files have different columns, types, and (probably) primary keys than the old sheet. Deprecation gets users a clear error message and a forwarding address today; the rewrite is parked under #92 pending contributor interest.

Test plan

Closes #69.

🤖 Generated with Claude Code

AEMO has emptied the `Ancillary Services` sheet of
`NEM Registration and Exemption List.xlsx` and migrated the data to a
weekly archive at
https://www.nemweb.com.au/REPORTS/CURRENT/ANCILLARY_SERVICES_REPORTS/
(file pattern: `PUBLIC_ANCILLARY_SERVICES_YYYYMMDD.zip`). The current
NEMOSIS handler downloads the workbook fine but parses the now-empty
sheet and chokes on the `drop_duplicates(['Bid Type', 'DUID'])` step
because those columns no longer exist anywhere in the workbook.
`select_columns='all'` doesn't help — the dedup runs unconditionally.

This is a fresh problem, not the original #69. #69 was about a missing
entry in `static_downloader_map`, with a workaround of priming the
cache via the sibling `Generators and Scheduled Loads` table. That
workaround still gets the file on disk but no longer helps because the
sheet's contents are gone at the AEMO source. Closing #69 in favour of
the new tracking issue (#92).

Changes:

1. `static_table` now early-raises `UserInputError` for `FCAS Providers`
   with a message that names the new endpoint and references #92, so
   users have somewhere to go. Raised before any other validation so
   the message is consistent regardless of cache state or other args.

2. `defaults.static_tables` drops the `FCAS Providers` entry so it
   doesn't appear in the user-iterable list of supported static tables.
   The other metadata dicts (`names`, `table_types`, `table_columns`,
   etc.) keep their entries — they're internal, and removing them
   widens the diff without changing the user-facing contract.

3. `tests/end_to_end_table_tests/test_static_tables.py` replaces the
   two FCAS-Providers happy-path tests with two deprecation-error
   tests: one asserts the exception fires, one locks the new endpoint
   URL and the issue number into the message so doc-drift in either
   direction breaks the test.

4. README's `print(defaults.static_tables)` doctest output drops the
   FCAS Providers entry, with a follow-up note explaining where the
   data moved and linking to #92.

The longer-term fix is to rewrite the handler against the new weekly
archive endpoint. That requires schema discovery (column names, types,
primary keys all need to be re-derived from a current zip) and is
parked under #92 pending interest.

Closes #69. Tracks under #92.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@nick-gorman nick-gorman merged commit 93eaa00 into master May 25, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

static_table("FCAS Providers", ...) errors on a cold cache

1 participant