Repository: oceanprotocol/ocean.py (language: python)

Issue:
ocean-lib PyYAML requirement prevents interoperability with other libs
**Describe the bug**
I am trying to build a docker image that uses ocean-lib and langchain. One error I noticed in the installation of my requirements.txt, is that ocean-lib uses PyYAML 5.4.1 whereas langchain uses newer versions, preventing the build of the docker image.

Is the requirement for the PyYAML version strict or is there some way to overcome this issue?


Discussion / hints:

Fix patch:
diff --git a/setup.py b/setup.py
index 779253d8e..b5276a733 100644
--- a/setup.py
+++ b/setup.py
@@ -19,24 +19,16 @@
 # or pip install -e .
 install_requirements = [
     "ocean-contracts==1.1.8",
-    "coloredlogs",
-    "pyopenssl",
-    "PyJWT",  # not jwt
-    "PyYAML==5.4.1",
+    "coloredlogs==15.0.1",
     "requests>=2.21.0",
-    "deprecated",
-    "pycryptodomex",
-    "tqdm",
-    "pytz",
-    "cryptography",
-    "scipy",
+    "pytz",  # used minimally and unlikely to change, common dependency
     "enforce-typing==1.0.0.post1",
     "json-sempai==0.4.0",
-    "eciespy",
+    "eciespy==0.3.11",
     "eth-brownie==1.19.3",
     "yarl==1.8.1",
     "bitarray>=2.6.0,<3",
-    # web3 requires eth-abi, requests, and more,
+    # brownie requires web3.py, eth-abi, requests, and more,
     # so those will be installed too.
     # See https://github.com/ethereum/web3.py/blob/master/setup.py
 ]
@@ -44,42 +36,37 @@
 setup_requirements = ["pytest-runner"]
 
 test_requirements = [
-    "codacy-coverage",
-    "coverage",
-    "docker",
-    "mccabe",
-    "pylint",
-    "pytest",
-    "pytest-watch",
-    "Pillow",
-    "matplotlib",
+    "codacy-coverage==1.3.11",
+    "coverage==6.4.4",
+    "mccabe==0.7.0",
+    "pytest==6.2.5",
+    "pytest-watch==4.2.0",
+    "pytest-env==0.6.2",
+    "matplotlib",  # just used in a readme test and unlikely to change, common dependency
     "mkcodes==0.1.1",
-    "pytest-sugar",
+    "pytest-sugar==0.9.6",
 ]
 
 # Possibly required by developers of ocean-lib:
 dev_requirements = [
-    "bumpversion",
-    "pkginfo",
-    "twine",
-    "watchdog",
+    "bumpversion==0.6.0",
+    "pkginfo==1.8.3",
+    "twine==3.7.1",
+    "watchdog==2.1.9",
     "isort==5.12.0",
     "flake8==6.0.0",
     "black",  # need to keep this up to date to brownie
-    "pre-commit",
-    # for the following: maybe needed, maybe not
-    "pytest",
+    "pre-commit==2.20.0",
     "licenseheaders==0.8.8",
-    "pytest-env",
 ]
 
 packages = find_namespace_packages(include=["ocean_lib*"], exclude=["*test*"])
 
 setup(
-    author="leucothia",
+    author="ocean-core-team",
     author_email="devops@oceanprotocol.com",
     classifiers=[
-        "Development Status :: 2 - Pre-Alpha",
+        "Development Status :: 4 - Beta",
         "Intended Audience :: Developers",
         "License :: OSI Approved :: Apache Software License",
         "Natural Language :: English",


Test patch:
diff --git a/tests/resources/helper_functions.py b/tests/resources/helper_functions.py
index b7636964b..9342a0668 100644
--- a/tests/resources/helper_functions.py
+++ b/tests/resources/helper_functions.py
@@ -12,7 +12,6 @@
 from typing import Any, Dict, Optional, Tuple, Union
 
 import coloredlogs
-import yaml
 from brownie import network
 from brownie.network import accounts
 from enforce_typing import enforce_types
@@ -121,30 +120,11 @@ def get_another_consumer_ocean_instance(use_provider_mock: bool = False) -> Ocea
 
 @enforce_types
 def setup_logging(
-    default_path: str = "logging.yaml",
     default_level=logging.INFO,
-    env_key: str = "LOG_CFG",
 ):
     """Logging setup."""
-    path = default_path
-    value = os.getenv(env_key, None)
-    if value:
-        path = value
-    if os.path.exists(path):
-        with open(path, "rt") as file:
-            try:
-                config = yaml.safe_load(file.read())
-                logging.config.dictConfig(config)
-                coloredlogs.install()
-                logging.info(f"Logging configuration loaded from file: {path}")
-            except Exception as ex:
-                print(ex)
-                print("Error in Logging Configuration. Using default configs")
-                logging.basicConfig(level=default_level)
-                coloredlogs.install(level=default_level)
-    else:
-        logging.basicConfig(level=default_level)
-        coloredlogs.install(level=default_level)
+    logging.basicConfig(level=default_level)
+    coloredlogs.install(level=default_level)
 
 
 @enforce_types