-
Notifications
You must be signed in to change notification settings - Fork 15
Post-0.3 Docile/Lexicon roadmap. #147
Comments
Should we update/create a new issue for build related changes. Specifically:
* in the latest rewrite I can't get the
syntax working. Specifically it should work here, and we should add in the The stacktrace if you can't replicate:
Should I/we start posting separate issues? |
Yeah, that was just an oversight from some changes made yesterday. Pushed fix in 6beba76, hopefully that works a bit better. Instead of splitting on new lines, it uses
Both of those are actually gone now :) since it made it possible to overwrite defined directives by just redefining the method signature outside of the module, not cool. I've changed to a manual cache and dispatch here. That file has some examples of how the directives are defined now.
That should work, for the most part, though there's some issues with relative paths for the auto cross referencing using
Yes, if something doesn't fit here then feel free to open an issue specific to it. |
The basics of that one are implemented, here, but if you'd like additional features for it then they'd definitely be welcome improvements. |
Thanks for the fix! One remaining directive idea is I really dislike the current style for posargs/keyword (everyone has different conventions) e.g. https://github.com/MichaelHatherly/Docile.jl/blob/6beba76a739fc5e81e138fb2c7b8e24d8de95c8f/doc/build/public.md#functions I think would be nice if there was some way to grab the default arguments too:
Headers (regardless of size) become arguments, if there are keywords the default arg is grabbed (not sure whether that's possible), the subsequent markdown is attached to that parameter. would become (and could be tweaked later for everyone :) ):
This is already doing so much (I'm being "Julian greedy"). Edit: tried to implement but is messy. Will pr if I get it working... |
If we can access the object then I'm not a huge fan of the output |
I think that should work and will be much better! I wasn't a fan of anything before but conscious that h1-3s screw up formatting... and pretty much everyone tries to use those atm. (The parameters title needs to be h4 I think.) |
Sounds reasonable. Maybe these kind of "rendering" directives should wrap their output in a |
Sounds good, we can even add some style to our default mkdocs css. (depending on other PR) :) Is this going to be a problem in the repl? (which can't parse divs/classes etc.).... Aside/related: the julia devs wanting julia to host julia docs may be tricky too for the same reason. ? |
Could just have a flag to only show when |
Maybe this needs to just be solved in Markdown. Each tag could just be a Markdown object:
and deal with some e.g. links, images, headers. and let all others pass through (e.g. divs). :/ Edit: class should probably be |
lol. This is not easy... at all. |
Probably best to just add some logic into the |
Would be great to release something soon now we have 0.4rc. I haven't had much time to look recently, but it seems (from all the ticked checkboxes) like it's coming together? |
I might have some time to sort things out soon, but there's still much polishing up of things to do. There's also a couple of things that need to be redone, like the cross-referencing, which I may get to today. |
Just an update on the current state of the
|
I did a brief talk on this last night at SF julia meetup, I think it went down pretty well. Is the idea going forward that:
I think the main things to do are:
Aside: I'm still not a fan of the hook syntax... I'd prefer:
I think that's clearer, enforcing these newlines is ok (as Markdown won't break the text with a newline) and I that makes the parsing strict enough to avoid ambiguity. I don't think the Granted that's bike shedding for the main functionality, which is excellent, and everyone is excited about! |
Great to hear!
Yes, that's hopefully the plan. http://pkg.julialang.org says that 172 packages depend on Docile... so the switch and deprecations will need to be done carefully.
That's probably the best way to go at the moment I think.
That would be really nice to have.
The
Having thought over this for a while I think it would probably be best to let authors use h1 for different sections in their docstrings. This is really just a presentation issue that could be solved by Docile automatically lowering all headers by 2 (or some other count, possibly configurable) when outputting docs to file. Rust appears to go with h1 for different sections in docstrings, https://doc.rust-lang.org/stable/book/documentation.html#special-sections, for what it's worth.
Yeah, threading some kind of context object through the parser to track where we are would be useful.
Requiring
They aren't really templates in every case though. Something like |
xlink for h1/3 thing JuliaLang/julia@3160e54 If we lower, we should lower all headers (or lower h1 and h2s to h3s??), I hate APIs where you can change one part of the docstring and it to change the behavior of the entire thing. In this case adding a h1 somewhere changes h3s to h5s, and so an h3 in one docstring may render differently to an h3 in another. |
Agreed, it would definitely be all of them, except for |
Just to clarify, I think what would be consistent if h1 -> h3, h2 -> h3, h3 -> h3, h4 -> h4, which would solve the issue without error whilst also keeping an h4 always an h4. :) |
That would lose some of the document structure by flattening to h3, though maybe that would be fine. I'll probably only get a chance to push on with this in early December though, so feel free to hack away at it if you have the time. |
Bump! Anything that can be done to help here? |
Yeah, I've been meaning to revisit this for some time. There's a few bits, such as Such as the Also, given the number of packages that appear to depend on current Docile, 177 according to http://pkg.julialang.org/, making a breaking change could be quite problematic. It may actually be best to split out the document generation code into a separate package, and leave Docile and Lexicon as is for the moment. Something like the following for the future uses of each package:
|
What about something lazy / "say what you see"-y: +1 to code and repl being code blocks. I was going to say that you could set multiple words here (and it should render ok)
but looks like that's only in commonmark http://johnmacfarlane.net/babelmark2/?text=%60%60%60julia+repl%0Acode+block%0A%60%60%60 Sounds great to move to a new package moving forward, hopefully I can get my hands dirty once it's there :) It'll also make dev/status a little less opaque/easier (than being on a branch) so 💯 |
Yes, something like that would probably be best. For the current
which would make the raw markdown files in |
Thinking about it DocTests.jl should probably be a separate package too. IMO The more modular packages are the clearer/better: do one thing and do it well. :) MysteryPackage.jl/MakeDocs.jl : generate documentation from docstrings I wonder if at some stage these should be "blessed" as JuliaTests/JuliaDocumentation groups like others. A related project I was thinking about was multi-language support: now we have a docstrings these can be translated (there are free services to source translations for open source projects), these are looked up and help is in that language... One problem is that this would have to be for each package rather than globally. |
Yeah, probably best to do that. Though I'd like it if building docs with
Sure, once things are passed the initial teething stage then that would be best for long-term survival, though I'm not planning on going anywhere.
That could probably work quite well I think. Shouldn't be too difficult to replace, at runtime, any specific docstring with another from a package. A task for another day though. |
MysteryPackage.jl package is here, https://github.com/MichaelHatherly/Lapidary.jl. Mostly a prototype at the moment, but it does manage to do most of what's needed. The readme outlines most of what's been implemented so far. Issues can be opened over there if you happen to try it and run into problems. Doctesting is currently built-in, but could be split out into another package relatively easily. |
to the name... But awesome, I will give it a whirl! |
Heh, yeah just a working name for the moment. Easy to change anytime really. |
After Julia 0.4 is release there will be little need in keeping much of the current features around. The focus will be on docstring/helpsystem extensions that build on top of the infrastructure in
Base
. To that end the following will serve as a working list of features that may still be useful:register!
.Hooks.track
, mostly for debugging docstring capture.Hooks.__doc__
and@__doc__
, documenting macro-generated code.Hooks.directives
, parsing directives from inline docs.doc!*
variables, interpolate markdown formatted metadata such as signature and per-argument docs:doc!sig
doc!args
doc!kwargs
ie.
@{...}
:docs
, defaultmodule
esc
ref
anchor
repl
code
makedocs
:mkdocs
,gitbook
etc.Base.Markdown
can do.)]
key afterusing Docile
.&
,|
, and!
for combining other queriesimprove look-and-feel of the webserver query modeon hold for a the moment.The text was updated successfully, but these errors were encountered: