-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Documentation System #8791
Documentation System #8791
Conversation
It seems to me that not all the TODOs need to be done before we merge this. It would be great if we can have something that exists along with the existing help for a bit, while we transition and fix everything and deprecate the existing system. |
I agree completely – the TODOs are more general things that would be nice to have eventually, but sure, this is basically usable as is. |
I found that it was quite easy to just parse the old helpdb.jl file, put its contents into the new help storage and have the new help-system displaying 99% of what there was before: |
6044ad4
to
03e6999
Compare
I suggest merging this and then taking it from there. |
+1 |
Merging something (or the threat of merging something) does seem like the best way to make progress. |
I'm a little concerned about packages starting to use this in a way that doesn't degrade gracefully, but I can get over that fear for the sake of making forward progress. Go for it. |
This is exactly what we want to sort out in the middle of the dev cycle. @one-more-minute Please merge when you are ready. We may want to start using in a few packages and then improve from there. |
Perhaps squash some of the commits too? |
I would say squashing isn't necessary for merging this. (If there were intermediate breakages I might think differently, but that's a lot of green checkmarks above.) |
56acc47
to
a1eb7d1
Compare
Awesome, can't wait to see what you come up with |
This is very exciting. Thank you all for pushing this through. |
I guess now is a good time to bring up the matter of standardizing headers. For comparison, R has the following ... Description
...
Usage
...
Arguments
...
Details
...
References
...
See Also
... |
@milktrader, see #8966 |
@StefanKarpinski Glad to help! |
I added some really basic documentation examples in basedocs.jl – hope that's OK. It's not meant to be final in any way so much as to get something going, and give people something to try out in the repl (e.g. you can do |
I'm using it over in https://github.com/mauro3/Traits.jl, works a treat! |
That's great to see 👍 |
One of the really sweet things @MichaelHatherly added to Lexicon was the ability to dispatch on help. I confess that due to other commitments I haven't followed this effort at all; is that functionality supported? |
I actually just added this (3c2e2c4): julia> @doc "foo1" foo() = 1
foo (generic function with 1 method)
julia> @doc "foo2" foo(x) = 2
foo (generic function with 2 methods)
help?> foo()
foo1
help?> foo(2)
foo2 |
Ok, I see there's also the idea of having a searching version of |
I haven't tested it extensively (I'm only using Docile/Lexicon in a subset of my private code tree, basically the stuff that was developed after these packages became available). But everything I've tried so far suggests it's the cat's meow. Specifically, I was wondering about this for |
I only mention That's only an implementation detail, though – I'm definitely on board with fuzzy searching for docs in general. @MichaelHatherly So you have this to working in Docile/Lexicon already? |
The Having a more intelligent fuzzy-matcher could be quite nice. Not sure what it would look like though. |
Pushing forward on completing the transition - it seems that the next step is to transition Does this mean that our standard library documentation should be translated to Markdown first to leverage the new system best? This may not work best with readthedocs - does it have to use rst? |
I think readthedocs requires RST, yes. That said, we already have our own docs template and website, so I'm not sure readthedocs really buys us that much – @MichaelHatherly has done a lot of work on generating great documentation pages and might be interested in helping to move away from it entirely. OTOH, it wouldn't be hard to generate RST manual pages from the inline docs using Markdown.jl, so that's another option. The important thing is to have some way to share content between Base docs and the manual – otherwise there'll be a lot of repeated work. |
There's also http://www.mkdocs.org/, which @tshort has been using recently (https://tshort.github.io/Sims.jl/) in conjunction with Docile. |
I was thinking the same about readthedocs. The manual and Base docs should just be equally accessible, but they don't share much of anything. They can be done in different ways without impacting anything, I feel. mkdocs looks really cool! |
Embedded Docile/Base 0.4 docs can be used with Mkdocs and published on either readthedocs or GitHub Pages. It's really easy. Github Pages works great with Mkdocs. I haven't tried it, but one advantage of readthedocs is it provides online searching. |
A metadata system for global objects + pretty markdown parsing and display (see the readme). For example:
Documenting multiple methods of a function will concatenate the doc strings together, in the order the methods were originally defined, and this is overloadable.
By default
@doc
treats unadorned strings as equivalent tomd""
(i.e. markdown syntax) but you can actually put anything before the arrow to associate it with the function.Docs can be queried with e.g.
(and you can try these out on this branch – the repl help key
?
will work too)General Todos:
"..."
->@doc doc"..." ->
)Docs.@init
call to module init code?
integrationText
docs are uncommented (!?)