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 'donfig' package for global configuration settings #628

Closed
djhoese opened this issue Feb 21, 2019 · 1 comment · Fixed by #1501
Closed

Use 'donfig' package for global configuration settings #628

djhoese opened this issue Feb 21, 2019 · 1 comment · Fixed by #1501
Assignees
Labels
enhancement code enhancements, features, improvements PCW Pytroll Contributors' Week

Comments

@djhoese
Copy link
Member

djhoese commented Feb 21, 2019

Feature Request

Is your feature request related to a problem? Please describe.
I could have sworn I made an issue for this already but I can't seem to find it. I created a package called donfig which is based off of dask's global configuration module/object. This would allow easier interactive changes to satpy's global settings (ex. default chunk size, etc). See donfig documentation for more information: https://donfig.readthedocs.io/en/latest/

Describe the solution you'd like
SatPy should create a central config object in satpy/__init__.py that is a donfig.Config('satpy') object. In this we would set defaults for certain settings like default chunk size, plugin /etc directory (previously PPP_CONFIG_DIR), resampling cache directory, other?

Describe any changes to existing user workflow
I think we could make it so that any existing environment variables like PYTROLL_CHUNK_SIZE still have an effect but try to have a deprecation warning if possible. The new environment variable read by donfig would be SATPY_CHUNK_SIZE or whatever we chose to name the parameter. Otherwise, this should only mean new flexibility for the user.

Additional context
We'd have to go through all uses of ppp_config_dir and remove them or deprecate them in favor of the global configuration. Similarly reader's use of the satpy.CHUNK_SIZE would have to be removed.

@djhoese djhoese added the enhancement code enhancements, features, improvements label Feb 21, 2019
@djhoese djhoese self-assigned this May 7, 2019
@djhoese djhoese added the PCW Pytroll Contributors' Week label May 7, 2019
@gerritholl
Copy link
Collaborator

Has anything related to this happened? I'm interested because of #727, because logging messages are hard to process programmatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement code enhancements, features, improvements PCW Pytroll Contributors' Week
Development

Successfully merging a pull request may close this issue.

2 participants