Small documentation improvements and fix warnings#812
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes documentation warnings that occur when building the Sphinx documentation, as reported in issue #352. The changes enable nitpicky mode in the Sphinx configuration to enable better documentation quality checks, and address the warnings that surfaced as a result.
Key changes include:
- Corrected cross-references and Sphinx directives throughout docstrings and RST files
- Standardized documentation formatting (backticks for inline code, proper directive syntax)
- Created a new dedicated section for preset consumption files with detailed documentation
- Updated intersphinx URLs to use stable docs and HTTPS
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/conftest.py | Removed reference to non-existent muse.decorators module from registry saving fixture |
| src/muse/utilities.py | Updated docstring formatting: changed "Arguments:" to "Args:" and added proper RST backticks |
| src/muse/timeslices.py | Added blank lines and backticks to fix docstring formatting |
| src/muse/readers/csv.py | Reformatted module docstring with proper list formatting and consistent terminology |
| src/muse/objectives.py | Fixed cross-references to point to correct function names in muse.costs |
| src/muse/filters.py | Added missing spend_limit to __all__ exports list |
| src/muse/demand_share.py | Fixed docstring formatting, corrected "it's" to "its", updated directive names and references |
| src/muse/carbon_budget.py | Simplified return documentation format |
| docs/installation/pipx-based.rst | Fixed indentation of code-block directive |
| docs/inputs/toml_primer.rst | Changed code-block language identifiers to lowercase (introduces minor inconsistency) |
| docs/inputs/toml.rst | Fixed section header lengths, updated cross-references, corrected spelling errors, removed broken link syntax |
| docs/inputs/preset_commodity_demands.rst | New file documenting preset consumption CSV format |
| docs/inputs/inputs_csv.rst | Added label and included new preset_commodity_demands in table of contents |
| docs/inputs/index.rst | Added file structure example and improved introduction |
| docs/inputs/correlation_files.rst | Added reference label |
| docs/inputs/commodities_io.rst | Fixed section header underline length |
| docs/application-flow.rst | Fixed typos (constrains→constraints), updated variable names in diagrams, corrected reference syntax |
| docs/api.rst | Reorganized API member lists to reflect actual module structure (moved LP functions to separate module) |
| docs/conf.py | Enabled nitpicky mode, updated intersphinx URLs to stable versions with HTTPS |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
As mentioned in #352, the documentation build raises lots of warnings. We get even more warnings if we use the
nitpickconfiguration inconf.py(which is a good idea because it enables useful checks like checking internal links)With the help of copilot, I've gone through most of these warnings and either fixed them up or suppressed them if not important. I've tried to manually check that all the changes are appropriate and don't introduce any more breakages, and I'm fairly confident. In any case, this is surely a step in the right direction.
Aside from fixing mistakes, the only major change is to make a dedicated section for preset consumption files, and add a bit more detail about the typical file structure for models.
Closes #352 apart from a few warnings, mostly to do with the API docs and pandas/xarray which I'm not too fussed about for now