Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YT-CPPAP-6: Clean the commit history #41

Merged
merged 32 commits into from
Mar 24, 2024
Merged

YT-CPPAP-6: Clean the commit history #41

merged 32 commits into from
Mar 24, 2024

Conversation

SpectraL519
Copy link
Owner

No description provided.

SpectraL519 and others added 30 commits March 23, 2024 16:50
- Initialized the argument parser header file
- Initialized the testing directory
- Added linux Makefile in the testing directory
- Added .gitignore
- Added .clang-format and formatting scripts
- Modified the argument_interface to use std::any as it's value type
- Added an argument_name class and modified the abstract name() function to return the name struct
- Modified the derived classes: positional_argument and optional_argument to use std::any and argument_name
- Aligned the UTs of the argument classes
Added doxygen setup instructions to the project readme and all necessary
files and directories for docs generating
Added:
- the valid_argument_type concept
- the add_argument() function to the parser class
- all the necessary members
- unit tests covering the added functionality
Added:
- argument type enforcing
- parse_args() function to the parser class
- has_value(argument_name) template function to the parser class
- value(argument_name) template function to the parser class
- unit tests covering the added functionality
- Replaced friend testing function declarations defined in the ap/argument_parser.hpp header file with test fixture classes friend declarations
- Modified the unit tests to use created text fixtures
- Deleted the `test/testing_friend_definitions.hpp` file
- Moved all test cases to a namespace ap_testing (test fixtures should be defined in this namespace)
Modified:
- the `argument_interface` class so that it does not have functions reserved for the optional arguments
- the `add_<type>_argument` functions to return references to concrete types

Added tests covering:
- exception throwing of the `argument_interface::value(const std::string&)` function
- the `optional_argument::has_value()` function when the default_value is set
- the `argument_interface::value()` function when the default_value is set
- Moved the implementation elements to more suitable namespaces
- Aligned tests to use correct namespaces
- Detecting flags refactor
- Added tokenizing the input argument
- Aligned uts
- Added the choices(vector<value_type>) function to the argument_interface and implement it in the concrete classes
- Added the necessary member variables to the concrete argument classes
- Modified the argument parsing functionality to account for the choices parameter
- Added unit tests covering the added functionality
- Added the `range` class in the `ap::nargs` namespace
- Added the `nargs` builder functions
- Added the `nargs(nargs::range)` function to the `optional_argument` class
- Modified the argument parsing functionality to account for the `nargs` parameter
- Added unit tests covering the added functionality
- Added action related structures and functions
- Added the `action(function)` function to both `positional_argument` and `optional_argument` classes
- Modified argument action processing in the string value parsing function
- Added the `bypass_required()` function to the `optional_argument` class.
- Modified argument parsing and tests to acount for the added functionality.
Added:
   - the `add_flag<bool>(name)` function to the parser
   - the `ap::defeault_argument` struct
   - the `default_{positional/optional}_arguments(vector<default_arg_specifier>)` functions to the argument parser
   - explicit enum class underlying types
   - tests covering the added functionality
Moved the `argument_name` class to the `ap::argument::detail` namespace
Added the `argument_parser::count(<argument-name>)` function
Added a few examples to showcase the parser's functionality
…:str()

-----------
-Co-authored-by: Jakub Musiał <111433005+SpectraL519@users.noreply.github.com>
Added doxygen comments to the existing code in the `include/ap/argument_parser.hpp` file.
------------
Co-authored-by: Jakub Musiał <111433005+SpectraL519@users.noreply.github.com>
- Switched entirely to CMake
- Updated README - added usage tutorial, compiler support and licence info, updated dev notes
- Small doc comments changes
- Added `g++`, `clang++` and `test` workflows
- Updated licence
@SpectraL519 SpectraL519 merged commit 4039e9b into master Mar 24, 2024
9 checks passed
SpectraL519 added a commit that referenced this pull request Mar 24, 2024
@SpectraL519 SpectraL519 deleted the yt-cppap-6 branch March 24, 2024 12:00
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants