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

[Sphinx] Fix rst underline length warnings #3382

Closed
wants to merge 1 commit into from

Conversation

CristianLara
Copy link
Contributor

These changes

Fixes errors like

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [docutils]
/home/runner/work/Ax/Ax/sphinx/source/modelbridge.rst:388: WARNING: Title underline too short.

From the official RST documentation:

The underline/overline must be at least as long as the title text.

Next steps

We currently ignore warnings and errors in our sphinx build. There's more work needed to fix all the current warnings and errors before we can start blocking deploys on this. We currently build sphinx for testing in the "Build and Test Workflow" https://github.com/facebook/Ax/actions/runs/13395675240/job/37413955185#step:7:207

I took a stab at fixing other errors but the loop of

  1. attempt fix
  2. rebuild sphinx docs to reveal errors
  3. grep logs to see if fix resolved our specific error

is painfully slow. I tried using a flake8-rst extension to reveal the errors in my editor but they didn't match the output of sphinx.

Creating a backlog task for the remaining work

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Feb 18, 2025
@facebook-github-bot
Copy link
Contributor

@CristianLara has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Summary:
## These changes

Fixes errors like
```shell
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [docutils]
/home/runner/work/Ax/Ax/sphinx/source/modelbridge.rst:388: WARNING: Title underline too short.
```

From the [official RST documentation](https://docutils.sourceforge.io/docs/user/rst/quickstart.html#sections):
> The underline/overline must be at least as long as the title text.

## Next steps

We currently ignore warnings and errors in our sphinx build. There's more work needed to fix all the current warnings and errors before we can start blocking deploys on this. We currently build sphinx for testing in the "Build and Test Workflow" https://github.com/facebook/Ax/actions/runs/13395675240/job/37413955185#step:7:207

I took a stab at fixing other errors but the loop of
1. attempt fix
2. rebuild sphinx docs to reveal errors
3. grep logs to see if fix resolved our specific error

is painfully slow. I tried using a [flake8-rst extension](https://github.com/peterjc/flake8-rst-docstrings) to reveal the errors in my editor but they didn't match the output of sphinx.

Creating a backlog task for the remaining work


Reviewed By: paschai

Differential Revision: D69794692

Pulled By: CristianLara
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D69794692

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.99%. Comparing base (6f7afa5) to head (90b1cb0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3382   +/-   ##
=======================================
  Coverage   95.99%   95.99%           
=======================================
  Files         539      539           
  Lines       52727    52727           
=======================================
  Hits        50614    50614           
  Misses       2113     2113           

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

@facebook-github-bot
Copy link
Contributor

@CristianLara merged this pull request in 9db61c5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants