Skip to content

Documentation updates: Explanation section rewrites and docstring updates#1635

Open
jbrossman wants to merge 75 commits into
mainfrom
jb/documentation-updates
Open

Documentation updates: Explanation section rewrites and docstring updates#1635
jbrossman wants to merge 75 commits into
mainfrom
jb/documentation-updates

Conversation

@jbrossman
Copy link
Copy Markdown

@jbrossman jbrossman commented Feb 24, 2026

This pull request makes several improvements to the documentation build configuration for the project. The main changes include expanding the set of external fallback references for InfrastructureSystems types and functions, restructuring and adding new documentation pages for better organization and coverage, and removing the now-obsolete enumerated types API documentation.

Documentation improvements and organization:

  • Expanded the ExternalFallbacks in docs/make.jl to include additional InfrastructureSystems types and functions such as add_supplemental_attribute!, remove_supplemental_attribute!, ComponentUUIDs, PiecewiseLinearData, SupplementalAttributeManager, SystemData, TimeSeriesManager, and more, improving cross-referencing in docstrings.
  • Restructured the documentation navigation in docs/make.jl by splitting the "add additional data to a component" section into multiple focused pages, and added new how-to guides for unit system conversions, transformer impedance conversion, and using subsystems.
  • Removed the api/enumerated_types.md page and its reference from the documentation navigation, as well as the "transformer_per_unit_models.md" and "enumerated_types.md" entries, reflecting a cleanup and update of outdated or redundant content. [1] [2] [3]

These changes enhance the usability and maintainability of the documentation by providing more comprehensive references and a clearer, more organized structure.## Description

This PR updates and tightens documentation content and cross-references, with a focused migration of enumerated type documentation from the standalone API page into the scoped enum docstrings in src/definitions.jl.

In addition to the broader docstring and docs cleanup work already in this PR, the latest updates:

  • moved enum tables/content into the corresponding scoped enum docstrings,
  • removed repeated enum-name headers in those docstrings,
  • replaced old subsection references (e.g., @ref pm_list) with direct enum docstring references (e.g., @ref PrimeMovers) across docs/generated docs,
  • removed docs/src/api/enumerated_types.md,
  • updated docs/make.jl to remove the old enumerated-types page from navigation.

No new functionality was introduced; these are documentation and reference-structure updates.

Related Issue

This is follow-up documentation work aligned with the existing documentation improvement scope in this PR.

Closes #1504
Closes #1457
Closes #1448

New Structs

Not applicable — no new structs were added.

Jes Brossman added 9 commits February 17, 2026 15:17
Changed accessor and getter language across multiple pages
Edits include deleting the original supplemental attributes explanation, and creating a new one. Then, adding in two how tos, which describe how to add supplemental attributes and then a second how to about querying the supplemental attributes to get additional information. Update the glossary with UUID description as well.
First edits to system explanation and a new how-to. Also edited the make.jl file to include previously committed files and these new files.
Key changes include adding @id references to the tutorials, referencing those tutorials in the explanation, and creating a separate how-to using code originally featured in the system explanation.
Successfully compiled the documentation and fixed a number of issues. Most of them were for broken or missing references.
@jbrossman jbrossman requested a review from kdayday February 24, 2026 21:09
@jbrossman jbrossman self-assigned this Feb 24, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 83.87097% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.15%. Comparing base (0650c45) to head (6e722c0).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/models/components.jl 33.33% 2 Missing ⚠️
src/models/cost_function_timeseries.jl 0.00% 1 Missing ⚠️
src/models/generation.jl 50.00% 1 Missing ⚠️
src/models/static_models.jl 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1635      +/-   ##
==========================================
+ Coverage   84.13%   84.15%   +0.02%     
==========================================
  Files         204      204              
  Lines       10540    10536       -4     
