Design documentation and more comprehensive documentation for submodel and references with grandchildren aliases.#45
Merged
TimWhiting merged 1 commit intouser-docsfrom May 4, 2026
Conversation
There was a problem hiding this comment.
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/.oneinputs 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.
pixilcode
approved these changes
May 4, 2026
Collaborator
pixilcode
left a comment
There was a problem hiding this comment.
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>
3f6c787 to
701ac38
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.