Skip to content

Replace observations with barrier_overrides from link#130

Merged
NewGraphEnvironment merged 1 commit intomainfrom
129-barrier-overrides
Apr 12, 2026
Merged

Replace observations with barrier_overrides from link#130
NewGraphEnvironment merged 1 commit intomainfrom
129-barrier-overrides

Conversation

@NewGraphEnvironment
Copy link
Copy Markdown
Owner

Summary

Replace the complex observations parameter (#69) with a simple barrier_overrides table. Fish passage interpretation (observation counting, date filters, species grouping, thresholds) belongs in link, not the network engine.

  • barrier_overrides parameter on frs_habitat() and frs_habitat_classify() — table of (blue_line_key, downstream_route_measure, species_code) prepared by link via lnk_barrier_overrides()
  • Fresh just skips matched barriers — no counting, no thresholds, no date filters
  • Remove .frs_access_with_observations() and all observation counting SQL
  • Remove observation_* columns from parameters_fresh.csv
  • Early return when no overrides exist for a species (skip access recomputation)

Test plan

  • 658 tests pass
  • Code-check: clean (1 round, sprintf count verified)

Fixes #129
Relates to NewGraphEnvironment/link#25
Relates to NewGraphEnvironment/sred-2025-2026#16

Fish passage interpretation (observation counting, date filters,
species grouping, thresholds) belongs in link, not fresh. Replace
the complex observations parameter with a simple barrier_overrides
table of (blue_line_key, downstream_route_measure, species_code)
prepared by link via lnk_barrier_overrides().

Fresh just skips matched barriers — no counting, no thresholds.

- Replace .frs_access_with_observations() with .frs_access_with_overrides()
- Remove observation_* columns from parameters_fresh.csv
- barrier_overrides param on frs_habitat_classify() and frs_habitat()
- Early return when no overrides exist for a species (skip recompute)

Fixes #129

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@NewGraphEnvironment NewGraphEnvironment merged commit 0814e5e into main Apr 12, 2026
1 check passed
@NewGraphEnvironment NewGraphEnvironment deleted the 129-barrier-overrides branch April 12, 2026 04:54
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.

Replace observations parameter with barrier_overrides from link

1 participant