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

Make use of --overwrite / -f in tools consistent #2111

Closed
nbiederbeck opened this issue Nov 2, 2022 · 4 comments · Fixed by #2213
Closed

Make use of --overwrite / -f in tools consistent #2111

nbiederbeck opened this issue Nov 2, 2022 · 4 comments · Fixed by #2213

Comments

@nbiederbeck
Copy link
Contributor

nbiederbeck commented Nov 2, 2022

we have -f as "force" in the other tools (including ml tools). But I think we can adress the --overwrite/-f in another PR to make everything consistent (and maybe inside Tool?)

Originally posted by @nbiederbeck in #1767 (comment)

@nbiederbeck
Copy link
Contributor Author

Additionally, if we could check the output_path.exists() and not self.overwrite for each output file during initialization, that would speed things up. Currently, that check is done during Tool.finish() when calling Component.write().

@kosack
Copy link
Contributor

kosack commented Nov 3, 2022

Sounds good. Should definitely change everything to --overwrite. I dislike --force, since it is not clear what is being forced. Astropy and gammapy also use --overwrite for everything. I don't think there has to be a short name for this, and would even discourage adding one, so no -f or -o, etc.

@nbiederbeck
Copy link
Contributor Author

What's your opinion on multiple output files?

I assume one --overwrite is enough to overwrite all output files.

@kosack
Copy link
Contributor

kosack commented Nov 3, 2022

Yes, I think so, otherwise it gets quite confusing to have separate options for each.

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 a pull request may close this issue.

2 participants