Repository navigation
Conversation
Constraint values were assigned to base layer cells by row order alone. Any file whose rows were in a different order, or a basemap whose cells were reordered (for example a NetCDF basemap), silently misassigned every constraint. Constraint files are keyed by the base layer cell id (observed_id_field) in their first column; values are now matched on that id. Fallbacks: - If the ids do not all match but the file has one row per cell, row order is used with a warning. - Otherwise a ValidationException is raised. - Constraint file index prefixes outside the valid range now raise. The bundled constraint ids equal target_fid row for row, so every benchmark case is IDENTICAL to v3.0.0-b4 and the fallback never fires. New tests/test_constraints.py covers shuffled rows, unmatched ids, and a length mismatch. Co-Authored-By: Claude <noreply@anthropic.com>
This branch has not been deployed
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.
Stacked PR — part of the Demeter v3.0.0 upgrade. Base:
v3/cli. Review and merge in order, bottom of the stack first.Plan items: 1.16
Benchmark: IDENTICAL (bundled constraint ids equal
target_fidrow for row). Constraint files are now joined onobserved_id_field; falling back to row order logs a warning.Commits
Align constraint files to the base layer by cell id
Constraint values were assigned to base layer cells by row order alone.
Any file whose rows were in a different order, or a basemap whose cells
were reordered (for example a NetCDF basemap), silently misassigned
every constraint. Constraint files are keyed by the base layer cell id
(observed_id_field) in their first column; values are now matched on
that id. Fallbacks:
order is used with a warning.
The bundled constraint ids equal target_fid row for row, so every
benchmark case is IDENTICAL to v3.0.0-b4 and the fallback never fires.
New tests/test_constraints.py covers shuffled rows, unmatched ids, and
a length mismatch.
🤖 Generated with Claude Code