Docs: refresh "add a new technology" guide, auto-generate model overview, unify the docs build#787
Open
johnjasa wants to merge 3 commits into
Open
Docs: refresh "add a new technology" guide, auto-generate model overview, unify the docs build#787johnjasa wants to merge 3 commits into
johnjasa wants to merge 3 commits into
Conversation
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.
Docs: refresh "add a new technology" guide, auto-generate model overview, unify the docs build
I made three related docs changes:
docs/developer_guide/adding_a_new_technology.mdto clarify when to use the generic baseclasses vs. a category-specific one, and updated the worked examples to match the current registry.docs/generate_model_overview.py, which runs at docs build time, walksh2integrate.core.supported_models, classifies each class by category and role, and rewrites the marker-delimited block indocs/user_guide/model_overview.md. The hand-written intro is preserved. Each bullet links to the autosummary page and appends the first sentence of the class's own docstring.docs/build_book.shnow has a shebang,cds into its own directory, and treatsrm -rf _buildas opt-in via--clean.docs/_config.ymlswitchesexecute_notebooksfromautotocacheso rebuilds reuse jupyter-cache..readthedocs.yamlnow invokesdocs/build_book.shviabuild.commands.Section 1: Type of Contribution
Section 2: Draft PR Checklist
Type of Reviewer Feedback Requested (on Draft PR)
Implementation feedback:
cls.__dict__.get("__doc__")instead ofinspect.getdoc(cls)so inherited docstrings don't leak in; classes with no docstring of their own render as a bare link. Happy to switch if you'd rather see inherited summaries.HIDDEN_MODELS,COMBINED_PERFORMANCE_AND_COST_MODELS, andCOMBINED_COST_AND_FINANCIAL_MODELSsets at the top of the generator are small allow/deny lists; let me know if anything else should go in them.Other feedback:
.readthedocs.yamlusesbuild.commands, including copying HTML to$READTHEDOCS_OUTPUT. Worth a once-over.Section 3: General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.md"A complete thought. PR XYZ", where
XYZshould be replaced with the actual number.Section 4: Related Issues
Resolves #375 and #487
Section 5: Impacted Areas of the Software
Section 5.1: New Files
docs/generate_model_overview.pysupported_models, classifies each class by category and role, and rewrites the marker-delimited block indocs/user_guide/model_overview.mdwith cross-referenced bullets and docstring summaries.Section 5.2: Modified Files
docs/build_book.shset -euo pipefail, made itcdinto its own directory, maderm -rf _buildopt-in via--clean, and added a call togenerate_model_overview.py.docs/_config.ymlexecute_notebooksfromautotocacheso unchanged cells are skipped on rebuild..readthedocs.yamljobs.pre_build/python:/sphinx:config withbuild.commandsthat installs the package and runsbash docs/build_book.sh.Section 6: Additional Supporting Information
N/A