-
Notifications
You must be signed in to change notification settings - Fork 92
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
Added shim that allows us to use m2r components, but recommonmark mainly #602
Conversation
Also made some changes to makefile in line with latest sphinx (3.x) config generation
docs/conf.py
Outdated
@@ -26,6 +26,9 @@ | |||
|
|||
import openforcefield | |||
|
|||
from recommonmark.transform import AutoStructify |
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.
This was not pulled down for me with conda env create --name openff-docs --file environment.yml
This builds locally for me and looks good (after grabbing |
Looking at this now -- I've tagged this branch for builds on RTD, so we should be able to see status here: https://readthedocs.org/projects/open-forcefield-toolkit/builds/ |
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.
Thanks for taking a swing at this. Right now, the API links in the release notes aren't connecting up -- compare clicking on the ParameterHandler.attribute_is_cosmetic
method name in the new docs to that in the 0.6.0 release docs
I wonder if it's something to do with the m2r_parse_relative_links
setting here
If this ends up being hard, I'd be happy to review and approve without the links working (since something is better than nothing). But I direct a lot of user traffic to our release notes, so if we can keep them that'd be ideal.
Just tried switching |
Tried this approach locally just now. Doesn't require |
Using this approach: miyakogi/m2r#51 (comment)
I wonder if it'd be worthwhile to take another go at pinning to an old version of sphinx. If we can force it down to |
Just tried to set |
Maybe this helps: readthedocs/readthedocs.org#5810 |
We might be able to force a "conda" style build instead of a "sphinx" style one, and then just manually install the dependencies, including |
We are already doing a
I don't see any additional options in the RTD conda docs for overriding this behavior. |
Besides the |
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.
Besides the .. mdinclude directive, is there anything else out of m2r that we actually need?
I don't think so.
If not, we could move the spec into the doc tree and try sticking with recommonmark.
We screwed up here, and have a bunch of direct URL links to the latest
branch spec docs that this might break. These links are spread all over the place, and I don't know how we'd track them down.
But here's my thinking:
- We'll break the SMIRNOFF spec links by migrating to GH Pages eventually, so we'll need to either do clever redirects or change all the existing direct-URL links anyway. But it'll be best to do that just once.
- Once we're hosting docs on GH Actions/Pages, we can pin to sphinx 2.4.4 (or take our time finding a workaround for docs links)
- Keeping the API links in releasenotes is very nice, but not critical
- The 0.7.0 release is time-critical, and so it's probably fine if we just have any working solution to get the docs building here
So, I'd actually propose that we just merge any successfully-building solution that we can now, even if it breaks API links from release notes. Then we can revisit this later when there's less on our plate.
Cool, went with one of the workarounds in |
Addresses #598
This PR fixes the doc build, which uses Sphinx 3.x.
m2r
, which we used for markdown handling, appears unmaintained and fails when building the docs under this version of Sphinx.I used this approach to use the components we need from
m2r
(.. mdinclude::
directive), butrecommonmark
for everything else.I would like a second set of eyes on the built docs to ensure everything is being generated as expected.
Also made some changes to makefile in line with latest sphinx (3.x) config generation. This may not necessarily be desirable; review requested.