Skip to content

docs: fix documentation drift from code#59

Merged
hoehner merged 2 commits into
mainfrom
issue-58-docs-code-drift
Jun 5, 2026
Merged

docs: fix documentation drift from code#59
hoehner merged 2 commits into
mainfrom
issue-58-docs-code-drift

Conversation

@hoehner
Copy link
Copy Markdown
Collaborator

@hoehner hoehner commented Jun 5, 2026

Static audit of the docs against the code (4 parallel reviewers over disjoint slices, every finding verified against source) surfaced 16 discrepancies. All fixed here. The v1.0 version-naming framing was reviewed and intentionally kept as-is.

Tier 1: copy-paste breaks (documented code raised if run)

  • CustomScaling(to_physical=…, to_raw=…) → real kwargs to_physical_fn/to_raw_fn (protocols/i2c/system-definition.mdx)
  • Measurement.value.latest (publishers.mdx)
  • reference index → dead link reference/nominal_instrument.mdreference/instrument.md (reference/src/index.md)

Tier 2: wrong API contract

  • check_errors() documented as a base-class no-op to override → it's a private, per-driver _check_errors() convention; the base has no such method (dmm.mdx, eload.mdx)
  • fetch_analog(hw_timing_config) → base takes no args (daq.mdx)
  • i2c set_bitrate documented in Hz → code uses kHz (protocols/i2c/overview.mdx)

Tier 3: stale names / links

  • LabJackDAQDriverLabJackTSeriesDriver (driver-dependencies.mdx)
  • ConnectPublisherNominalConnectPublisher (overview.mdx)
  • repo slug nominal-io/instrumentationnominal-io/instro (contrib.mdx, custom-instruments.mdx, examples.mdx, mkdocs.yml, docs.json, migration/v1.mdx)

Tier 4: incomplete (newly-shipped capability undocumented)

Tier 5: minor

  • malformed write_digital_line markdown bullet (daq.mdx)
  • _read_to_measurements signature missing default_tags (daq.mdx)
  • set_aperture_seconds not implemented by bundled DMM drivers — noted (dmm.mdx)
  • define_background_daemon(method, …) signature (psu.mdx, eload.mdx)

Hosted-docs URL routing

  • SDK reference / changelog → nominal-io.github.io/instro/
  • user-facing prose + examples → instro.nominal.io

Notes

  • Docs-only: no .py changed (check-and-test unaffected) and no example-mirror files touched (check-examples-drift unaffected).

Closes #58

Static audit of docs against the code surfaced 16 discrepancies, fixed here:

- Copy-paste breaks: CustomScaling kwargs (to_physical_fn/to_raw_fn),
  Measurement.value -> .latest, dead reference link
  (nominal_instrument.md -> instrument.md).
- Wrong API contract: check_errors() documented as a base no-op ->
  private per-driver _check_errors() convention (dmm, eload);
  fetch_analog() takes no args; i2c set_bitrate is kHz not Hz.
- Stale names/links: LabJackDAQDriver -> LabJackTSeriesDriver,
  ConnectPublisher -> NominalConnectPublisher, repo slug
  nominal-io/instrumentation -> nominal-io/instro.
- Incomplete: overview lists MCC, InstroDMM, ModbusDevice; daq driver-dev
  section documents read/write_digital_port.
- Minor: malformed write_digital_line bullet, _read_to_measurements
  default_tags param, set_aperture_seconds bundled-driver note,
  define_background_daemon(method, ...) signature.

Also routed hosted-docs URLs: SDK reference/changelog ->
nominal-io.github.io/instro/, user-facing prose/examples ->
instro.nominal.io.

Closes #58
@mintlify
Copy link
Copy Markdown

mintlify Bot commented Jun 5, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
instro 🟢 Ready View Preview Jun 5, 2026, 7:14 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Error checking is an optional per-driver _check_errors() convention, not a
required base method, so it doesn't belong in the "A <category> driver must:"
responsibility lists. Removed it from the PSU, DMM, and ELoad lists; the
convention is still shown in each representative/custom driver example and
noted in the summaries.
@hoehner hoehner merged commit f3ee46b into main Jun 5, 2026
10 checks passed
@hoehner hoehner deleted the issue-58-docs-code-drift branch June 5, 2026 20:31
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.

docs: fix documentation drift from code

1 participant