Skip to content

Design documentation and more comprehensive documentation for submodel and references with grandchildren aliases.#45

Merged
TimWhiting merged 1 commit intouser-docsfrom
tim/designs-docs
May 4, 2026
Merged

Design documentation and more comprehensive documentation for submodel and references with grandchildren aliases.#45
TimWhiting merged 1 commit intouser-docsfrom
tim/designs-docs

Conversation

@TimWhiting
Copy link
Copy Markdown
Contributor

This also adjusts the old keywords for submodel and reference in favor of the new, and adds an examples directory so that we can have samples to run to verify the correct output in the documentation.

Copilot AI review requested due to automatic review settings May 1, 2026 22:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the mdBook guide to document “design” workflows and expands documentation around model imports (submodels/references) and aliasing, with supporting syntax-highlighting and runnable example sources.

Changes:

  • Adds a new “Designs” chapter and reorders/renames guide chapters accordingly.
  • Updates existing guide pages to use the newer import terminology/syntax and expands explanations/examples (including grandchildren/local aliasing).
  • Adds a docs/guide/examples/10-designs/ directory with sample .on/.one inputs intended for documentation verification, and extends the Oneil highlight.js grammar.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
docs/guide/theme/highlight.js Updates Oneil syntax highlighting rules for new declarations and label parsing behavior.
docs/guide/src/SUMMARY.md Adds the new “Designs” chapter and shifts Python-import docs to a new chapter number.
docs/guide/src/01-overview.md Updates overview examples for model imports and adds a short designs intro/link.
docs/guide/src/09-importing-models.md Expands and rewrites importing-models documentation and examples (references/submodels/local aliases).
docs/guide/src/10-designs.md New comprehensive documentation page describing designs, application, and related behaviors.
docs/guide/src/11-importing-python.md New/renumbered documentation page for Python imports, fallback behavior, and caching.
docs/guide/examples/10-designs/thruster.on Example model used by designs documentation.
docs/guide/examples/10-designs/spacecraft.on Example model used by designs documentation.
docs/guide/examples/10-designs/solar_system.on Example model demonstrating nested submodels/aliases.
docs/guide/examples/10-designs/planet.on Example base model for gravity designs.
docs/guide/examples/10-designs/multi_planet.on Example showing multiple submodel instances with different designs.
docs/guide/examples/10-designs/moon_gravity.one Example design file for moon-like parameters.
docs/guide/examples/10-designs/moon_design.one Example design file targeting the moon model.
docs/guide/examples/10-designs/moon.on Example moon model file.
docs/guide/examples/10-designs/mission_aug.on Example showing design-driven augmentation reads.
docs/guide/examples/10-designs/mission.on Example applying a design to a submodel instance.
docs/guide/examples/10-designs/mars_like.one Example design overriding a nested aliased submodel parameter.
docs/guide/examples/10-designs/mars_gravity.one Example design overriding planetary gravity parameters.
docs/guide/examples/10-designs/high_thrust.one Example design overriding submodel-scoped parameters.
docs/guide/examples/10-designs/galaxy.on Example demonstrating grandchildren/local alias reads.
docs/guide/examples/10-designs/derived_planet.one Example design that both overrides and adds derived parameters.
docs/guide/examples/10-designs/cycle_test.on Example model for cycle/error demonstration.
docs/guide/examples/10-designs/cycle.one Example design intended to create a dependency cycle.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/guide/examples/10-designs/mission.on
Comment thread docs/guide/src/10-designs.md Outdated
Comment thread docs/guide/src/09-importing-models.md Outdated
Comment thread docs/guide/src/10-designs.md
Comment thread docs/guide/src/10-designs.md
Comment thread docs/guide/src/01-overview.md
Comment thread docs/guide/src/01-overview.md
Comment thread docs/guide/src/10-designs.md
Comment thread docs/guide/src/09-importing-models.md
Comment thread docs/guide/src/10-designs.md
Copy link
Copy Markdown
Collaborator

@pixilcode pixilcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation looks good to me! Feel free to merge when ready.

- Fix 09-importing-models.md: replace old Python keywords (ref/use) with
  Rust keywords (reference/submodel); add `[alias]` extraction section
  with realistic constants/planet examples
- Remove "not supported yet" stub in 01-overview.md; replace with a brief
  designs overview and link to the new chapter
- Add 10-designs.md + examples covering design files

fix: correct parameter.alias ordering (parameter first, alias second)

Made-with: Cursor

docs: replace environment/spacecraft with extraction example with solar-system/galaxy

Co-authored-by: Cursor <cursoragent@cursor.com>

docs: replace extract/extraction terminology with alias/aliasing framing

Co-authored-by: Cursor <cursoragent@cursor.com>

docs: add runnable examples and real output to designs chapter

- Add docs/guide/examples/10-designs/ with 19 .on/.one example files
  covering every section of the chapter
- Fill in all oneil-eval-output blocks with actual compiler output
- Fix derived_planet.one: add explicit :km^2 unit on surface_area
- Fix cycle_test.on: add comment header to avoid span-tracking crash
  on very small files (22-byte edge case)
- Add moon.on + moon_design.one for the target-mismatch error case;
  replace TODO stub with real error message from the compiler
- Sync 09-importing-models.md with user's manual section-heading edit

Co-authored-by: Cursor <cursoragent@cursor.com>

docs: update highlighter and overview for new import/design keywords

highlight.js:
- Replace `use` rule with `submodel` (drop `with` keyword, keep [alias] block)
- Replace `ref` rule with `reference`
- Add `design` declaration rule
- Add `apply` declaration rule with `to` as a keyword

01-overview.md Model imports section:
- Replace `use` with `submodel`, `ref` with `reference` in code blocks
- Fix `load_max.b` → `load_max.battery` (no alias was declared for battery)
- Update prose descriptions to match new keyword names

Co-authored-by: Cursor <cursoragent@cursor.com>
@TimWhiting TimWhiting merged commit e4079db into user-docs May 4, 2026
6 of 10 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.

3 participants