Sharg 1.1.2-rc.1
The argument parser for bio-c++ tools.
|
This changelog contains a top-level entry for each release with sections on new features, API changes and notable bug-fixes (not all bug-fixes will be listed).
See the Sharg documentation on API stability to learn about when API changes are allowed in the Sharg-parser.
-DSHARG_NO_TDL=ON
) (#218).make install
(#202).--export-help cwl
(#94).git push
, typing git puhs -h
will raise an exception that the user misspelled the subcommand instead of printing the help page of git
(#172).sharg::output_file_validator
to delete the directory's contents (#175).sharg::value_list_validator
in conjuction with a std::filesystem::path
option (#179).We are happy to release the first version of the SeqAn Sharg parser!
The Sharg parser succeeds the former seqan3::argument_parser
with a few new features in a light-weight repository. Most notably, we switched to Designated initializers for configuring (positional) options and flags when adding them to the parser. See API changes
for more details.
From this release on, most of the API is now stable. Stable entities are marked as such in our online documentation.
Besides the new sharg::config
API using designated initializers, which is described in API changes
, you can now alter the default message printed on the help page. E.g.
prints
instead of Default: 0.
. See our online documentation for more details.
If you are switching form the seqan3::argument_parser
to the sharg::parser
there are several name changes. All of them can be fixed with a simple search & replace:
sharg
instead of seqan3
argument_parser
has been replaced with parser
seqan::parser_compatible_option
has been renamed to sharg::parsable
!Important! New API of add_option()/add_flag()/add_positional_option()
calls that is more descriptive and flexible. An option flag or positional option is added with only two parameters: (1) Its value that stores the command line parameter (nothing changed here) (2) A sharg::config
object (NEW)
Before:
Now:
We take advantage of Designated initializers that make the call much more descriptive and flexible. E.g., you can leave out parameters you don't need, but beware that the order must be as specified in sharg::config
.
You can now set an option as required without the need of the sharg::option_spec
!Important! We removed the sharg::option_spec
as it is obsolete in the new API.
sharg::istreamable
(stream >> option
) but must also model sharg::ostreamable
in order to be used in parser.add_option()
calls. All standard types as well as types that overload sharg::named_enumeration
are not affected.sharg::input_file_validator
and sharg::output_file_validator
: For example sharg::input_file_validator validator{std::vector<std::string>{{"exe"}, {"fasta"}}};
. Please follow https://github.com/seqan/seqan3/issues/2927 to see how the list of file extensions can be extracted from seqan3 files. We also removed the default_extensions()
function, as we now can construct output_file_validator
with just a given mode: output_file_validator(output_file_open_options const mode)
. The extensions will be an empty array in this case.