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

Added error message for missing input files #8

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

Zehvogel
Copy link
Collaborator

@Zehvogel Zehvogel commented Oct 18, 2023

BEGINRELEASENOTES

  • Added error message for missing input files

ENDRELEASENOTES

(and minimal .gitignore)

resolves #5

@Zehvogel
Copy link
Collaborator Author

I would wait for #6 and then rebase

@andresailer
Copy link
Collaborator

Add required to the inputFiles argument?

@Zehvogel
Copy link
Collaborator Author

and stop supporting setting the input files directly in the steering file? I wanted to keep that option but I am open to be convinced. However, I have the feeling that this would kill k4run --help file.py.

@andresailer
Copy link
Collaborator

andresailer commented Oct 19, 2023

inputFiles = []
parser.add_argument("--inputFiles", action="extend", nargs="+", metavar=("file1", "file2"), help="One or multiple input files", required=True, default=inputFiles)

This way one can still set input files in the steering file. But I don't know about the --help then.

PS: or does that defeat the required ?
PPS: yes it would https://stackoverflow.com/a/33125971

@Zehvogel
Copy link
Collaborator Author

I wil adapt this to use extend as it is cleaner than the current state. I can try with required but I guess it will immediately quit after the parse_args() call in the steering file and never reach the second call in k4run...

@Zehvogel Zehvogel force-pushed the empty-input branch 2 times, most recently from bd99052 to 391f093 Compare October 23, 2023 11:43
@Zehvogel
Copy link
Collaborator Author

on second look I will keep this as it is now and not do more refactoring

@andresailer andresailer enabled auto-merge (rebase) October 24, 2023 12:19
@andresailer andresailer merged commit 695924b into key4hep:main Oct 24, 2023
2 of 3 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.

Trying to set an edm4hep input file with --EventDataSvc.input fails
2 participants