-
Notifications
You must be signed in to change notification settings - Fork 40
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
Re-add example run configurations #656
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This files are more aptly named run configuration files; only some run configs are templates.
- The default raider.yaml is meant as a blank template to make other run configurations from, so I renamed it to "template". - This file is now part of a larger set of files that can be summoned to your working directory with `raider.py --generate_config <filename>`, so I moved it to the new examples/ folder with the rest of those files.
To organize better for accompanying data files
- --generate_config now takes an argument: the name of one example run configuration of the now four that exist - argparse logic fixed to make --generate_config mutually exclusive with passing in a run config file; i.e., you can't both generate a config and execute RAiDER with a config file at once - --generate_config now confirms before overwriting files - Logic added to allow for example run configs to have data files, like two of the three raiderDelay.py example commands did. These data files will be copied to the current directory next to the run config file itself
Takes advantage of pytest's parametrize decorator to condense these multiple redundant tests into one run several times with different data.
jlmaurer
approved these changes
Jul 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This change adds example commands back to the CLI, something that was missing since the switch to the new YAML format. Now, each one's name is listed in
raider.py -h
, and can be generated/copied to your working directory just like the defaultraider.yaml
. Further, that sameraider.yaml
is now calledtemplate.yaml
to fit its new context among these example configurations that are based off of it.Motivation and Context
When RAiDER's CLI configuration was changed from arguments to YAML files, it lost the portion of the help blurb that gives example commands. I personally found them useful when familiarizing myself with RAiDER, so I was sad to see them go. As part of my recent work updating dbekaert/RAiDER-docs, I found myself needing to update those examples to the new format anyway, so since I already have them, integrating them back into the main repo was just the next logical step.
How Has This Been Tested?
Tests were added in a new file
test_generate_config.py
:Screenshots (if appropriate):
Type of change
Checklist: