Skip to content

fix(dfns): support signed index - #374

Merged
wpbonelli merged 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:signed-index
Oct 3, 2026
Merged

wpbonelli merged 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:signed-index

Conversation

@wpbonelli

Copy link
Copy Markdown
Member

The DFNs' support_negative_index attribute was dropped, leaving gwf-sfr connectiondata ic as a plain index. This is inadequate because the sign and magnitude are two different facts.

Support index="signed on Integer and integer Array, indicating the magnitude is a 1-based index and the sign carries a meaning of its own, as defined by the particular field

v1's support_negative_index (only gwf-sfr's connectiondata `ic`) was
dropped by the migration, leaving `ic` as a plain index. A consumer
translating it 1-based -> 0-based turns -2 into -3, and there's no 0-based
signed equivalent: the sign and magnitude are two facts.

- schema: `index` on Integer and integer Array may be "signed": the
  magnitude is a 1-based index and the sign carries a meaning of its own,
  defined by the field's description.
- migration: map numeric_index + support_negative_index to
  index="signed", and backfill fk="packagedata.ifno" on `ic` (applying to
  the magnitude). _FK_BACKFILL now takes several entries per component and
  accepts integer array columns.
- docs: describe "signed" under both `index` sections, and array fk on
  list-record columns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wpbonelli wpbonelli added this to the 1.10.0 milestone Oct 3, 2026
@wpbonelli wpbonelli added the bug Something isn't working label Oct 3, 2026
@wpbonelli
wpbonelli marked this pull request as ready for review October 3, 2026 01:09
@wpbonelli
wpbonelli merged commit a12691e into MODFLOW-ORG:develop Oct 3, 2026
15 checks passed
@wpbonelli
wpbonelli deleted the signed-index branch October 3, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant