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

Re-add example run configurations #656

Merged
merged 21 commits into from
Jul 9, 2024

Conversation

garlic-os
Copy link
Contributor

@garlic-os garlic-os commented Jun 24, 2024

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 default raider.yaml. Further, that same raider.yaml is now called template.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:

  • One test for each example to ensure it and any associated data files are properly produced
  • Tests to ensure that RAiDER stops to confirm before overwriting any files

Screenshots (if appropriate):

image

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have added an explanation of what your changes do and why you'd like us to include them.
  • I have written new tests for your core changes, as applicable.
  • I have successfully ran tests with your changes locally.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

garlic-os added 13 commits June 24, 2024 12:56
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
@garlic-os garlic-os marked this pull request as ready for review June 25, 2024 22:02
Copy link
Collaborator

@jlmaurer jlmaurer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jlmaurer jlmaurer merged commit e4131dc into dbekaert:dev Jul 9, 2024
8 checks passed
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.

2 participants