-
Notifications
You must be signed in to change notification settings - Fork 1
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
Refactor simulation tools configuration #989
Conversation
simtools/applications/simulate_light_emission.py ing
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
help="Run number (actual run number will be 'start_run' + 'run')", | ||
type=int, | ||
required=True, | ||
) | ||
config.parser.add_argument( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the removed arguments still appear in the docstring above. Why did you remove the config.parser.add_argument
s?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, they are moved to the command_line module, as we use this type of parameters for several applications. So the docstring is still fine (as e.g., you want to configure simulate_prod with azimuth or number of runs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the docstring the parameters are under command_line_parameters. Maybe you can make clear that the values come from the config file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is correct, they are command line parameters:
- any argument defined through Configurator can be set on the command line, by environmental variable or using the
--config
option and given them all in a configuration file.
This allows us to have let the user decide to configure tools with super long command lines or using a configuration tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say they are converted into command line parameters if they are passed via a configuration file? Maybe you can add this sentence at the beginning somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been changed, as discussed in the chat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @GernotMaier , see few comments.
This comment has been minimized.
This comment has been minimized.
@tobiaskleiner - thanks a lot for the review. I am waiting for one clarification from your side (on the run numbers / divergent pointing issue). Let me know if there is anything else. |
This comment has been minimized.
This comment has been minimized.
Analysis Details0 IssuesCoverage and DuplicationsProject ID: gammasim_simtools_AY_ssha9WiFxsX-2oy_w |
Thanks again @tobiaskleiner . Let me know if there is anything else. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good now. Thanks again @GernotMaier.
Simplifies the configuration of simulation tools.
This is a major refactoring PR touching almost all modules relevant for simulation configuration and production. This addresses especially
simulate_prod
.Main changes are:
runner_services
to collect common functionalitysimulate_showers_for_trigger_rates
- this is a duplication ofsimulate_prod
._check_run_result(self, **kwargs)
bydef _check_run_result(self, run_number=None):
- this makes it much clearerCloses #982
Closes #792 (configuration is now completely different and this does not apply anymore)
Closes #911 (configuration files are now handled through the command line and argparser; no metaschema required)