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

RST not rendering with mkdocs #307

Closed
ml-evs opened this issue Jun 11, 2020 · 11 comments · Fixed by #351
Closed

RST not rendering with mkdocs #307

ml-evs opened this issue Jun 11, 2020 · 11 comments · Fixed by #351
Labels
docs Issues pertaining to documentation.

Comments

@ml-evs
Copy link
Member

ml-evs commented Jun 11, 2020

The API docs don't seem to render in rst (see e.g. https://www.optimade.org/optimade-python-tools/reference/server/mappers/entries/#optimade.server.mappers.entries.BaseResourceMapper)

Originally posted by @ml-evs in #295 (comment)

@ml-evs ml-evs added the docs Issues pertaining to documentation. label Jun 11, 2020
@ml-evs
Copy link
Member Author

ml-evs commented Jun 11, 2020

Thoughts on this @shyamd? I can't see any plugins for mkdocs + rst

@shyamd
Copy link
Contributor

shyamd commented Jun 11, 2020

I don't think that's a RST issue, but a formatting issue. It doesn't currently work with numpy docs. So we should reformat for Google Docs.

@ml-evs
Copy link
Member Author

ml-evs commented Jun 12, 2020

All the model descriptions are written in rst though, as they're taken from the spec...

@shyamd
Copy link
Contributor

shyamd commented Jun 12, 2020

The model descriptions actually look pretty good, for instance: https://www.optimade.org/optimade-python-tools/reference/models/entries/ .

The section you linked is from the BaseMapper in the server. That section at the top is just weird text. I'll try and figure out what is going on there.

@ml-evs
Copy link
Member Author

ml-evs commented Jun 12, 2020

Hmmm, not sure I agree for the more complicated (and important) models, e.g. structure https://www.optimade.org/optimade-python-tools/reference/models/structures/

image

@shyamd
Copy link
Contributor

shyamd commented Jun 12, 2020

Hmm good catch. This is very difficult to fix within the documentation workflow. Mkdocs is in markdown and expects markdown. Typically, docstrings don't themselves contain RST or markdown. The better solution is to change the docstrings.

@ml-evs
Copy link
Member Author

ml-evs commented Jun 13, 2020

Hmm good catch. This is very difficult to fix within the documentation workflow. Mkdocs is in markdown and expects markdown. Typically, docstrings don't themselves contain RST or markdown. The better solution is to change the docstrings.

Thoughts @CasperWA? This would decouple our description fields from the spec (the only coupling previously is that they were copied and pasted, but presumably some are now out of date...), but a rewrite would also solve #184.

I see two options:

  • switch away from mkdocs (boo)
  • run the spec through pandoc to get md, then c+p from there once 1.0-rc2 is out?

@CasperWA
Copy link
Member

Third option would be to go through and manually update description to markdown...

At this point I'm almost tempted to do that and update the various descriptions at the same time. However, it may make it a bit more difficult going forward if it's not an easy copy-paste from the spec.

@ml-evs
Copy link
Member Author

ml-evs commented Jun 14, 2020

Third option would be to go through and manually update description to markdown...

At this point I'm almost tempted to do that and update the various descriptions at the same time. However, it may make it a bit more difficult going forward if it's not an easy copy-paste from the spec.

I think this was my option 2!

@CasperWA
Copy link
Member

Third option would be to go through and manually update description to markdown...
At this point I'm almost tempted to do that and update the various descriptions at the same time. However, it may make it a bit more difficult going forward if it's not an easy copy-paste from the spec.

I think this was my option 2!

Right. Yeah, okay. I think that would be the nicest to be honest then. And the description of how you would carry it out sounds better than mine as well :)

@ml-evs
Copy link
Member Author

ml-evs commented Jun 14, 2020

👍

Then let's get the rc2 models up to date with the current description style and then redo all description conversions in one go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Issues pertaining to documentation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants