oceanprotocol / pm

Zenhub needs each issue associated with one repo. This repo is a workaround, to mark issues that span >1 repos.
4 stars 0 forks source link

Decouple ocean.py, aquarius, and provider from the shared CONFIG_FILE envvar. #103

Closed MantisClone closed 3 years ago

MantisClone commented 3 years ago

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.

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.