Skip to content

Flesh out 1-line docstrings for key types#584

Merged
kdayday merged 4 commits into
mainfrom
kd/docs_refresh
Jun 9, 2026
Merged

Flesh out 1-line docstrings for key types#584
kdayday merged 4 commits into
mainfrom
kd/docs_refresh

Conversation

@kdayday

@kdayday kdayday commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

This pull request significantly improves the documentation and clarity of core abstract types, containers, and serialization interfaces in the InfrastructureSystems codebase. The main focus is on rewriting and expanding docstrings to clarify the purpose, usage, and relationships of key types, as well as improving references and discoverability for users and downstream developers.

The most important changes are:

Core Abstract Types and Components:

  • Expanded and clarified docstrings for InfrastructureSystemsType, InfrastructureSystemsComponent, DeviceParameter, and SupplementalAttribute, detailing required interfaces, usage patterns, and relationships between types. Added extensive cross-references to related types and methods.
  • Improved documentation for time series-related abstract types (TimeSeriesMetadata, ForecastMetadata, StaticTimeSeriesMetadata, TimeSeriesData), specifying their roles, construction, and usage in the system. [1] [2] [3]

Containers and Managers:

  • Added or enhanced docstrings for container types, including ComponentContainer, Components, InfrastructureSystemsContainer, and SystemData, explaining their responsibilities, interfaces, and member access patterns. [1] [2] [3] [4]
  • Documented SupplementalAttributeManager and its association-tracking mechanism, clarifying how supplemental attributes are managed and linked to components. [1] [2]

Serialization and Deserialization:

  • Rewrote and expanded docstrings for to_json, from_json, serialize, and deserialize functions, clarifying their usage, expected arguments, and relationships to each other. Added detailed "See also" references for easier navigation. [1] [2] [3] [4] [5]

Internal and Utility Types:

  • Added documentation for utility types like ComponentUUIDs (for tracking component associations) and SharedSystemReferences (for wiring system-level managers into components and attributes). [1] [2]

General Improvements:

  • Improved consistency and accuracy of terminology (e.g., "auxiliary" vs. "auxillary", "supplemental attribute" vs. "supplemental_attribute").
  • Enhanced explanations of interfaces, required/optional methods, and error conditions for key functions such as add_component!.

These changes collectively make the codebase much more approachable for new contributors and downstream package authors, and improve the reliability of API usage through clearer documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This pull request expands and refines docstrings across InfrastructureSystems’ core abstract types, container/manager types, time-series interfaces, and serialization utilities to improve API clarity and discoverability for downstream Sienna packages.

Changes:

  • Expanded docstrings for core abstract types (components, device parameters, supplemental attributes) and time-series metadata/data abstractions.
  • Documented container and manager responsibilities/relationships (SystemData, Components, TimeSeriesManager, SupplementalAttributeManager, associations, UUID tracking).
  • Improved serialization/deserialization docstrings and cross-references (to_json, from_json, serialize, deserialize).

Reviewed changes

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

Show a summary per file
File Description
src/time_series_structs.jl Added docstring clarifying what can own time series data/metadata.
src/time_series_manager.jl Documented TimeSeriesManager role and clear_time_series! behavior.
src/system_data.jl Expanded SystemData and related API docstrings (masking, serialization prep, add/rename, supplemental attributes).
src/supplemental_attribute_manager.jl Added manager-level docstring and clarified iterator/filter documentation.
src/supplemental_attribute_associations.jl Added high-level docstring describing the SQLite-backed association store.
src/serialization.jl Reworked to_json/from_json/serialize/deserialize docstrings and “See also” links.
src/internal.jl Documented SharedSystemReferences and clarified internal storage responsibilities.
src/InfrastructureSystems.jl Expanded docstrings for key abstract types and their required/optional interfaces.
src/containers.jl Added docstring for the top-level container abstraction.
src/components.jl Improved documentation for Components container and add_component! behavior/errors.
src/component_uuids.jl Documented ComponentUUIDs purpose for supplemental attribute association tracking.
src/component_container.jl Refined ComponentContainer interface docstring and references.
src/abstract_time_series.jl Expanded docstrings for time-series metadata/data abstractions and forecast/static metadata.

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

Comment thread src/serialization.jl Outdated
Comment thread src/serialization.jl
Comment thread src/serialization.jl
Comment thread src/serialization.jl
Comment thread src/time_series_manager.jl
Comment thread src/containers.jl
Comment thread src/InfrastructureSystems.jl
@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.86%. Comparing base (316779b) to head (2b31305).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #584      +/-   ##
==========================================
- Coverage   78.87%   78.86%   -0.01%     
==========================================
  Files          75       75              
  Lines        6656     6649       -7     
==========================================
- Hits         5250     5244       -6     
+ Misses       1406     1405       -1     
Flag Coverage Δ
unittests 78.86% <100.00%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
src/InfrastructureSystems.jl 44.44% <ø> (ø)
src/abstract_time_series.jl 76.47% <ø> (ø)
src/component_container.jl 92.30% <ø> (ø)
src/component_uuids.jl 0.00% <ø> (ø)
src/components.jl 85.81% <ø> (ø)
src/containers.jl 100.00% <ø> (ø)
src/internal.jl 84.12% <ø> (ø)
src/serialization.jl 74.80% <ø> (ø)
src/supplemental_attribute_associations.jl 89.49% <ø> (-0.10%) ⬇️
src/supplemental_attribute_manager.jl 93.26% <ø> (ø)
... and 3 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kdayday kdayday requested review from daniel-thom and jd-lara June 5, 2026 18:43

@daniel-thom daniel-thom left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks great.

@kdayday kdayday merged commit 5f7f677 into main Jun 9, 2026
10 checks passed
@kdayday kdayday deleted the kd/docs_refresh branch June 9, 2026 15:51
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