==========================================
- Hits         8868     8867       -1     
+ Misses       1672     1669       -3     
Flag Coverage Δ
unittests 84.15% <83.87%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/PowerSystems.jl 0.00% <ø> (ø)
src/base.jl 88.95% <100.00%> (+0.18%) ⬆️
src/definitions.jl 100.00% <ø> (ø)
src/get_components_interface.jl 80.00% <ø> (ø)
src/impedance_correction.jl 100.00% <ø> (ø)
src/models/HybridSystem.jl 75.64% <100.00%> (ø)
src/models/OuterControl.jl 64.70% <100.00%> (ø)
src/models/RoundRotorExponential.jl 86.66% <100.00%> (ø)
src/models/RoundRotorQuadratic.jl 86.66% <100.00%> (ø)
src/models/SalientPoleExponential.jl 64.28% <100.00%> (ø)
... and 24 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kdayday
Copy link
Copy Markdown
Contributor

kdayday commented Feb 25, 2026

@jbrossman I haven't taken a look yet, but FYI, about figures there's a different file path to get it to show up locally versus on github ("../" vs. "../../" or vice versa). We will want whichever one gets it to show up on the github Preview, so don't worry about it if it doesn't show up locally

Jes Brossman added 4 commits March 2, 2026 14:09
Edits to Power Concepts including a new and more built out how-to
Mostly reorganizing the information
Comment thread docs/src/tutorials/creating_system.jl Outdated
Comment thread docs/src/explanation/supplemental_attributes_2.md Outdated
Comment thread docs/src/explanation/supplemental_attributes.md Outdated
Comment thread docs/src/how_to/use_subsystems.md Outdated
Comment thread docs/src/explanation/type_structure.md
Comment thread docs/src/explanation/type_structure.md Outdated
Jes Brossman added 6 commits March 3, 2026 08:28
Edits to use_subsystems.md to get an error free example, word changes, and reference links.
Julia blocks changed to REPL blocks, additional references added, and further explanation about data storage.
Key changes include additional references, describing what a dynamic device is, taking out the images that originally appeared, and more clearly linking the ideas between the sections.
Remove @id tags in tutorials, and update any references to these tutorials to use the title instead.
Search and edit how_to folder to convert all '''julia code blocks to use the '''repl formatting instead.
Copilot AI changed the title Jb/documentation updates Documentation updates: migrate enumerated type docs into scoped enum docstrings Jun 2, 2026
Copilot AI requested a review from kdayday June 2, 2026 17:44
kdayday and others added 22 commits June 2, 2026 12:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: kdayday <kdayday@users.noreply.github.com>
…raph

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore main signatures, exports, tests, and subsystem API while keeping
expanded subsystem docstrings without the new check_subsystems(System) entrypoint.

Co-authored-by: Cursor <cursoragent@cursor.com>
Update generated dynamic model docstrings and descriptor comments to use
@ref PrimeMovers, ThermalFuels, ACBusTypes, and StateTypes instead of
removed enumerated_types.md subsection anchors.

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

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@kdayday kdayday changed the title Documentation updates: migrate enumerated type docs into scoped enum docstrings Documentation updates: Explanation section rewrites and docstring updates Jun 5, 2026
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 93 out of 135 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (4)

src/subsystems.jl:1

  • Typo in the error message string: subystemssubsystems. This message can surface to users, so it should be corrected.
    src/models/static_models.jl:1
  • error(ArgumentError(...)) throws an ErrorException (stringifies the ArgumentError) rather than throwing the ArgumentError itself. Use throw(ArgumentError(...)) so callers can reliably catch ArgumentError and so the exception type matches the message.
    docs/src/how_to/use_subsystems.md:1
  • This admonition is currently commented out with leading #, so it will render as literal text instead of a !!! note block. Remove the # prefixes and indent the body under !!! note to make Documenter render the note correctly.
    docs/src/tutorials/working_with_time_series.jl:1
  • The previous explicit page anchor (@id tutorial_time_series) was removed. Relying on title-based @ref targets is more fragile (title changes break links). Consider restoring a stable @id on the header (even if you also link by title) to keep references resilient.

Comment thread docs/src/api/public.md
]
Order = [:type, :function]
Filter = t -> nameof(t) in names(PowerSystems)
Filter = t -> typeof(t) !== Union && applicable(nameof, typeof(t)) && nameof(t) in names(PowerSystems)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consolidate and flesh out PSY explanation sections Clarify takeaway in Transformer per unitization page Change docstring in transformers

4 participants