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

Unified commandline behavior for all entry points #255

Open
jhaux opened this issue Feb 27, 2020 · 0 comments
Open

Unified commandline behavior for all entry points #255

jhaux opened this issue Feb 27, 2020 · 0 comments
Assignees

Comments

@jhaux
Copy link
Collaborator

jhaux commented Feb 27, 2020

Is your feature request related to a problem? Please describe.
As described in #231 it would be nice to be able to have a unified way of dealing with input parameters and how we put them in a config file.

Describe the solution you'd like
I propose to simply take the code we are already using in edflow and create a function that processes all command line parameters and creates a config dict out of it, which is then passed on.
One could also consider putting all config related operations in the above described function, like stacking of all base configs.

The ideal solution would be that for every new and existing entry point like edflow or edexplore we simply need the following lines of code:

if __name__ == '__main__':
    config = process_inputs()
    main(config)

This would make the config the only central object that is passed around (not the argparse args as second object) and make things better documented as all relevant parameters including -t etc would be logged in the config, making it possible to exactly rerun the command.

Describe alternatives you've considered
The status quo is working but has loads of duplicate lines and inconsistencies.

@jhaux jhaux self-assigned this Feb 27, 2020
This was referenced Apr 29, 2020
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

No branches or pull requests

1 participant