You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EUMETSAT has many Level 0, 1, and 2 products in different internal formats. These products are only used in-house and are not send out to the users. Therefore, satpy-readers for such products would quickly pollute satpy/etc/readers/-directory with *.yaml-files that are only useful for a small amount of PyTroll users.
The workaround with current implementation is to use ppp_config_dir-keyword when creating a Scene-object:
This is a proposal for a possibility to add a local config directory where config files would be automatically searched. Proposed solution by modifying config_search_paths-method in satpy/config.py by setting an environmental variable, e.g. SATPY_LOCAL_CONFIG
Proposed modification
defconfig_search_paths(filename, *search_dirs, **kwargs):
# Get the environment variable value every time (could be set dynamically)# FIXME: Consider removing the 'magic' environment variable all togetherCONFIG_PATH=get_environ_config_dir()
LOCAL_PATH=os.environ.get('SATPY_LOCAL_CONFIG')
paths= [filename, os.path.basename(filename)]
paths+= [os.path.join(search_dir, filename) forsearch_dirinsearch_dirs]
ifLOCAL_PATH:
paths+= [os.path.join(LOCAL_PATH, filename)]
# FUTURE: Remove CONFIG_PATH because it should be included as a search_dirpaths+= [os.path.join(CONFIG_PATH, filename),
os.path.join(PACKAGE_CONFIG_PATH, filename)]
ifkwargs.get("check_exists", True):
paths= [xforxinpathsifos.path.isfile(x)]
# flip the order of the list so builtins are loaded firstreturnpaths[::-1]
Any ideas, comments, thoughts? Would such modification be useful for other institutes/organizations? Or is this just silly? ;)
The text was updated successfully, but these errors were encountered:
EUMETSAT has many Level 0, 1, and 2 products in different internal formats. These products are only used in-house and are not send out to the users. Therefore,
satpy
-readers for such products would quickly pollutesatpy/etc/readers/
-directory with*.yaml
-files that are only useful for a small amount of PyTroll users.The workaround with current implementation is to use
ppp_config_dir
-keyword when creating aScene
-object:This is a proposal for a possibility to add a local config directory where config files would be automatically searched. Proposed solution by modifying
config_search_paths
-method insatpy/config.py
by setting an environmental variable, e.g.SATPY_LOCAL_CONFIG
Proposed modification
Any ideas, comments, thoughts? Would such modification be useful for other institutes/organizations? Or is this just silly? ;)
The text was updated successfully, but these errors were encountered: