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

Modernize and clean up k4run #242

Merged
merged 4 commits into from
Sep 30, 2024
Merged

Modernize and clean up k4run #242

merged 4 commits into from
Sep 30, 2024

Conversation

jmcarcell
Copy link
Member

@jmcarcell jmcarcell commented Sep 27, 2024

Fixes #241 and does a much needed clean up of the script.

BEGINRELEASENOTES

  • Add a docstring for the function that adds the arguments
  • Remove dead code, obvious comments and global variables
  • Use f-strings
  • Fix arguments when a property is a std::vector. Related to this fix now k4run will also display properties for which the default value is an empty list, previously these were not displayed.
  • Improve formatting of the message with all the values of all the properties

ENDRELEASENOTES

Now the messages at startup with all the options are cleaner. Before:

[k4run] Option name: Transformer.OutputLevel Transformer.OutputLevel 0
[k4run] Option name: Transformer.Asynchronous Transformer.Asynchronous False
[k4run] Option name: Transformer.InputCollection Transformer.InputCollection ['MCParticles']
[k4run] Option name: Transformer.OutputCollection Transformer.OutputCollection ['NewMCParticles']
[k4run] Option name: Transformer.Offset Transformer.Offset 10

after:

[k4run] Option name: Transformer.OutputLevel 0
[k4run] Option name: Transformer.Asynchronous False
[k4run] Option name: Transformer.InputCollection ['MCParticles']
[k4run] Option name: Transformer.OutputCollection ['NewMCParticles']
[k4run] Option name: Transformer.Offset 10

k4FWCore/scripts/k4run Outdated Show resolved Hide resolved
k4FWCore/scripts/k4run Outdated Show resolved Hide resolved
- Add a docstring for the function that adds the arguments
- Remove dead code, obvious comments and global variables
- Use f-strings
- Fix arguments when a property is a std::vector
- Improve formatting of the message with all the values of all the properties
@jmcarcell
Copy link
Member Author

If there aren't any other comments or complains I'll merge this soon since I want this fix to be included in the next tag that is coming soon.

@jmcarcell jmcarcell merged commit ac29f06 into main Sep 30, 2024
4 of 9 checks passed
@jmcarcell jmcarcell deleted the k4run branch September 30, 2024 11:26
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.

IOSvc.Input property can't be set from CLI
2 participants