Skip to content

Conversation

@RHammond2
Copy link
Collaborator

Convert the Jupyter Notebooks to Documentation Examples and Python Scripts for Better Docs and Diffs

This PR focuses on replacing all Jupyter notebooks in the examples/ and docs/ directories with simplified Python scripts and executable notebooks providing in depth demonstrations, respectively.

Section 1: Type of Contribution

  • Feature Enhancement
    • Framework
    • New Model
    • Updated Model
    • Tools/Utilities
    • Other (please describe):
  • 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 7: New Model Checklist (if applicable)

TODO:

  • Step 1
  • Step 2

Type of Reviewer Feedback Requested (on Draft PR)

Structural feedback:

Implementation feedback:

Other feedback:

Section 3: General PR Checklist

  • PR description thoroughly describes the new feature, bug fix, etc.
  • Added tests for new functionality or bug fixes - N/A
  • Tests pass (If not, and this is expected, please elaborate in the Section 6: Test Results)
  • Documentation
    • Docstrings are up-to-date - N/A
    • Related docs/ files are up-to-date, or added when necessary
    • Documentation has been rebuilt successfully
    • Examples have been updated (if applicable)
  • CHANGELOG.md has been updated to describe the changes made in this PR

Section 3: Related Issues

This will resolve #75

Section 4: Impacted Areas of the Software

Section 4.1: New Files

  • docs/control/controller_demonstrations.md: replaces the old examples/14_wind_hydrogen_dispatch/hydrogren_dispatch.ipynb
  • examples/14_wind_hydrogen_dispatch/hydrogren_dispatch.py: simplified version of examples/14_wind_hydrogen_dispatch/hydrogren_dispatch.ipynb
  • docs/user_guide/design_of_experiments_in_h2i.md now includes the detailed demonstration from examples/20_solar_electrolyzer_doe/run_csv_doe.ipynb
  • examples/20_solar_electrolyzer_doe/run_csv_doe.py is a pared down version of examples/20_solar_electrolyzer_doe/run_csv_doe.ipynb
  • docs/user_guide/run_size_modes.md: replaces examples/25_sizing_modes/run_size_modes.ipynb and fixes bugs
  • examples/25_sizing_modes/run_size_modes.py: simplified form of examples/25_sizing_modes/run_size_modes.ipynb
  • docs/misc_resources/turbine_models_library_preprocessing.md: replaces docs/user_guide/how_to_set_up_an_analysis.ipynb, and fixes broken functionality with minor formatting cleanup.
  • docs/user_guide/how_to_set_up_an_analysis.md: replaces docs/user_guide/how_to_set_up_an_analysis.ipynb

Section 4.2: Modified Files

  • .gitignore: Includes more example output data files and folders.
  • docs/_config.yml: ensures executable content doesn't get wrapped up in the many autosummary warnings, and raises a build error
  • docs/_toc.yml: updated to reflect the new or modified file references.

Section 5: Additional Supporting Information

See the discussion in #75 for further details.

Section 6: Test Results, if applicable

N/A

Section 7 (Optional): New Model Checklist

  • Model Structure:
    • Follows established naming conventions outlined in docs/developer_guide/coding_guidelines.md
    • Used attrs class to define the Config to load in attributes for the model
      • If applicable: inherit from BaseConfig or CostModelBaseConfig
    • Added: initialize() method, setup() method, compute() method
      • If applicable: inherit from CostModelBaseClass
  • Integration: Model has been properly integrated into H2Integrate
    • Added to supported_models.py
    • If a new commodity_type is added, update create_financial_model in h2integrate_model.py
  • Tests: Unit tests have been added for the new model
    • Pytest-style unit tests
    • Unit tests are in a "test" folder within the folder a new model was added to
    • If applicable add integration tests
  • Example: If applicable, a working example demonstrating the new model has been created
    • Input file comments
    • Run file comments
    • Example has been tested and runs successfully in test_all_examples.py
  • Documentation:
    • Write docstrings using the Google style
    • Model added to the main models list in docs/user_guide/model_overview.md
      • Model documentation page added to the appropriate docs/ section
      • <model_name>.md is added to the _toc.yml

@RHammond2 RHammond2 requested review from johnjasa and kbrunik January 20, 2026 23:54
@RHammond2 RHammond2 added bug Something isn't working documentation Improvements or additions to documentation code cleanup labels Jan 20, 2026
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@RHammond2 RHammond2 added the ready for review This PR is ready for input from folks label Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working code cleanup documentation Improvements or additions to documentation ready for review This PR is ready for input from folks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant