-
Notifications
You must be signed in to change notification settings - Fork 309
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
[ADAM-1548] Generate reStructuredText from pandoc markdown. #1646
[ADAM-1548] Generate reStructuredText from pandoc markdown. #1646
Conversation
As an alternative, how would people feel about me using the auto-conversion to port the existing pandoc markdown to rst, and us just cutting over to rst? That would avoid the need for regenerating the rst docs every time we update the markdown. |
Sorry, I am missing something, why generate rst from markdown? I thought Sphinx could run on markdown (CommonMark, specifically)? |
This is pretty half baked TBH; I think 5 min after opening the PR, I realized that generating rst from markdown was kinda silly. CommonMark is supported, but it sounds more limited than rst. I don't really have strong opinions one way or the other; I don't terribly love Markdown, and I think I like rst slightly more. If we have API docs that will automatically push to readthedocs, having markdown which renders on github seems like less of a sell. |
"We support Sphinx docs written with reStructuredText and CommonMark."
or
? |
@heuermh readthedocs uses Sphinx to render the docs, Sphinx supports both rst and CommonMark. |
Thanks, I think I'm reading the right documentation now. I don't have strong feelings one way or another. |
Some observations:
Would you suggest we replace the markdown docs with these generated rst docs at some point? |
Yeah, I think we should.
The conversion process stripped all the anchors we had added. I'll need to make a pass and fix that.
I agree. RTD aside, they're not that great in the original markdown; our PDF/HTML docs are kind of hard to read as of now.
I don't think it has the Scala style attached right now. We should be able to find a Sphinx formatting color scheme for it. |
Test FAILed. Build result: FAILURE[...truncated 15 lines...] > /home/jenkins/git2/bin/git fetch --tags --progress https://github.com/bigdatagenomics/adam.git +refs/pull/:refs/remotes/origin/pr/ # timeout=15 > /home/jenkins/git2/bin/git rev-parse origin/pr/1646/merge^{commit} # timeout=10 > /home/jenkins/git2/bin/git branch -a -v --no-abbrev --contains cf2ca17 # timeout=10Checking out Revision cf2ca17 (origin/pr/1646/merge) > /home/jenkins/git2/bin/git config core.sparsecheckout # timeout=10 > /home/jenkins/git2/bin/git checkout -f cf2ca17d3e13a5c6b69a7e76443bc342f03c3b4aFirst time build. Skipping changelog.Triggering ADAM-prb ? 2.3.0,2.10,1.6.1,centosTriggering ADAM-prb ? 2.3.0,2.10,2.1.0,centosTriggering ADAM-prb ? 2.6.0,2.10,2.1.0,centosTriggering ADAM-prb ? 2.6.0,2.11,1.6.1,centosTriggering ADAM-prb ? 2.6.0,2.11,2.1.0,centosTriggering ADAM-prb ? 2.3.0,2.11,2.1.0,centosTriggering ADAM-prb ? 2.6.0,2.10,1.6.1,centosTriggering ADAM-prb ? 2.3.0,2.11,1.6.1,centosADAM-prb ? 2.3.0,2.10,1.6.1,centos completed with result FAILUREADAM-prb ? 2.3.0,2.10,2.1.0,centos completed with result FAILUREADAM-prb ? 2.6.0,2.10,2.1.0,centos completed with result FAILUREADAM-prb ? 2.6.0,2.11,1.6.1,centos completed with result FAILUREADAM-prb ? 2.6.0,2.11,2.1.0,centos completed with result FAILUREADAM-prb ? 2.3.0,2.11,2.1.0,centos completed with result FAILUREADAM-prb ? 2.6.0,2.10,1.6.1,centos completed with result FAILUREADAM-prb ? 2.3.0,2.11,1.6.1,centos completed with result FAILURENotifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'Test FAILed. |
What do you think about sequencing then? Should we merge all the doc pull requests first and then convert after the content changes are done?
Remembered something that I was frustrated with before, in ScalaDoc output you can link to a class name (ADAMContext) but not to a field or method, because there aren't any anchors. Would it help to create a short style guide? E.g.
There is a scala lexer listed here Looks like styles are defined in Pygments |
Yeah, I think that's probably the easiest way. The conversion process isn't too hard.
SGTM! Add to |
Some suggestions on content that can be added to
|
Thanks @gunjanbaid! I'm thinking we'll fully drop |
@fnothaft Sounds good, I removed the lines needed for |
As of version 2.2.0, the Spark scaladocs have anchor links in them, e.g. You find the permalink URL by hovering over the right side of the method block. |
2e18366
to
a342fe5
Compare
Test PASSed. |
Easier said than done?
Sorry, conda, virtualenv, pip, I can't keep it all straight. |
Yeah, I did this all in a virtualenv to eliminate said problems. |
a342fe5
to
129e3d7
Compare
Test PASSed. |
Wot?
|
ah, that's my bad... will fix shortly. |
129e3d7
to
a200fc9
Compare
Test PASSed. |
Pinging this for review/merge. |
Got this to build locally using sphinx and it looks generally pretty good. I've found some problems with links but I'm inclined to merge this, update the E.g.
|
@heuermh that SGTM, especially because that'll let us start debugging any readthedocs issues. |
Thank you, @fnothaft! |
@fnothaft can you update the readthedocs config? It looks like all that needs to be done is to remove the branch from latest in Advanced Settings, but perhaps there is more to it than that. |
Resolves #1548. Generates rst documentation from the pandoc markdown. To display on readthedocs, this generated documentation must be checked in, so we add integration to jenkins-test that makes sure that the generated docs are not out of date and fails the build if the markdown changes but the docs don't. Additionally, this commit adds the
conf.py
needed by readthedocs.Here's the PDF documentation that this generates: https://media.readthedocs.org/pdf/adam/latest/adam.pdf
For whatever reason, this doesn't generate the HTML docs properly. Anyone have thoughts?