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

Consistent overwrite #2213

Merged
merged 18 commits into from
Jan 24, 2023
Merged

Consistent overwrite #2213

merged 18 commits into from
Jan 24, 2023

Conversation

LukasNickel
Copy link
Member

  • Remove all -f aliases
  • Check for conflict on setup
  • rename infile/outfile to input_path/output_path
  • Use ToolConfigurationError everywhere

I guess that would be an API change since we remove a flag from some tools?

@maxnoe maxnoe added this to the v0.18.0 milestone Jan 13, 2023
Copy link
Member

@maxnoe maxnoe left a comment

Choose a reason for hiding this comment

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

Now this could be a function ...

nbiederbeck
nbiederbeck previously approved these changes Jan 13, 2023
@nbiederbeck nbiederbeck linked an issue Jan 19, 2023 that may be closed by this pull request
- Remove all -f aliases
- Check for conflict on setup
- rename infile/outfile to input_path/output_path
- Make `overwrite` a flag on `Tool`
- Check that output files do not exist or overwrite is turned on
ctapipe/core/tool.py Outdated Show resolved Hide resolved
- Use check_output in dump_trigger aswell
- Dont require a list of files
- Skip None files, removing the check from the train* tools
maxnoe
maxnoe previously approved these changes Jan 20, 2023
ctapipe/tools/process.py Show resolved Hide resolved
docs/changes/2213.api.rst Outdated Show resolved Hide resolved
- Tools now only have --overwrite
docs/changes/2213.api.rst Outdated Show resolved Hide resolved
nbiederbeck
nbiederbeck previously approved these changes Jan 23, 2023
- Since Tool now has overwrite, we can use that directly in the tools.
- It is only defined explicitly if the default behaviour has to be
  overwritten
@nbiederbeck
Copy link
Contributor

With the newest changes I think we would benefit from a test, checking that overwriting works explicitly.

kosack
kosack previously approved these changes Jan 24, 2023
ctapipe/core/tool.py Outdated Show resolved Hide resolved
@@ -98,18 +97,7 @@ def setup(self):
self.cross_validate = CrossValidator(
parent=self, model_component=self.regressor
)
self.rng = np.random.default_rng(self.random_seed)
Copy link
Member

Choose a reason for hiding this comment

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

This line should have stayed, review missed it and no tests for n_events

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make use of --overwrite / -f in tools consistent
4 participants