ocean.py, aquarius, and provider all have their own Config classes that default to looking at the file pointed to by CONFIG_FILE envvar. This creates coupling between them.
This can be seen in Aquarius which instantiates both aquarius.config.Config and ocean_lib.config.Config, both of which will look at the CONFIG_FILE envvar unless a different filename is specified when they're instantiated.
Currently, the provider is unaffected because it doesn't instantiate ocean_lib.config.Config (but it should!, because it's supposed to be using the top-level ocean.py APIs to interact with contracts, addresses, etc.) so it will become a problem in the future unless we decouple them.
[x] In ocean.py, rename CONFIG_FILE envvar to OCEAN_CONFIG_FILE
[x] In aquarius, rename CONFIG_FILE envvar to AQUARIUS_CONFIG_FILE
[x] In provider, rename CONFIG_FILE envvar to PROVIDER_CONFIG_FILE
Unfortunately, to eliminate the coupling, we cannot provide fallback behavior, so these should be considered API breaking changes and should warrant major version increases in provider and aquarius. Since ocean.py is under 1.0.0, it should be a minor version increase.
ocean.py, aquarius, and provider all have their own
Config
classes that default to looking at the file pointed to byCONFIG_FILE
envvar. This creates coupling between them.This can be seen in Aquarius which instantiates both
aquarius.config.Config
andocean_lib.config.Config
, both of which will look at the CONFIG_FILE envvar unless a different filename is specified when they're instantiated.Currently, the provider is unaffected because it doesn't instantiate
ocean_lib.config.Config
(but it should!, because it's supposed to be using the top-level ocean.py APIs to interact with contracts, addresses, etc.) so it will become a problem in the future unless we decouple them.CONFIG_FILE
envvar toOCEAN_CONFIG_FILE
CONFIG_FILE
envvar toAQUARIUS_CONFIG_FILE
CONFIG_FILE
envvar toPROVIDER_CONFIG_FILE
Unfortunately, to eliminate the coupling, we cannot provide fallback behavior, so these should be considered API breaking changes and should warrant major version increases in provider and aquarius. Since ocean.py is under 1.0.0, it should be a minor version increase.