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

Config file option #9

Open
mt-digital opened this issue Jul 7, 2016 · 1 comment
Open

Config file option #9

mt-digital opened this issue Jul 7, 2016 · 1 comment

Comments

@mt-digital
Copy link
Collaborator

Give users the ability to run scenario series via a config file. Provide fields for default files and directories and HydroShare credentials.

@JohnVolk
Copy link
Collaborator

JohnVolk commented Jul 8, 2016

how about something like this

prms_config.txt

it will be a .ini file, then we then use the ConfigParser built in library:

In [1]: import ConfigParser

In [2]: Config = ConfigParser.ConfigParser()

In [3]: Config.read("prms_config.txt")
Out[3]: ['prms_config.txt']

In [4]: Config.sections()
Out[4]: ['optimixation_control_parameters', 'output_stats', 'data_file_paths']

In [5]: Config.get('data_file_paths', 'solrad')
Out[5]: '/home/user/PRMS-Python/dry_creek/climate/bogus_ridge_daily_shortwave_radiation_langleys.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants