Skip to content

Reduce Sphinx documentation build warnings#800

Open
johnjasa wants to merge 5 commits into
NatLabRockies:developfrom
johnjasa:reduce_doc_warnings
Open

Reduce Sphinx documentation build warnings#800
johnjasa wants to merge 5 commits into
NatLabRockies:developfrom
johnjasa:reduce_doc_warnings

Conversation

@johnjasa

@johnjasa johnjasa commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Reduce Sphinx documentation build warnings

Reduces the docs build warning count from roughly 880 to about 17.

  1. Configured napoleon to recognize H2Integrate's custom docstring sections (Inputs, Outputs, Promoted Inputs, Promoted Outputs, Subsystems, Discrete Inputs, Discrete Outputs, Options, Behavior, Side Effects), set napoleon_use_ivar, and suppressed the etoc.toctree category.
  2. Cleared stale _autosummary/ files at the start of every build.
  3. Removed duplicated Methods: docstring sections and added :no-index: to hand-authored autoclass directives that duplicated autosummary entries.
  4. Fixed docstring formatting bugs across roughly twenty source files (bullet / definition list separations, starred attribute markers, unbalanced backticks, stray substitution references).
  5. Fixed several MyST issues: missing target labels, ambiguous doc vs ref targets, an incorrect autosummary relative path, a duplicate pysam-options label, a broken image path, and a broken literalinclude path.

Section 1: Type of Contribution

  • Feature Enhancement
  • Bug Fix
  • Documentation Update
  • CI Changes
  • Other (please describe):

Section 2: Draft PR Checklist

  • Open draft PR
  • Describe the feature that will be added
  • Fill out TODO list steps
  • Describe requested feedback from reviewers on draft PR
  • Complete Section 8: New Model Checklist (if applicable)

TODO:

  • Identify and fix the largest warning clusters
  • Rebuild docs and confirm warning-count reduction

Type of Reviewer Feedback Requested (on Draft PR)

Structural feedback: Confirm the additions to docs/_config.yml (napoleon_use_ivar, napoleon_custom_sections, suppress_warnings) are acceptable long-term.

Other feedback: N/A

Section 3: General PR Checklist

  • PR description thoroughly describes the new feature, bug fix, etc.
  • Added tests for new functionality or bug fixes
  • Tests pass
  • Documentation
    • Docstrings are up-to-date
    • Related docs/ files are up-to-date, or added when necessary
    • Documentation has been rebuilt successfully
    • Examples have been updated (if applicable)
  • CHANGELOG.md
    • At least one complete sentence has been provided to describe the changes made in this PR
    • After the above, a hyperlink has been provided to the PR

Section 4: Related Issues

Mostly addresses #548

Section 5: Impacted Areas of the Software

Section 5.1: New Files

N/A

Section 5.2: Modified Files

Docs config and build: docs/_config.yml, docs/build_book.sh, docs/technology_models/iron_ewin.md.

Doc content and cross-references: docs/control/system_level_control/control_classifier.md, docs/control/technology_level_control/open-loop_controllers.md, docs/developer_guide/adding_a_new_technology.md, docs/developer_guide/testing.md, docs/resource/resource_index.md, docs/resource/solar_index.md, docs/technology_models/geologic_hydrogen.md, docs/technology_models/nuclear.md, docs/technology_models/tidal.md, docs/technology_models/windpower_wind_plant.md.

Source-tree docstring fixes: h2integrate/finances/{profast_base,profast_lco}.py, h2integrate/resource/{river,tidal}.py, h2integrate/storage/battery/pysam_battery.py, h2integrate/control/control_rules/plant_dispatch_model.py, h2integrate/control/control_strategies/{pyomo_storage_controller_baseclass,storage/openloop_storage_control_base,storage/plm_openloop_storage_controller}.py, h2integrate/converters/ammonia/{ammonia_synloop_performance,ammonia_synloop_cost}.py, h2integrate/converters/hydrogen/geologic/templeton_serpentinization.py, h2integrate/converters/nitrogen/simple_ASU.py, h2integrate/converters/solar/atb_res_com_pv_cost.py, h2integrate/converters/steel/{cmu_electric_arc_furnace_dri,cmu_electric_arc_furnace_scrap}.py, h2integrate/converters/wind/wind_plant_ard.py, h2integrate/core/{h2integrate_model,file_utils,model_baseclasses}.py, h2integrate/resource/solar/nlr_developer_goes_api_models.py, h2integrate/storage/hydrogen/h2_storage_cost.py, h2integrate/storage/test/test_storage_performance_model.py.

Section 6: Additional Supporting Information

Local build reports build succeeded, 17 warnings (12 unique categories) versus roughly 880 previously. Remaining warnings are all environment-related on my Windows machine.

Section 7: Test Results, if applicable

N/A. This PR does not change runtime behavior; only docstrings and doc-source content.

@johnjasa johnjasa marked this pull request as ready for review July 7, 2026 19:09
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.

1 participant