Skip to content

fix: address review findings on the derived refresh, native solver and export - #153

Merged
lachlangrose merged 2 commits into
feat/native-solverfrom
fix/review-findings
Nov 1, 2026
Merged

lachlangrose merged 2 commits into
feat/native-solverfrom
fix/review-findings

Conversation

@lachlangrose

Copy link
Copy Markdown
Member

Fixes from a code review of the stack (#132 to #148). This PR is on top of #148.

Changes

  • Derived refresh: take the layer role first, then the tool setting. This matches the inputs that the refresh records, so a result is not marked current for a layer it did not use.
  • Native solver: forget the fallback state of a feature when its data is read again or the model is rebuilt. _needs_inequalities is built again on a data refresh.
  • Added constraints: skip a row whose layer was removed from the project, and log it, instead of failing the update.
  • Parametric faults: spec_from_dict raises ValueError for a damaged spec. The project load skips that fault and logs it. Removing a fault clears its state and emits model_updated.
  • Model step: changed layers are a to-do, not a problem. The text names the buttons that exist.
  • Export: a NaN id has no unit (-1). The CSV is written with the csv module, so a quote in a unit name is escaped.

Not changed

  • summarise_data counts a row with both val and gradient columns twice. Both are real constraints, so this is correct.
  • The release-please manifest changes came from release-please commits, not a hand edit.

Tests

  • 351 unit tests pass. Black and ruff pass on the changed files.
  • Two tests checked the old behaviour and are updated. New tests cover the CSV quote, the NaN id and damaged parametric specs.
  • The QGIS tests (tests/qgis) were not run.

@lachlangrose
lachlangrose added this pull request to stack #154 November 1, 2026 06:49
…d export

- derived refresh: take the layer role first, as the recorded inputs do
- native solver: forget the fallback state when the data is read again
- skip a constraint layer that was removed from the project
- skip a damaged parametric fault when a project loads
- clear the state of a removed parametric fault and emit model_updated
- Model step: changed layers are a to-do, and the text names the real buttons
- export: NaN ids have no unit, and the CSV is written with the csv module
@lachlangrose
lachlangrose merged commit 6d88cd8 into main Nov 1, 2026
5 of 6 checks passed
@lachlangrose
lachlangrose deleted the fix/review-findings branch November 1, 2026 06:55
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