Releases: seqan/sharg-parser
Sharg 1.2.0-rc.1
What's Changed
- [INFRA] Bump version by @eseiler in #205
- [DOC] Use doxygen-awesome by @eseiler in #206
- patch: using newest TDL by @SGSSGene in #211
- [INFRA] CMake: Remove unused dependencies by @eseiler in #212
- [INFRA] Add stdlibc++ CI by @eseiler in #213
- [INFRA] Optional tdl by @eseiler in #218
- [INFRA] Do not use TDL in header tests by @eseiler in #223
- [INFRA] Add codecov token by @eseiler in #227
- [MISC] Add quotes to strings by @eseiler in #224
- [MISC] SPDX license header by @eseiler in #229
- [INFRA] Update doxygen by @eseiler in #230
- [DOC] Fix version selector by @eseiler in #231
- [INFRA] Update TDL by @eseiler in #235
- [MISC] Use vector for arguments by @eseiler in #239
- [FIX] CWL: positional options by @eseiler in #237
- [MISC] Check that parse was not called by @eseiler in #240
- [INFRA] Update TDL by @eseiler in #241
- [TEST] Use a test fixture by @eseiler in #242
- [FIX] flags setting value to false by @eseiler in #243
- [MISC] Defer everything to parse() by @eseiler in #238
- [TEST] Add EXPECT_THROW_MSG by @eseiler in #245
- [FIX,DOC] Doxygen workaround by @eseiler in #248
- [MISC] Allow options for subcommands by @eseiler in #244
- [INFRA,TEST] API patches by @eseiler in #251
- [INFRA] Update TDL by @eseiler in #253
- [INFRA] Update TDL by @eseiler in #254
- [DOC] Update version selector by @eseiler in #255
- [MISC] Allow recursive subcommands by @eseiler in #233
- [INFRA] Update CI by @eseiler in #257
- [INFRA] Set default for SHARG_VERBOSE_TESTS to OFF by @eseiler in #259
- [FIX] Version check URL by @eseiler in #258
- [INFRA] Use CPM by @eseiler in #260
- [FIX] Do not find_package yourself by @eseiler in #262
- [INFRA] Bump CMake by @eseiler in #263
- [INFRA] Update config, use cpp23 by @eseiler in #266
- [INFRA] Add CodeChecker and CodeQL by @eseiler in #267
- [FIX] some codechecker reports by @eseiler in #268
- [FIX] More codechecker checks by @eseiler in #269
- [FIX] gcc15: Workaround bogus warning by @eseiler in #270
- [FIX] gcc15: Workaround bogus warning 2nd try by @eseiler in #271
- [INFRA] Update codechecker by @eseiler in #272
- [FIX] is_option_set: match both long and short ids by @eseiler in #226
- [FIX,TEST] API by @eseiler in #273
- [INFRA] Update CI by @eseiler in #277
- [MISC] Copyright, Link Check by @eseiler in #278
Full Changelog: 1.1.1...1.2.0-rc.1
Sharg 1.1.1
We are happy to release a new patch version of Sharg.
The release includes a few minor changes:
Bug fixes
- Fixed installation of Sharg via
make install(#202).
API changes
Compiler
- Dropped support for gcc-10 (#199).
- Added support for gcc-13 (#199).
- Added support for clang-17 (#197, #198).
Check out our API documentation or learn how to use Sharg with our Tutorials and How-Tos.
Sharg 1.1.1-rc.1
Sharg 1.1.0
We are happy to release a new minor version of Sharg.
The release includes a few minor fixes and adds support for Gitpod and CWL (via --export-help cwl).
For detailed information, see the Changelog.
Check out our API documentation or learn how to use Sharg with our Tutorials and How-Tos.
Sharg 1.0.0
We are thrilled to announce the first Sharg parser release: 1.0.0
With most of the API being stable!
We have outsourced the SeqAn3 Argument Parser to its own light-weight, dependency-free repository: The Sharg parser.
Most of the API stayed similar. We added a new, flexible config design for adding options and flags, improving readability and maintainability. Not unexpectedly, we have some changes in namespace and naming:
The former seqan3::argument_parser is now the sharg::parser
If you have any trouble porting your code from SeqAn3 to the Sharg parser, please don't hesitate to reach out to us on GitHub or !
- Get to know the Sharg parser with our tutorials.
- Visit our API documentation.
- Check out our Sharg Cookbook. It contains a listing of code examples on how to perform particular tasks using the library.
While we will present essential changes compared to the seqan3::argument_parser in this message, you can also find a comprehensive list of the changes in our changelog.
🎉 New Features
The new sharg::config design
An option flag or positional option is added with only two parameters:
- A value that stores the command line parameter (nothing changed here)
- A
sharg::configobject (NEW)
Before:
parser.add_option(val, 'i', "int", "some int");Now:
parser.add_option(val, sharg::config{.short_id = 'i',
.long_id = "int",
.description = "some int"});Although it is a little longer, it is easier to understand, more flexible and future-proof.
We take advantage of Designated initializers. 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
parser.add_option(val, sharg::config{.short_id = 'i', .required = true});Alter the default message
You can now alter the default message printed on the help page. E.g.
int i{};
parser.add_option(val, sharg::config{.short_id = 'i', .default_message = "Calculated from your data"});Instead of Default: 0., it prints
-i (signed 32 bit integer)
Default: Calculated from your data.
🛠️ Notable API changes
Name changes
If you are switching from the seqan3::argument_parser to the sharg::parser, there are several name changes. All of them can be fixed with a simple search & replace:
- The namespace of all entities is now
sharginstead ofseqan3 - Every occurrence of
argument_parserhas been replaced withparser - The concept
seqan::parser_compatible_optionhas been renamed tosharg::parsable
The new sharg::config design
The new config design is also an API break because we do not support the former calls from the seqan3::argument_parser.
We removed the sharg::option_spec as it is obsolete in the new API.
Validators
To avoid being dependent on the SeqAn3 I/O module, you now have to give a list of file extensions explicitly to sharg::input_file_validator and sharg::output_file_validator:
sharg::input_file_validator validator{std::vector<std::string>{{"exe"}, {"fasta"}}};Please follow the SeqAn3 issue to see how the file extensions can be extracted from SeqAn3 files.
🔌 Tooling
- Sharg 1.0.0 is known to compile with GCC 10.4, 11.3, and 12.2. Future versions might work, but were not yet available at the time of this release.
- Other compilers, e.g., clang, and MSVC, have not been tested yet with Sharg 1.0.0.
- We use doxygen 1.9.4 to build our documentation.