Release 1.12.0: mlt.dat & renovaveis.csv readers, dadger IA/UE fixes - #93
Merged
Conversation
The IA register parsed the ten per-patamar exchange limits into data[4:14] but exposed no accessors, so ia(df=True) dropped them. The ue() accessor was wired to the UH register class, so it returned hydro-plant data instead of the pumping-station registers. Expose the limits as limite_de_para / limite_para_de list-properties (interleaved de->para / para->de per patamar, mirroring RI) and point ue() at the UE register class. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
DECOMP ships the long-term-mean monthly flows (MLT) as a raw little-endian int32 blob with no reader in the library. The layout is month-major (12 months x 320 postos, 15360 bytes); the naive posto-major reshape yields garbage. Add a BINARY SectionFile (Mlt + SecaoMlt) mirroring Vazoes, exposing the table as a valores DataFrame with one row per month and one column per posto, in m3/s. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The renovaveis.csv card file (parques eólicos equivalentes) had no reader. Its registry cards are written space-padded while the generation card is flush-left; cfinterface matches identifiers by a regex search within the first IDENTIFIER_DIGITS characters, so an exact-length window silently drops every padded line. Add the five PEE register classes and the Renovaveis file, each with IDENTIFIER_DIGITS = len(IDENTIFIER) + 1 so the window absorbs the optional leading space and handles both conventions uniformly. The period cards carry stage indices (not calendar months), so their fields are integers rather than dates. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add reference pages and index entries for the new mlt.dat and renovaveis.csv readers, record the changes in the changelog, and bump the package version. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Raise the cfinterface floor to the version the library is built and tested against, so the declared dependency matches reality. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rite The IA FloatFields used decimal_digits=0, which rounds the exchange limits to integers on write — the same precision-loss class fixed for the other registers in 1.10.0, and the only decimal_digits=0 FloatFields left. Exchange limits are integer MW in current decks, but a fractional limit would be silently corrupted. Raise to decimal_digits=2 (matching LU, the other width-10 field) and add a fractional round-trip test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #93 +/- ##
==========================================
+ Coverage 92.82% 93.04% +0.22%
==========================================
Files 93 97 +4
Lines 8442 8688 +246
==========================================
+ Hits 7836 8084 +248
+ Misses 606 604 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ruff 0.16.0 expanded its default rule set (RUF012, D419, several B rules), failing `ruff check` on code that passed under earlier ruff. The RUF012 findings on cfinterface-inherited class attributes (REGISTERS, SECTIONS, BLOCKS, VERSIONS) cannot be resolved with ClassVar without breaking mypy --strict (cannot override a base instance variable with a class variable). Pin ruff below 0.16 to keep the lint set the project was built against; revisit as a dedicated modernization if desired. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 1.12.0. Adds two file readers and corrects three
dadgerregister issues surfaced by the cobre-bridge converter.Adicionado
Mlt(mlt.dat) — long-term-mean monthly flows (12×320int32, month-major), exposed as avaloresDataFrame (one row per month, one column per posto, m³/s).Renovaveis(renovaveis.csv) — parques eólicos equivalentes: fivePEEregister classes + accessors. UsesIDENTIFIER_DIGITS = len + 1so the identifier window absorbs the leading-space padding on registry cards while still matching the flush-left generation card.Corrigido
IAparsed the ten per-patamar exchange limits intodata[4:14]but exposed no accessors, soia(df=True)dropped them. Addedlimite_de_para/limite_para_de(interleaved, mirroringRI).ue()was wired to theUHregister class and returned hydro-plant data instead of the pumping stations. Now points atUE.IAprecision: its FloatFields useddecimal_digits=0, rounding fractional exchange limits to integers on write (the lastdecimal_digits=0fields after the 1.10.0 precision sweep). Raised todecimal_digits=2, with a fractional round-trip regression test.Alterado
cfinterfaceraised to1.10.1(the built/tested version).Verification
decomp-jul-26-rv3deck (counts, anchor rows, and — for IA — cross-checked against the raw record bytes).Mlt,Renovaveis, IA limits/precision, and theue()rewiring.🤖 Generated with Claude Code