It would be helpful if we could have traits subtype some type we define, rather than Any. This allows us to filter traits by supertype when generating documentation.
For example, say I want to make an Animal interface, and then I have Fish and Bird traits as well each with their own interface that is independent of Animal. I add a docstring to each of these Animal, Fish, Bird traits to document the interface they must satisfy.
Now I want to make a Habitat interface, and within that I have Water and Tree traits which each include their own interfaces. Again, I document the interface in the trait itself.
I would like to generate a Documenter.jl page which includes all of the Animal interfaces, and another page which includes all of the Habitat interfaces with @autodocs. Currently, we can do this by manually including the docstrings for each trait or restricting trait implementations to particular files, but it would be helpful if I could filter the trait types according to the Julia type hierarchy to generate my interface documentation.
In the end, I'd like to generate an Animals interface page via
@autodocs
Module = [Foo]
Filter = t -> typeof(t) === DataType && t <: Foo.AbstractAnimal
where AbstractAnimal <: Any is an abstract type I create to make sure that {Animal, Fish, Bird} <: Abstract Animal are all independent types in the type tree
It would be helpful if we could have traits subtype some type we define, rather than
Any
. This allows us to filter traits by supertype when generating documentation.For example, say I want to make an
Animal
interface, and then I haveFish
andBird
traits as well each with their own interface that is independent ofAnimal
. I add a docstring to each of theseAnimal, Fish, Bird
traits to document the interface they must satisfy.Now I want to make a
Habitat
interface, and within that I haveWater
andTree
traits which each include their own interfaces. Again, I document the interface in the trait itself.I would like to generate a
Documenter.jl
page which includes all of theAnimal
interfaces, and another page which includes all of theHabitat
interfaces with@autodocs
. Currently, we can do this by manually including the docstrings for each trait or restricting trait implementations to particular files, but it would be helpful if I could filter the trait types according to the Julia type hierarchy to generate my interface documentation.In the end, I'd like to generate an
Animals
interface page viawhere
AbstractAnimal <: Any
is an abstract type I create to make sure that{Animal, Fish, Bird} <: Abstract Animal
are all independent types in the type treeRelevant link to the
Documenter.jl
docs