Show the pyse inputs, similar to -h#192
Conversation
|
|
||
| # Finally, as positional arguments, the file list: | ||
| parser.add_argument("files", nargs="+", help="Image files for processing") | ||
| parser.add_argument("files", nargs="*", help="Image files for processing") |
There was a problem hiding this comment.
Ik heb dit aangepast zodat ik ook --show-input aan kan roepen zonder een file mee te geven. De nargs="+" zorgde ervoor dat er een error werd gegooid als er geen file werd meegegeven. Dit doe ik nu zelf verderop in de code als de logia voor --show-input voorbij is en het tijd is voor echte processing doe ik zelf een check dat er in elk geval een file is meegegeven
|
It is great to have some check on which parameter values are actually used. I guess that the appropriate level to do this is when image.Imagedata is being called, since a typical PySE run from an IPython shell would be something like this: E.g. the beam parameters - beam=(1,2,3) - can be modified by the user at the level of FitsImage so you probably want to check which values are being processed at the level of |
|
But I guess this particular example does not apply to command-line usage. |
| fixed_coords = parse_monitoringlist_positions( | ||
| conf.image, str_name="fixed_posns", list_name="fixed_posns_file" | ||
| ) | ||
|
|
There was a problem hiding this comment.
This is the implementation of the new feature and almost all of the rest is reformatting from Black?
There was a problem hiding this comment.
Mostly, though there is the added argument to the parser around line 126
|
Would |
|
I would argue that |
The idea of this MR is to make it clear to the user what arguments are being used.
We add a new cli argument called --show-input that will print the configuration contents after it has been updated with the contents of the config file and the command line arguments.
For me this now looks like so: