Skip to content

Missing docstrings, some of which shouldn't be? #317

@leburgel

Description

@leburgel

I was looking at the CI log of a documentation build, and noticed a warning indicating that quite a few docstrings actually aren't included in the docs:

┌ Warning: 35 docstrings not included in the manual:
│ 
│     TensorKit.unitary!
│     TensorKitSectors.NoBraiding
│     TensorKitSectors.findindex :: Union{Tuple{I}, Tuple{SectorValues{I}, I}} where I<:Sector
│     TensorKit.insertplanarbackend :: Tuple{Any, Any}
│     TensorKit.isomorphism!
│     TensorKitSectors.Bosonic
│     TensorKit.isometry!
│     TensorKit.subblocktype
│     TensorKitSectors.GenericUnit
│     TensorKit.randisometry! :: Tuple{Type, HomSpace}
│     TensorKit.insertplanarallocator :: Tuple{Any, Any}
│     TensorKitSectors.SimpleFusion
│     Base.setindex! :: Union{Tuple{I}, Tuple{AbstractTensorMap, Any, Tuple{I, Vararg{I}}}} where I<:Sector
│     TensorKit.project_symmetric! :: Tuple{TensorMap, DenseArray}
│     TensorKit.BlockIterator
│     TensorKit.Factorizations.TruncationSpace
│     TensorKitSectors.SimpleUnit
│     TensorKit.foreachblock :: Tuple{Any, AbstractTensorMap, Vararg{AbstractTensorMap}}
│     TensorKit.repartition :: Union{Tuple{AbstractTensorMap, Int64}, Tuple{AbstractTensorMap, Int64, Int64}}
│     Base.transpose :: Union{Tuple{AbstractTensorMap}, Tuple{AbstractTensorMap, Tuple{NTuple{N₁, Int64}, NTuple{N₂, Int64}} where {N₁, N₂}}}
│     TensorKit.randisometry :: Tuple{Type, HomSpace}
│     TensorKit.randisometry :: Tuple{Tuple{Int64, Int64}}
│     TensorKitSectors.Fermionic
│     TensorKit.absorb :: Tuple{AbstractTensorMap, AbstractTensorMap}
│     TensorKitSectors.GenericFusion
│     TensorKit.TreeTransformer
│     TensorKitSectors.UniqueFusion
│     TensorKit.with_blockscheduler :: Union{Tuple{Any}, Tuple{Any, Any}}
│     TensorKit._interleave :: Tuple{Tuple{}, Tuple{}}
│     TensorKit.fusiontrees :: Tuple{HomSpace}
│     TensorKit.id!
│     TensorKitSectors.LargeZNIrrep
│     TensorKit.blockscheduler
│     TensorKitSectors.Anyonic
│     TensorKit.SubblockIterator

Some of these are probably very internal so they were intentionally left out, but there's a few that I was quite surprised about (like repartition, transpose, absorb, ...).

I guess this is a symptom of the larger issue that the library docs are currently really written very 'manually', where all docstrings are included explicitly in a deliberate order. This is nice for the clarity of the library docs which look a lot nicer than something that's automatically generated, but this also means that every time a method is added the docstring needs to be manually added. Otherwise these methods don't show up in the index and can't be found by searching, which is very inconvenient for exported methods?

Would it be worth it to have some auto-generated library docs to make sure everything is in the index, or would the loss in structure not be worth it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions