DocStringExtensions.jl
DocStringExtensions.jl copied to clipboard
Extensions for Julia's docsystem.
I am often finding myself in the situation where I dewsign an interface, and the algorithm-deciding arugments of the interface are all subtypes of a main abstract type. Like ```...
Is it possible to get FUNCTIONNAME to work inside a function that generates the docstring? Something similar to ``` function gen_docstring() """ $(FUNCTIONNAME)(x) """ end @doc gen_docstring() function f(x) x...
Currently I have a module set up like this ```jl module abcFunctionsModule using DocStringExtensions DocStringExtensions.@template TYPES = """ $(TYPEDEF) # Descriptions $(DOCSTRING) """ DocStringExtensions.@template (FUNCTIONS) = """ $(METHODLIST) # Description...
I was trying to better understand what the `@template` macro does, and ran into some internal errors when I was trying out some (admittedly, perhaps silly) cases. I don't think...
I wonder if it would it make sense to allow ```julia """ $(SIGNATURES) """ Base.@kwdef struct Foo a b end ``` document the constructors of `Foo`. This would be especially...
For example, `DocStringExtensions` produces the signature ``` julia iterate(ivp; solver, opts...) ``` for the following function definition ``` function iterate{S
It may be useful to add a `SUBTYPES` abbreviation that expands to something like ```julia subtypes: [`SubType1`](@ref), [`SubType2`](@ref), ... ```
```julia julia> using DocStringExtensions julia> """ $(SIGNATURES) This function destructures! """ function f((x, y)) x + y end f julia> @doc f f(#temp#) This function destructures! julia> VERSION v"1.0.1-pre.0" ```...
Consider the following documentation for a function `f1` in a module `CGP` ```julia """ $(TYPEDSIGNATURES) """ function f1(a::Int, b::Int=0) return a + b end ``` The generated documentation is ...
Consider the following two functions in module `CGP`. ```julia """ $(TYPEDSIGNATURES) """ function fun1(x::AbstractVector{