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

Use configparser to define/use the components definition #38

Open
jypeter opened this issue Jan 8, 2020 · 1 comment
Open

Use configparser to define/use the components definition #38

jypeter opened this issue Jan 8, 2020 · 1 comment

Comments

@jypeter
Copy link

jypeter commented Jan 8, 2020

I have been making some changes to the components' lists defined in run_C-ESM-EP.py

It coud be nice to have the definitions stored in .ini or .conf files outside of run_C-ESM-EP.py. This way you don't have to alter the source of run_C-ESM-EP.py if all you need to do is define or re-order components

The config files could go to a Config directory, e.g. Config/components_def.conf and Config/components_user.conf (to separate the default and user conf). There are probably some other places where this could be used in C-ESM-EP, in order to reduce the changes a user has to make to .py files (e.g. define the email variable in a config file)

I think this can be done quite easily with configparser. Maybe I'll try to do it if I have time, and this issue can be used as a reminder. I have also covered configparser in pages 55-59 of my old Plus loin avec Python tutorial

@jservonnat
Copy link
Owner

@jypter please feel free to propose a PR ;)

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

2 participants