MadNLP.jl icon indicating copy to clipboard operation
MadNLP.jl copied to clipboard

using DocStringExtensins for documenting options

Open sshin23 opened this issue 4 years ago • 0 comments

With DocStringExtensions, we can generate docstring for the Type's fields with the following syntax:

"""
This is an X
"""
struct X
    "This is a"
    a::String
    "This is b"
    b::Char
    "This is c"
    c
end

One shortcoming is that DocStringExtensions should be added to the dependency (not to the /doc/Project.toml, but to the main /Project.toml). But DocStringExtensions seems to be reasonably lightweight. See the discussion below: https://discourse.julialang.org/t/documenting-elements-of-a-struct/64769

It seems to me that this might be the proper way to manage the long option documentation (which is generated manually for now). Let me know if there are any other alternatives

sshin23 avatar Sep 15 '21 15:09 sshin23