Skip to content

Conversation

@tsmbland
Copy link
Collaborator

@tsmbland tsmbland commented Jan 6, 2026

As mentioned in #352, the documentation build raises lots of warnings. We get even more warnings if we use the nitpick configuration in conf.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

Copy link

Copilot AI left a 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.

@tsmbland tsmbland changed the title Fix documentation warnings Small documentation improvements and fix warnings Jan 6, 2026
@tsmbland tsmbland marked this pull request as ready for review January 6, 2026 23:48
@tsmbland tsmbland merged commit 8c73dda into main Jan 6, 2026
14 checks passed
@tsmbland tsmbland deleted the docs_fixes branch January 6, 2026 23:48
@github-project-automation github-project-automation bot moved this to ✅ Done in MUSE Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Sphinx builds documentation but throws 126 warnings and not all HTML documents are rendered without artefacts

2 participants