Julia: Documenting all exports from the standard libraries

Created on 28 Feb 2019  Â·  4Comments  Â·  Source: JuliaLang/julia

Adding docstrings to all exports from Base has been a great success (#26919)! We are about 80% done there (and I just moved the goalposts — we had been close to 95% prior to that). That's awesome — thanks everyone who participated. Now let's move on to the standard libraries!

searchdocs(mod) = searchdocs!(Any[], mod)
function searchdocs!(objs, mod, seen=Set())
    mod in seen && return
    push!(seen, mod)
    for name in names(mod)
        isdefined(mod, name) || continue
        Base.isdeprecated(mod, name) && continue
        b = getfield(mod, name)
        docs = Base.Docs.doc(Base.Docs.Binding(mod, name))
        if startswith(string(docs), "No documentation found")
            push!(objs, string(mod, '.', name))
        end
        b isa Module && searchdocs!(objs, b, seen)
    end
    objs
end
ms = []
for M in [filter(f->f[1] in 'A':'Z' && !occursin(r"[-.]", f) && f != "Makefile", readdir("stdlib")); "Pkg"]
    @eval import $(Symbol(M))
    @eval append!(ms, searchdocs($(Symbol(M))))
end
foreach(x->println("* [ ] `", x, '`'), ms)
  • [x] Base64.Base64 (#31332)
  • [x] Dates.Apr (#31218)
  • [x] Dates.April (#31218)
  • [x] Dates.Aug (#31218)
  • [x] Dates.August (#31218)
  • [ ] Dates.DatePeriod
  • [x] Dates.Dec (#31218)
  • [x] Dates.December (#31218)
  • [x] Dates.Feb (#31218)
  • [x] Dates.February (#31218)
  • [x] Dates.Fri (#31574)
  • [x] Dates.Friday (#31574)
  • [ ] Dates.ISODateFormat
  • [ ] Dates.ISODateTimeFormat
  • [ ] Dates.ISOTimeFormat
  • [x] Dates.Jan
  • [x] Dates.January
  • [x] Dates.Jul (#31218)
  • [x] Dates.July (#31218)
  • [x] Dates.Jun (#31218)
  • [x] Dates.June (#31218)
  • [x] Dates.Mar (#31218)
  • [x] Dates.March (#31218)
  • [x] Dates.May (#31218)
  • [x] Dates.Mon (#31574)
  • [x] Dates.Monday (#31574)
  • [x] Dates.Nov (#31218)
  • [x] Dates.November (#31218)
  • [x] Dates.Oct (#31218)
  • [x] Dates.October (#31218)
  • [ ] Dates.RFC1123Format
  • [x] Dates.Sat (#31574)
  • [x] Dates.Saturday (#31574)
  • [x] Dates.Sep (#31218)
  • [x] Dates.September (#31218)
  • [x] Dates.Sun (#31574)
  • [x] Dates.Sunday (#31574)
  • [x] Dates.Thu (#31574)
  • [x] Dates.Thursday (#31574)
  • [ ] Dates.TimePeriod
  • [ ] Dates.TimeZone
  • [x] Dates.Tue (#31574)
  • [x] Dates.Tuesday (#31574)
  • [ ] Dates.UTC
  • [x] Dates.Wed (#31574)
  • [x] Dates.Wednesday (#31574)
  • [ ] Dates.adjust
  • [x] Distributed.AbstractWorkerPool (#31544)
  • [x] Distributed.ClusterManager (#31234)
  • [x] Distributed.WorkerConfig (#31234)
  • [ ] Distributed.check_same_host
  • [ ] FileWatching.FDWatcher
  • [ ] FileWatching.FileMonitor
  • [ ] FileWatching.FolderMonitor
  • [ ] FileWatching.PollingFileWatcher
  • [ ] InteractiveUtils.InteractiveUtils
  • [x] Libdl.dllist
  • [x] Libdl.dlpath
  • [x] LinearAlgebra.Adjoint (#31274)
  • [x] LinearAlgebra.BLAS.hemm (#33801)
  • [x] LinearAlgebra.BLAS.hemm! (#33801)
  • [x] LinearAlgebra.BLAS.hemv (#33801)
  • [x] LinearAlgebra.BLAS.hemv! (#33801)
  • [x] LinearAlgebra.BLAS.her2k (#33801)
  • [x] LinearAlgebra.BLAS.her2k! (#33801)
  • [x] LinearAlgebra.BLAS.iamax (#31277)
  • [x] LinearAlgebra.BLAS.syr2k (#33801)
  • [x] LinearAlgebra.BLAS.syr2k! (#33801)
  • [x] LinearAlgebra.BunchKaufman (#31284)
  • [x] LinearAlgebra.Cholesky (#31284)
  • [x] LinearAlgebra.CholeskyPivoted (#31284)
  • [x] LinearAlgebra.Eigen (#31284)
  • [x] LinearAlgebra.Factorization (#31284)
  • [x] LinearAlgebra.GeneralizedEigen (#31284)
  • [x] LinearAlgebra.GeneralizedSVD (#31284)
  • [x] LinearAlgebra.GeneralizedSchur (#31284)
  • [x] LinearAlgebra.Hessenberg (#31284)
  • [ ] LinearAlgebra.LAPACKException
  • [x] LinearAlgebra.LDLt (#31284)
  • [x] LinearAlgebra.LQ (#31284)
  • [x] LinearAlgebra.LU (#31284)
  • [x] LinearAlgebra.PosDefException (#31251)
  • [ ] LinearAlgebra.RankDeficientException
  • [x] LinearAlgebra.SVD (#31284)
  • [x] LinearAlgebra.Schur (#31284)
  • [x] LinearAlgebra.SingularException (#31251)
  • [x] LinearAlgebra.Transpose (#31274)
  • [x] LinearAlgebra.UnitLowerTriangular(#31247)
  • [x] LinearAlgebra.UnitUpperTriangular (#31247)
  • [ ] LinearAlgebra.copy_transpose!
  • [x] Logging.Logging (#31228)
  • [ ] Markdown.@doc_str
  • [ ] Markdown.@md_str
  • [ ] Markdown.html
  • [ ] Markdown.latex
  • [ ] Printf.Printf
  • [ ] REPL.AbstractREPL
  • [ ] REPL.BasicREPL
  • [ ] REPL.LineEditREPL
  • [ ] REPL.REPL
  • [ ] REPL.StreamREPL
  • [x] Random.AbstractRNG (#31269)
  • [x] Random.Random(#31269)
  • [ ] SHA.HMAC_CTX
  • [ ] SHA.SHA
  • [ ] SHA.SHA1_CTX
  • [ ] SHA.SHA224_CTX
  • [ ] SHA.SHA256_CTX
  • [ ] SHA.SHA2_224_CTX
  • [ ] SHA.SHA2_256_CTX
  • [ ] SHA.SHA2_384_CTX
  • [ ] SHA.SHA2_512_CTX
  • [ ] SHA.SHA384_CTX
  • [ ] SHA.SHA3_224_CTX
  • [ ] SHA.SHA3_256_CTX
  • [ ] SHA.SHA3_384_CTX
  • [ ] SHA.SHA3_512_CTX
  • [ ] SHA.SHA512_CTX
  • [ ] SHA.digest!
  • [ ] SHA.hmac_sha1
  • [ ] SHA.hmac_sha224
  • [ ] SHA.hmac_sha256
  • [ ] SHA.hmac_sha2_224
  • [ ] SHA.hmac_sha2_256
  • [ ] SHA.hmac_sha2_384
  • [ ] SHA.hmac_sha2_512
  • [ ] SHA.hmac_sha384
  • [ ] SHA.hmac_sha3_224
  • [ ] SHA.hmac_sha3_256
  • [ ] SHA.hmac_sha3_384
  • [ ] SHA.hmac_sha3_512
  • [ ] SHA.hmac_sha512
  • [ ] SHA.sha1
  • [ ] SHA.sha224
  • [ ] SHA.sha256
  • [ ] SHA.sha2_224
  • [ ] SHA.sha2_256
  • [ ] SHA.sha2_384
  • [ ] SHA.sha2_512
  • [ ] SHA.sha384
  • [ ] SHA.sha3_224
  • [ ] SHA.sha3_256
  • [ ] SHA.sha3_384
  • [ ] SHA.sha3_512
  • [ ] SHA.sha512
  • [ ] SHA.update!
  • [ ] Serialization.AbstractSerializer
  • [ ] Serialization.Serializer
  • [x] SharedArrays.SharedMatrix (#31263)
  • [x] SharedArrays.SharedVector (#31263)
  • [x] Sockets.@ip_str (#31225)
  • [x] Sockets.IPAddr (#31225)
  • [x] Sockets.Sockets (#31225)
  • [x] SparseArrays.AbstractSparseArray (#31286)
  • [x] SparseArrays.AbstractSparseMatrix (#31286)
  • [x] SparseArrays.AbstractSparseVector (#31286)
  • [x] SparseArrays.droptol! (#31286)
  • [ ] SuiteSparse.SuiteSparse
  • [x] UUIDs.UUIDs (#33791)
  • [ ] Unicode.Unicode
  • [ ] Pkg.@pkg_str
  • [ ] Pkg.PKGMODE_MANIFEST
  • [ ] Pkg.PKGMODE_PROJECT
  • [ ] Pkg.Pkg
  • [ ] Pkg.Registry
  • [ ] Pkg.Registry.Registry
  • [ ] Pkg.UPLEVEL_MAJOR
  • [ ] Pkg.UPLEVEL_MINOR
  • [ ] Pkg.UPLEVEL_PATCH
doc good first issue help wanted stdlib

Most helpful comment

@mbauman or @kshyatt, could you please mark those commands which are covered by PRs? It should be the twelve month constants and there abbreviations (#31218), the four SparseArrays.XYZ (#31286), and all factorization docstrings (#31284). Just to avoid redundant work as has happened already. Many thanks!

All 4 comments

@mbauman or @kshyatt, could you please mark those commands which are covered by PRs? It should be the twelve month constants and there abbreviations (#31218), the four SparseArrays.XYZ (#31286), and all factorization docstrings (#31284). Just to avoid redundant work as has happened already. Many thanks!

Shouldn't the Markdown types also be documented, since they have constructors?

This list is only enumerating the exported names — those are the official public (and stable) APIs and are the biggest priorities.

Shouldn't the Markdown types also be documented, since they have constructors?

It is also very questionable if the Markdown stuff is considered public. And if not, I don't think we want to make it public by documenting it + putting it in the manual. It doesn't feel up to snuff in terms of robustness and quality that we want.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sbromberger picture sbromberger  Â·  3Comments

StefanKarpinski picture StefanKarpinski  Â·  3Comments

ararslan picture ararslan  Â·  3Comments

felixrehren picture felixrehren  Â·  3Comments

musm picture musm  Â·  3Comments