From 0115339b7a83797c3e70d8ba3c62f18607e5ed57 Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Mon, 6 Feb 2023 12:11:09 +0000 Subject: [PATCH 01/15] Ground dev and test dependencies, remove some extras. --- setup.py | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/setup.py b/setup.py index 779253d8e..beb934f7e 100644 --- a/setup.py +++ b/setup.py @@ -44,33 +44,25 @@ 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", "mkcodes==0.1.1", - "pytest-sugar", + "pytest==6.2.5", + "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*"]) From 37ed015b2d4ecda1c41d0758a3318560a92989fe Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Mon, 6 Feb 2023 12:34:02 +0000 Subject: [PATCH 02/15] Remove scipy and ground some prod dependencies. --- setup.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index beb934f7e..ec7f6a322 100644 --- a/setup.py +++ b/setup.py @@ -25,14 +25,12 @@ "PyYAML==5.4.1", "requests>=2.21.0", "deprecated", - "pycryptodomex", - "tqdm", - "pytz", - "cryptography", - "scipy", + "tqdm==4.64.1", + "pytz==2022.2.1", + "cryptography==3.3.2", "enforce-typing==1.0.0.post1", "json-sempai==0.4.0", - "eciespy", + "eciespy==0.3.0", "eth-brownie==1.19.3", "yarl==1.8.1", "bitarray>=2.6.0,<3", From 81cb9955ea2cc9069b02c6f8348eb3ddff93fa23 Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Mon, 6 Feb 2023 14:18:42 +0000 Subject: [PATCH 03/15] Fix. --- setup.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index ec7f6a322..bc5b70c76 100644 --- a/setup.py +++ b/setup.py @@ -25,12 +25,14 @@ "PyYAML==5.4.1", "requests>=2.21.0", "deprecated", - "tqdm==4.64.1", - "pytz==2022.2.1", - "cryptography==3.3.2", + "pycryptodomex", + "tqdm", + "pytz", + "cryptography", + "scipy", "enforce-typing==1.0.0.post1", "json-sempai==0.4.0", - "eciespy==0.3.0", + "eciespy", "eth-brownie==1.19.3", "yarl==1.8.1", "bitarray>=2.6.0,<3", @@ -42,11 +44,15 @@ setup_requirements = ["pytest-runner"] test_requirements = [ - "codacy-coverage==1.3.11", - "coverage==6.4.4", - "mccabe==0.7.0", + "codacy-coverage", + "coverage", + "docker", + "mccabe", + "pylint", + "pytest", + "pytest-watch", + "pytest-env", "mkcodes==0.1.1", - "pytest==6.2.5", "pytest-sugar==0.9.6", ] From e76690faadeb452385af4f564674501162dc0da0 Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Mon, 6 Feb 2023 14:47:58 +0000 Subject: [PATCH 04/15] Add back matplotlib. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index bc5b70c76..bc1659848 100644 --- a/setup.py +++ b/setup.py @@ -52,6 +52,7 @@ "pytest", "pytest-watch", "pytest-env", + "matplotlib", "mkcodes==0.1.1", "pytest-sugar==0.9.6", ] From 91f290a5e631ac1a80b7e8c7342e7cff1504e4da Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Mon, 6 Feb 2023 15:55:24 +0000 Subject: [PATCH 05/15] Try removing coloredlogs. --- setup.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/setup.py b/setup.py index bc1659848..91fd3846a 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,6 @@ # or pip install -e . install_requirements = [ "ocean-contracts==1.1.8", - "coloredlogs", "pyopenssl", "PyJWT", # not jwt "PyYAML==5.4.1", @@ -46,9 +45,7 @@ test_requirements = [ "codacy-coverage", "coverage", - "docker", "mccabe", - "pylint", "pytest", "pytest-watch", "pytest-env", From b1f717e42fdf22f9347f84246bb96b69fc0950ab Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Mon, 6 Feb 2023 15:58:40 +0000 Subject: [PATCH 06/15] Try grounding test dependencies again. --- setup.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index 91fd3846a..b16cb32e0 100644 --- a/setup.py +++ b/setup.py @@ -43,13 +43,13 @@ setup_requirements = ["pytest-runner"] test_requirements = [ - "codacy-coverage", - "coverage", - "mccabe", - "pytest", - "pytest-watch", - "pytest-env", - "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 "mkcodes==0.1.1", "pytest-sugar==0.9.6", ] From 7c55a17f9eca8a81ff8ad056a22788bf66ebb03c Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Mon, 6 Feb 2023 16:18:57 +0000 Subject: [PATCH 07/15] Add back coloredlogs and remove pyopenssl and deprecated. --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index b16cb32e0..1ffe4f537 100644 --- a/setup.py +++ b/setup.py @@ -19,11 +19,12 @@ # or pip install -e . install_requirements = [ "ocean-contracts==1.1.8", - "pyopenssl", + "coloredlogs==15.0.1", + # "pyopenssl", "PyJWT", # not jwt "PyYAML==5.4.1", "requests>=2.21.0", - "deprecated", + # "deprecated", "pycryptodomex", "tqdm", "pytz", From 66ae72b98e704e1ad09eb5b558a988f1700946f3 Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Mon, 6 Feb 2023 17:02:19 +0000 Subject: [PATCH 08/15] Try removing pyJWT and pycryptodomex. --- setup.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 1ffe4f537..1b3e81ab3 100644 --- a/setup.py +++ b/setup.py @@ -20,12 +20,10 @@ install_requirements = [ "ocean-contracts==1.1.8", "coloredlogs==15.0.1", - # "pyopenssl", - "PyJWT", # not jwt + # "PyJWT", # not jwt "PyYAML==5.4.1", "requests>=2.21.0", - # "deprecated", - "pycryptodomex", + # "pycryptodomex", "tqdm", "pytz", "cryptography", From 543291dd980257cdd2caad21675dd6e04ee116c8 Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Mon, 6 Feb 2023 19:23:34 +0000 Subject: [PATCH 09/15] Ground more versions. --- setup.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index 1b3e81ab3..551e4be70 100644 --- a/setup.py +++ b/setup.py @@ -20,17 +20,14 @@ install_requirements = [ "ocean-contracts==1.1.8", "coloredlogs==15.0.1", - # "PyJWT", # not jwt - "PyYAML==5.4.1", + "PyYAML", # used minimally and unlikely to change "requests>=2.21.0", - # "pycryptodomex", - "tqdm", - "pytz", - "cryptography", + "pytz==2022.2.1", + "cryptography==3.3.2", "scipy", "enforce-typing==1.0.0.post1", "json-sempai==0.4.0", - "eciespy", + "eciespy==0.3.0", "eth-brownie==1.19.3", "yarl==1.8.1", "bitarray>=2.6.0,<3", From c874d60ee4e12c9b294f74bbddbe2f8f87afee65 Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Mon, 6 Feb 2023 19:23:56 +0000 Subject: [PATCH 10/15] Remove scipy dependency. --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 551e4be70..197c405bd 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,6 @@ "requests>=2.21.0", "pytz==2022.2.1", "cryptography==3.3.2", - "scipy", "enforce-typing==1.0.0.post1", "json-sempai==0.4.0", "eciespy==0.3.0", From 533f42831a9f81e06fa8e545f89e67a8308bd94f Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Mon, 6 Feb 2023 19:25:01 +0000 Subject: [PATCH 11/15] Fix some comments. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 197c405bd..212312a4d 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ "eth-brownie==1.19.3", "yarl==1.8.1", "bitarray>=2.6.0,<3", - # web3 requires eth-abi, requests, and more, + # brownie requires web3py, eth-abi and more, # so those will be installed too. # See https://github.com/ethereum/web3.py/blob/master/setup.py ] From 54054b498c5aa2242dbc03f06c97b1576af030bb Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Mon, 6 Feb 2023 19:32:14 +0000 Subject: [PATCH 12/15] Just remove scipy. --- setup.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 212312a4d..6fbc5ee5d 100644 --- a/setup.py +++ b/setup.py @@ -20,17 +20,17 @@ install_requirements = [ "ocean-contracts==1.1.8", "coloredlogs==15.0.1", - "PyYAML", # used minimally and unlikely to change + "PyYAML", # used minimally and unlikely to change, common dependency "requests>=2.21.0", - "pytz==2022.2.1", - "cryptography==3.3.2", + "pytz", # used minimally and unlikely to change, common dependency + "cryptography", "enforce-typing==1.0.0.post1", "json-sempai==0.4.0", - "eciespy==0.3.0", + "eciespy", "eth-brownie==1.19.3", "yarl==1.8.1", "bitarray>=2.6.0,<3", - # brownie requires web3py, eth-abi 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,7 +44,7 @@ "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 + "matplotlib", # just used in a readme test and unlikely to change, common dependency "mkcodes==0.1.1", "pytest-sugar==0.9.6", ] From e6ad7511530b003d153c662d4ae658105d636cc9 Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Mon, 6 Feb 2023 20:08:04 +0000 Subject: [PATCH 13/15] Ground eciespy and remove cryptography. --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 6fbc5ee5d..846fac75d 100644 --- a/setup.py +++ b/setup.py @@ -23,10 +23,9 @@ "PyYAML", # used minimally and unlikely to change, common dependency "requests>=2.21.0", "pytz", # used minimally and unlikely to change, common dependency - "cryptography", "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", From 0f5030c8d4a4e77737d964cb9686644583aa2293 Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Tue, 7 Feb 2023 09:29:23 +0000 Subject: [PATCH 14/15] Use only coloredlogs without pyyaml. --- setup.py | 1 - tests/resources/helper_functions.py | 24 ++---------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/setup.py b/setup.py index 846fac75d..abca369ee 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,6 @@ install_requirements = [ "ocean-contracts==1.1.8", "coloredlogs==15.0.1", - "PyYAML", # used minimally and unlikely to change, common dependency "requests>=2.21.0", "pytz", # used minimally and unlikely to change, common dependency "enforce-typing==1.0.0.post1", 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 From 70873a0800ee41651080fecee68dca35a15396fe Mon Sep 17 00:00:00 2001 From: Calina Cenan Date: Thu, 16 Feb 2023 10:45:30 +0000 Subject: [PATCH 15/15] Add classifiers and package author. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index abca369ee..b5276a733 100644 --- a/setup.py +++ b/setup.py @@ -63,10 +63,10 @@ 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",