Skip to content
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

Refactor auto-generate API docs #331

Merged
merged 8 commits into from
Oct 25, 2024
Merged

Refactor auto-generate API docs #331

merged 8 commits into from
Oct 25, 2024

Conversation

lochhh
Copy link
Collaborator

@lochhh lochhh commented Oct 24, 2024

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
closes #329

What does this PR do?
This PR

  • simplifies the code for auto-generating API docs
  • adds the clean action and enables the fail-on-warnings mode for Sphinx (-W) in the Windows make.bat to match the Unix Makefile
  • drops the unused --keep-going for Sphinx (as it is automatically enabled from Sphinx 8.1)
  • updates the "build docs" documentation
  • removes the Sphinx version constraint in requirements.txt

References

#329

How has this PR been tested?

Local docs build

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.76%. Comparing base (1b6b44d) to head (bb6437c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #331   +/-   ##
=======================================
  Coverage   99.76%   99.76%           
=======================================
  Files          14       14           
  Lines         846      846           
=======================================
  Hits          844      844           
  Misses          2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@niksirbi niksirbi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @lochhh!

Just two questions for you:

  • Do the changes in make.bat also enable a simpler syntax for building the docs on Windows? If yes, the contributing guide should be updated accordingly.
  • should we constrain sphinx>=8.1 in the docs requirements?

@lochhh
Copy link
Collaborator Author

lochhh commented Oct 24, 2024

  • Do the changes in make.bat also enable a simpler syntax for building the docs on Windows? If yes, the contributing guide should be updated accordingly.

Thanks for spotting this. That's done. Feel free to suggest better names than "make mode" and "Default mode". I've also simplified the rebuild instructions by providing only the clean command and redirecting users back "to the build command above" for rebuilding. I couldn't decide between using a nested tab-set for the Unix, Windows clean commands or keeping both in the same tab-item, and have decided to go with the former. Lmk if you prefer the latter.

  • should we constrain sphinx>=8.1 in the docs requirements?

I've removed the constraint completely.

@niksirbi
Copy link
Member

  1. Radical solution: do we even need to mention the "default mode"? The syntax is much clunkier there, and if we get rid of it, we will no longer have a need for nested tabsets - which I don't particularly like. Also we no longer have to come up with names for the "modes".

  2. Something seems to have gone wrong with the rendering of monospace in make:
    Screenshot from 2024-10-24 18-18-29

  3. I would also add that one can combine multiple make commands for convenience. For example, make clean html linkcheck will do everything for you.

Copy link

@niksirbi
Copy link
Member

This looks good now @lochhh, shall we merge it?

@lochhh lochhh added this pull request to the merge queue Oct 25, 2024
@lochhh
Copy link
Collaborator Author

lochhh commented Oct 25, 2024

This looks good now @lochhh, shall we merge it?

Done. Thanks for taking a final look!

Merged via the queue into main with commit 7813e7c Oct 25, 2024
27 checks passed
@lochhh lochhh deleted the refactor-make branch October 25, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Makefiles
2 participants