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

The Doc Knight Rises #12435

Merged
merged 9 commits into from
Aug 19, 2015
Merged

The Doc Knight Rises #12435

merged 9 commits into from
Aug 19, 2015

Conversation

MikeInnes
Copy link
Member

This is a first (WIP) pass at converting as many of the docstrings as possible to Markdown. There's also an RST render backend for the Markdown parser so that we can keep the RST docs as they are while having docstrings in Markdown.

Once I've sorted out some code-block related issues I'll push the manual regeneration step so that people can check for information loss.

@tkelman
Copy link
Contributor

tkelman commented Aug 2, 2015

Could this wrap long lines in the output? Generally a lot nicer to edit that way.

@tkelman tkelman added the docsystem The documentation building system label Aug 2, 2015
@MikeInnes
Copy link
Member Author

Yeah that would be better. Will look for a pandoc option to do that.

@shashi shashi assigned shashi and unassigned shashi Aug 3, 2015
@shashi
Copy link
Contributor

shashi commented Aug 3, 2015

Oops sorry about the assigning myself and then unassigning, stupid vimium tricked me.

Also, @one-more-minute is the hero we deserve need!

@hayd
Copy link
Member

hayd commented Aug 3, 2015

There's still some (256) ````rst` in the docstrings. Is the objective to convert these too in this PR?

This is great work!!

@MikeInnes
Copy link
Member Author

@shashi Or at least, the one you need right now ;)

Thanks @hayd. Not all docstrings can be converted because they contain cross references (:func: etc.) or .. doctest:: directives which can't be converted by pandoc. Once cross refs are working in Markdown we can figure out a way to do the last conversions.

@tkelman
Copy link
Contributor

tkelman commented Aug 3, 2015

Do we have doctest capabilities in the base docsystem, or standard markdown syntax for them? I see Lexicon has something for that? I think it would be fine to have the doctest-running eventually dependent on a Julia package as a replacement for Sphinx and the JuliaDoc shim.

@StefanKarpinski
Copy link
Sponsor Member

Is the huge number of deletions in helpdb.jl expected?

@tkelman
Copy link
Contributor

tkelman commented Aug 3, 2015

I think a lot of that is line count differences due to markdown not breaking long lines where RST was. You can do git diff 04dc8061ad10ed36f33659537877d0c18fe20847~ 04dc8061ad10ed36f33659537877d0c18fe20847 to look at this locally.

@StefanKarpinski
Copy link
Sponsor Member

@one-more-minute, what's going on this?

@ViralBShah ViralBShah added the status:priority This should be addressed urgently label Aug 11, 2015
@ViralBShah
Copy link
Member

@one-more-minute This is one of the things that is preventing the 0.4 release. Would it be useful for some of us to get on a hangout and figure out how to get things done?

@ViralBShah ViralBShah mentioned this pull request Aug 11, 2015
13 tasks
@MikeInnes
Copy link
Member Author

This is essentially already there, I just need to regenerate the manual from it and make sure nothing's going wrong in the round trip. The main remaining issue is the text-wrapping thing – I played around with pandoc to get that working but no permutation of the --columns=80 command seemed to work. It may be to do with working over stdout and I'll see if I can work around that, otherwise if anyone has any ideas let me know.

@MikeInnes MikeInnes force-pushed the omm/md-conversion branch 4 times, most recently from f585767 to 5bab547 Compare August 11, 2015 18:14
@MikeInnes
Copy link
Member Author

I polished this up and regenerated the manual from the new md docstrings. I also fixed the code block syntax issues, and added a warning for autogenerated docs, which shouldn't show up in the rendered manual. Once this is in I'll put up examples for how to move methods to the right place.

@MichaelHatherly
Copy link
Member

@one-more-minute this diff is what I get when running genstdlib.jl and after make. Should there be that much of a change between builds? It looks kind of as though there's some different line endings in places.

@MikeInnes
Copy link
Member Author

The whitespace thing is annoying. I'll run the conversion on a unix soon and see if that helps.

I'll also avoid auto-converting things that pandoc isn't recognising correctly; thanks for looking over the diff.

@MichaelHatherly
Copy link
Member

I'll run the conversion on a unix soon and see if that helps.

Perhaps having genstdlib.jl run just once per day separately or something like that would avoid that kind of problem. Then contributors wouldn't have to worry about running it themselves. That would mean the docs wouldn't be completely up-to-date all the time though.

@MikeInnes
Copy link
Member Author

Another day, another rebase. How is this looking now?

@ViralBShah
Copy link
Member

Why are all the builds failing?

@MikeInnes
Copy link
Member Author

Pandoc seems to introduce some whitespace issues – fixed.

@ViralBShah
Copy link
Member

@tkelman What next here? Should we rebase and get it ready?

@StefanKarpinski
Copy link
Sponsor Member

Let's merge this. The remaining issues are not going to get fixed until this gets merged.

@KristofferC
Copy link
Sponsor Member

Reflecting my own view here but I am not sure what the remaining issues are and how I can help. Can I start making PRs moving documentation to method definitions now? Tell me what to do hehe.

@MikeInnes
Copy link
Member Author

Rebased.

@KristofferC Working on that now ;)

MikeInnes added a commit that referenced this pull request Aug 19, 2015
@MikeInnes MikeInnes merged commit 47f124c into master Aug 19, 2015
@MichaelHatherly
Copy link
Member

@one-more-minute, thanks for all the effort you've put into this one!

@MikeInnes
Copy link
Member Author

@MichaelHatherly Very close now!

@timholy
Copy link
Sponsor Member

timholy commented Aug 19, 2015

Wow, this will be nice!

@tkelman tkelman deleted the omm/md-conversion branch August 19, 2015 18:45
@tkelman
Copy link
Contributor

tkelman commented Aug 20, 2015

ifft (unless inline latex in markdown works - does it?) and @sprintf look like they need to be fixed up manually, and some mismatched double-backticks confused things in readdlm.

doc/convertmd.jl was intended to be temporary and probably won't be needed again, right?

@ViralBShah
Copy link
Member

Hurray!

@ihnorton
Copy link
Member

What's the deal with the thousands of lines of code-block warnings? They make CI output nearly unreadable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docsystem The documentation building system status:priority This should be addressed urgently
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants