-
-
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
Better documentation of stdlibs #28712
Comments
I think it could be good to have somewhere in the beginning, where we describe what Base includes, and then describe the stdlibs with links to their sections. |
@fredrikekre @crstnbr Is this somewhat related to #30469 ? |
I think the documentation now does a pretty good job of Base vs. stdlib documentation. The doc coverage is also much higher than when this issue was filed. Can we close? |
@ViralBShah While I agree that the documentation has been improved, I still can't find a table (or something similar) in the Manual section that points to the available stdlibs. (The stdlib sections in the navigation pain also still don't match the actual stdlib names. But I think that a proper listing in the Manual section is much better/more important.) |
Yes, true. If you have a moment, would you be able to provide a PR with such a table? |
I guess the Unless I'm missing something, getting the list is quite simple: Or, without the _jll wrappers:
Just a matter of pretty printing them into a list with links, might have a go tomorrow. |
This comment was marked as resolved.
This comment was marked as resolved.
Came here when trying to find a single canonical URL to link a Julia newbie to when first mentioning "the standard library". I couldn't find a way to link to a whole section of the docs - I wonder if there could be a page at the start of the Standard Library section called something like "Introduction" that could be linked to. That could have a brief description as in the earlier comment, ie.
The automatic table of the packages themselves would be great to have right there but as I say I'm looking more for a link that answers "what is the Julia Standard Library" more than "what is in the Julia Standard Library. The first mention of "standard library" in https://docs.julialang.org/en/v1/#man-introduction can link there too. |
I have managed to get something working with documenter.jl, the stdlib modules are just in a simple markdown list rather than a table. I'll open a PR shortly, let me know if the section headers look OK or if there is any other feedback. I thought I'd just put this section at the end of the landing page (index.html) but am open to moving it somewhere else. @pbouffard You will get links for the two new headings as seen in the following screenshot: |
Fantastic, thanks! Would this get backported at all? It would be nice (for me and colleagues anyway) to have this for Julia 1.9. |
If this qualifies for a backport - I have no idea if it does - I would expect that it would only go into 1.10 since it is the new LTS. |
This adds one new section (h2) and a nested subsection (h3) to the landing page of the Julia documentation website and associated PDF file. The new section provides a quick overview of the differences between `Core`, `Base` and the standard library, as well as a list of links to standard library packages. The list of standard library packages is thus duplicated in the website sidebar, but I don't think this is an issue because the sidebar is primarily intended for navigation, whereas this list is primarily intended to be used for referencing purposes. Partially addresses JuliaLang#28712, although I don't provide short descriptions of each standard library package. I think the appropriate place for that would be in module-level docstrings of the packages themselves, which are not currently available.
I've asked about backporting in the PR. I've also mentioned that the original request included short descriptions of each stdlib package, which I haven't added. It would be more appropriate to add those as module-level docstrings of the stdlib packages themselves, so that they are maintained alongside the actual package. |
Great work @adigitoleo! It was indeed a sorely lacking piece of docs.
It might be worth pointing out that Additionally, allow me to share notes I collected for myself a while ago when I was looking for precisely such an overview. There's no guarantee of correctness, but hopefully they can be useful to your PR:
Feel free to use any part of the above in case it helps! |
Thanks, @waldyrious,
I have called them "useful" submodules instead of using the adjective "unpackaged" which while being correct may have unintended negative connotations ("unmaintained"). The distinction between versioned stdlib modules and unversioned Base and Core modules should hopefully already be clear from the following h3 subsection.
This made me realise that the list in the current docs sidebar doesn't use the canonical names ("
Edit: Nope, they are all there, even in the sidebar. |
Yeah, good point. I think it would be nice to take the opportunity to highlight the difference between a module and a package, but I understand if you consider that to be beyond the scope of the current issue/PR.
I'm sorry if I gave the impression that there was duplication! I just listed the various "types" of stdlib modules to clarify what it means for a module to be part of the standard library, in terms of where the source code comes from (where it is developed), how it's integrated into Julia, etc. I do think the distinction is worth documenting, although perhaps this could be considered developer documentation; in that case, I wonder if it would make sense to include at least a hint about it, say somewhere around here. Also, I think it would make sense to mention the actually external libraries ( |
I had assumed this would already be covered somewhere, but the best I could find quickly right now was here. Even if it is not yet in the manual, I feel like "What is the difference between a module and a package?" could probably belong in the FAQ section, rather than the landing page. I think I'd have to check the exact differences again myself to be honest, so I'd rather set it down for another PR.
No it's fine, while I was writing the PR I thought "wait, why am I doing this if it is actually all in the sidebar?" but your list actually made me realise that a list of the canonical names was not present anywhere 😄 I think it was informative to find out that there are some simple env vars to look for in the makefile that show which stdlibs are developed out-of-tree. I agree that this is probably developer documentation, maybe related to the pacakge vs module point. I hesitate with this only because e.g. For the |
I might go instead with "established" or something along those lines.
IMHO a list would be more friendly to the reader, than sending them to consult the source code. I don't think it's necessary to write about how to produce such wrappers (as part of this PR, I mean — of course it would be a welcome addition), but just mentioning which ones do exist would be useful information in the context of the stdlib overview. |
When it is merged BinaryBuilder docs should change the link which currently goes to the source folder: Edit: Bottom of this page: https://docs.binarybuilder.org/stable/jll/ |
A lot of functionality has been moved from Base to stdlibs. However, for people who haven't been part of this process (especially beginners) it is not really transparent which stdlibs exist and what their purpose is.
The documentation doesn't seem to contain a list of all stdlibs with short descriptions. I think such a list would be very useful as a compact overview of all stdlibs.
The only kind of overview is the navigation pane. There, however, names do not match actual stdlib names and short descriptions are missing.
The text was updated successfully, but these errors were encountered: