Describe the bug
For functions that more than one option, the ordering of the documentation is random. Supposedly, that happens because the data in CASTED_COMMANDS is stored as a Dictionary, which does not preserve the doc order.
Version of the package:
1.0.0
To Reproduce
- Create a module with the following code:
module M1
using Comonicon
"""
Run cell segmentation
# Options
- `-x`: Name of x column. Overrides the config value.
- `-y`: Name of y column. Overrides the config value.
- `-z`: Name of z column. Overrides the config value.
- `-g`: Name of gene column. Overrides the config value.
"""
@main function main(;x::String, y::String, z::String, g::String)
print("Hello, world")
end
end
- Run
import M1; M1.command_main()
Expected behavior
The arguments should follow the order they were defined in.
Screenshots
Current results:

Potential fix
If I understand right, the problem is in read_options. Replacing Dict with OrderedDict from OrderedCollections should help.