Skip to content

Correct test assertion for PCT_NAT_PFT dimension order - #44

Merged
matthewhoffman merged 1 commit into
mainfrom
fix-pft-dim-test
Sep 2, 2026
Merged

matthewhoffman merged 1 commit into
mainfrom
fix-pft-dim-test

Conversation

@matthewhoffman

Copy link
Copy Markdown
Contributor

The test was asserting that 'topounit' must precede 'natpft' in dimension order, but this contradicts the SURFACE_VAR_SPECS and the intentional design decision from commit 641aa7e (2026-07-20).

Background:

  • The test was written on 2026-07-16 (commit da03322) expecting topounit-first
  • Four days later on 2026-07-20 (commit 641aa7e), specs were deliberately changed to put class dimensions (natpft, cft, nglcec, etc.) BEFORE topounit for consistency across all topounit-indexed variables
  • The test was never updated to reflect this change

The spec explicitly defines PCT_NAT_PFT dims as "natpft,topounit,lsmlat,lsmlon", and the implementation correctly follows this order. The test assertion was wrong.

Changes:

  • Fix test to assert natpft precedes topounit (not vice versa)
  • Update misleading comment in sfile.py to clarify class dims come first
  • Add reference to commit 641aa7e in test comment for future clarity

The test was asserting that 'topounit' must precede 'natpft' in dimension
order, but this contradicts the SURFACE_VAR_SPECS and the intentional design
decision from commit 641aa7e (2026-07-20).

Background:
- The test was written on 2026-07-16 (commit da03322) expecting topounit-first
- Four days later on 2026-07-20 (commit 641aa7e), specs were deliberately
  changed to put class dimensions (natpft, cft, nglcec, etc.) BEFORE topounit
  for consistency across all topounit-indexed variables
- The test was never updated to reflect this change

The spec explicitly defines PCT_NAT_PFT dims as "natpft,topounit,lsmlat,lsmlon",
and the implementation correctly follows this order. The test assertion was wrong.

Changes:
- Fix test to assert natpft precedes topounit (not vice versa)
- Update misleading comment in sfile.py to clarify class dims come first
- Add reference to commit 641aa7e in test comment for future clarity

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@matthewhoffman
matthewhoffman merged commit 023775e into main Sep 2, 2026
2 checks passed
@matthewhoffman
matthewhoffman deleted the fix-pft-dim-test branch September 2, 2026 22:13
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.

1 participant