-
Notifications
You must be signed in to change notification settings - Fork 10
Small documentation improvements and fix warnings #812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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