Skip to content

Make the documentation match the code, and test the examples properly - #41

Merged
StephenSmith25 merged 1 commit into
masterfrom
docs/accuracy
Nov 12, 2026
Merged

StephenSmith25 merged 1 commit into
masterfrom
docs/accuracy

Conversation

@StephenSmith25

Copy link
Copy Markdown
Owner

Docs:

  • index.md: accurate variable types, platforms (prebuilt: Windows/Linux x86_64), architecture, supported features and a real limitations list; remove links to the non-existent api.md and Discussions
  • Quick-start and PID examples registered variables before creating the attributes / under different names, so inputs and parameters had no setter (PID would fail to build). Explain the create-then-register rule.
  • usage.md: Fmi3StepResult fields table, logging, units, array-size note
  • usageMX.md: what is required vs optional, value-reference numbering, update_discrete_states example now returns its result, result fields
  • README: real pythonfmu3 build options, missing imports in the MX example
  • install.md: build-from-source requirements and commands for all platforms
  • changelog entries

Code:

  • Fmi3UpdateDiscreteStatesResult used discreteStateNeedsUpdate and nominalsOfContinuousStatesChanged, but the wrapper reads the FMI names discreteStatesNeedUpdate / nominalContinuousStatesChanged, so both flags were silently ignored. Rename to the FMI names; keep the old ones as aliases.

Tests: test_docs now checks every documented model (all variables readable, inputs/parameters settable, model description builds), covers index.md, and skips instead of failing when run from an installed package.

Docs:
- index.md: accurate variable types, platforms (prebuilt: Windows/Linux
  x86_64), architecture, supported features and a real limitations list;
  remove links to the non-existent api.md and Discussions
- Quick-start and PID examples registered variables before creating the
  attributes / under different names, so inputs and parameters had no setter
  (PID would fail to build). Explain the create-then-register rule.
- usage.md: Fmi3StepResult fields table, logging, units, array-size note
- usageMX.md: what is required vs optional, value-reference numbering,
  update_discrete_states example now returns its result, result fields
- README: real `pythonfmu3 build` options, missing imports in the MX example
- install.md: build-from-source requirements and commands for all platforms
- changelog entries

Code:
- Fmi3UpdateDiscreteStatesResult used discreteStateNeedsUpdate and
  nominalsOfContinuousStatesChanged, but the wrapper reads the FMI names
  discreteStatesNeedUpdate / nominalContinuousStatesChanged, so both flags
  were silently ignored. Rename to the FMI names; keep the old ones as aliases.

Tests: test_docs now checks every documented model (all variables readable,
inputs/parameters settable, model description builds), covers index.md, and
skips instead of failing when run from an installed package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X8Wmw797DJpgrMFmT6n8CG
@StephenSmith25
StephenSmith25 merged commit c78f158 into master Nov 12, 2026
9 checks passed
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