From bd4f3fb9b72aecc4b822ad1b96650259738ac1a0 Mon Sep 17 00:00:00 2001 From: Dario Del Piano Date: Tue, 25 Jan 2022 19:53:01 +0000 Subject: [PATCH 1/8] #392 upgrade to python 3.9 --- .../base-images/cloudharness-base-debian/Dockerfile | 2 +- infrastructure/base-images/cloudharness-base/Dockerfile | 2 +- libraries/client/cloudharness_cli/setup.py | 5 +++-- libraries/cloudharness-common/setup.py | 5 +++-- libraries/cloudharness-common/tox.ini | 2 +- utilities/Dockerfile | 2 +- utilities/cloudharness_utilities/constants.py | 2 +- .../deployment-configuration/codefresh-template-dev.yaml | 2 +- .../deployment-configuration/codefresh-template-prod.yaml | 2 +- .../deployment-configuration/helm/README.md | 6 ++++-- utilities/setup.py | 3 ++- 11 files changed, 19 insertions(+), 14 deletions(-) diff --git a/infrastructure/base-images/cloudharness-base-debian/Dockerfile b/infrastructure/base-images/cloudharness-base-debian/Dockerfile index 62d9854c..f9c9bd0c 100644 --- a/infrastructure/base-images/cloudharness-base-debian/Dockerfile +++ b/infrastructure/base-images/cloudharness-base-debian/Dockerfile @@ -1,4 +1,4 @@ -ARG PARENT=python:3.7.6 +ARG PARENT=python:3.9.10 FROM ${PARENT} COPY libraries/cloudharness-common/requirements.txt /libraries/cloudharness-common/requirements.txt diff --git a/infrastructure/base-images/cloudharness-base/Dockerfile b/infrastructure/base-images/cloudharness-base/Dockerfile index 66fc3dd4..832de9b5 100644 --- a/infrastructure/base-images/cloudharness-base/Dockerfile +++ b/infrastructure/base-images/cloudharness-base/Dockerfile @@ -1,4 +1,4 @@ -ARG PARENT=python:3.7.9-alpine +ARG PARENT=python:3.9.10-alpine FROM ${PARENT} RUN apk update diff --git a/libraries/client/cloudharness_cli/setup.py b/libraries/client/cloudharness_cli/setup.py index bfedbaff..3a3bae68 100644 --- a/libraries/client/cloudharness_cli/setup.py +++ b/libraries/client/cloudharness_cli/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "cloudharness-cli" -VERSION = "0.4.0" +VERSION = "1.0.0" # To install the library, run the following # # python setup.py install @@ -38,5 +38,6 @@ license="UNLICENSED", long_description="""\ CloudHarness Python API Client # noqa: E501 - """ + """, + python_requires='>=3.7.9, <=3.9.10' ) diff --git a/libraries/cloudharness-common/setup.py b/libraries/cloudharness-common/setup.py index 11df59d6..d41a6d03 100644 --- a/libraries/cloudharness-common/setup.py +++ b/libraries/cloudharness-common/setup.py @@ -3,7 +3,7 @@ NAME = "cloudharness" -VERSION = "0.4.0" +VERSION = "1.0.0" # To install the library, run the following # # python setup.py install @@ -39,5 +39,6 @@ package_data={'': ['*.yaml']}, long_description="""\ Cloudharness common library - """ + """, + python_requires='>=3.7.9, <=3.9.10' ) diff --git a/libraries/cloudharness-common/tox.ini b/libraries/cloudharness-common/tox.ini index e4244f20..615c3cf2 100644 --- a/libraries/cloudharness-common/tox.ini +++ b/libraries/cloudharness-common/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py3 +envlist = py3{7,8,9,10,} [testenv] deps=-r{toxinidir}/test-requirements.txt diff --git a/utilities/Dockerfile b/utilities/Dockerfile index 25a32cd2..4562352b 100644 --- a/utilities/Dockerfile +++ b/utilities/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.7-alpine +FROM python:3.9.10-alpine ENV DEPLOY_DIR=deployment COPY . cloudharness_utilities diff --git a/utilities/cloudharness_utilities/constants.py b/utilities/cloudharness_utilities/constants.py index cc274879..9e8885c6 100644 --- a/utilities/cloudharness_utilities/constants.py +++ b/utilities/cloudharness_utilities/constants.py @@ -28,7 +28,7 @@ VALUES_MANUAL_PATH = 'values.yaml' VALUE_TEMPLATE_PATH = f'{DEPLOYMENT_CONFIGURATION_PATH}/value-template.yaml' -CH_BASE_IMAGES = {'cloudharness-base': 'python:3.7-alpine', 'cloudharness-base-debian': 'python:3.7'} +CH_BASE_IMAGES = {'cloudharness-base': 'python:3.9.10-alpine', 'cloudharness-base-debian': 'python:3.9.10'} CF_BUILD_STEP_BASE = 'build_base_images' diff --git a/utilities/cloudharness_utilities/deployment-configuration/codefresh-template-dev.yaml b/utilities/cloudharness_utilities/deployment-configuration/codefresh-template-dev.yaml index ebe26fbc..0fc1716c 100644 --- a/utilities/cloudharness_utilities/deployment-configuration/codefresh-template-dev.yaml +++ b/utilities/cloudharness_utilities/deployment-configuration/codefresh-template-dev.yaml @@ -26,7 +26,7 @@ steps: git: github prepare_deployment: title: "Prepare helm chart" - image: python:3.7 + image: python:3.9.10 stage: prepare working_directory: . commands: diff --git a/utilities/cloudharness_utilities/deployment-configuration/codefresh-template-prod.yaml b/utilities/cloudharness_utilities/deployment-configuration/codefresh-template-prod.yaml index d5200be9..25f080ec 100644 --- a/utilities/cloudharness_utilities/deployment-configuration/codefresh-template-prod.yaml +++ b/utilities/cloudharness_utilities/deployment-configuration/codefresh-template-prod.yaml @@ -25,7 +25,7 @@ steps: git: github prepare_deployment: title: "Prepare helm chart" - image: python:3.7 + image: python:3.9.10 stage: prepare working_directory: . commands: diff --git a/utilities/cloudharness_utilities/deployment-configuration/helm/README.md b/utilities/cloudharness_utilities/deployment-configuration/helm/README.md index fe3e842e..8029edd2 100644 --- a/utilities/cloudharness_utilities/deployment-configuration/helm/README.md +++ b/utilities/cloudharness_utilities/deployment-configuration/helm/README.md @@ -19,6 +19,7 @@ A helm chart is used to perform the installation of your CloudHarness deployment To install helm, see https://helm.sh/docs/intro/install. With snap: + ```bash snap install helm --classic helm init --wait @@ -62,7 +63,7 @@ NOTE: wildcard don't work. ```bash cp ./certs/mycert.pem /usr/local/share/ca-certificates/extra/cacert.crt update-ca-certificates --verbose - cat /usr/local/share/ca-certificates/extra/cacert.crt >> /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + cat /usr/local/share/ca-certificates/extra/cacert.crt >> /usr/local/lib/python3.9.10/site-packages/certifi/cacert.pem ``` NOTE: Some python packages (such as certifi) have their own list of trusted CA. You might or might not need to perform the last step. @@ -74,6 +75,7 @@ NOTE: Some python packages (such as certifi) have their own list of trusted CA. ```bash kubectl create namespace ch ``` + (any namespace will do the job) * Deploy @@ -114,7 +116,7 @@ helm del --purge ch * Key value pairs inside `env` are copied to all containers * `privenv` * These are opaque secrets transfered to container env variables during spawning. - (Don't push them to GitHub) + (Don't push them to GitHub) ## Debug Chart diff --git a/utilities/setup.py b/utilities/setup.py index df7c1151..86ace2c5 100644 --- a/utilities/setup.py +++ b/utilities/setup.py @@ -41,5 +41,6 @@ scripts=['harness-deployment', 'harness-generate', 'harness-application'], long_description="""\ MetaCell Neuroscience Platform - CloudHarness deploy library - """ + """, + python_requires='>=3.7.9, <=3.9.10' ) From 02f0ce00a9d82fe0819dca03dbe2be5152e5fe40 Mon Sep 17 00:00:00 2001 From: Dario Del Piano Date: Fri, 28 Jan 2022 12:27:20 +0000 Subject: [PATCH 2/8] #392 setting back version --- libraries/client/cloudharness_cli/setup.py | 2 +- libraries/cloudharness-common/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/client/cloudharness_cli/setup.py b/libraries/client/cloudharness_cli/setup.py index 3a3bae68..4761c5b9 100644 --- a/libraries/client/cloudharness_cli/setup.py +++ b/libraries/client/cloudharness_cli/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "cloudharness-cli" -VERSION = "1.0.0" +VERSION = "0.4.0" # To install the library, run the following # # python setup.py install diff --git a/libraries/cloudharness-common/setup.py b/libraries/cloudharness-common/setup.py index d41a6d03..db9eb45e 100644 --- a/libraries/cloudharness-common/setup.py +++ b/libraries/cloudharness-common/setup.py @@ -3,7 +3,7 @@ NAME = "cloudharness" -VERSION = "1.0.0" +VERSION = "0.4.0" # To install the library, run the following # # python setup.py install From d2047d5ea8c8f45a4a9a50befd6da621a4151758 Mon Sep 17 00:00:00 2001 From: Dario Del Piano Date: Fri, 28 Jan 2022 13:49:15 +0000 Subject: [PATCH 3/8] #392 tox pyenv only for py39 --- libraries/cloudharness-common/tox.ini | 2 +- utilities/tox.ini | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/cloudharness-common/tox.ini b/libraries/cloudharness-common/tox.ini index 615c3cf2..ae892bde 100644 --- a/libraries/cloudharness-common/tox.ini +++ b/libraries/cloudharness-common/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py3{7,8,9,10,} +envlist = py3{9,} [testenv] deps=-r{toxinidir}/test-requirements.txt diff --git a/utilities/tox.ini b/utilities/tox.ini index f517c410..9c13b0e6 100644 --- a/utilities/tox.ini +++ b/utilities/tox.ini @@ -1,9 +1,9 @@ [tox] -envlist = py3 +envlist = py3{9,} [testenv] deps=-r{toxinidir}/test-requirements.txt commands= coverage run --source cloudharness_utilities -m pytest -v - coverage report -m \ No newline at end of file + coverage report -m From 5ec5ea9685be1bf9ff0efcddb42665578ec38565 Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Wed, 4 May 2022 17:24:09 +0200 Subject: [PATCH 4/8] #392 Small doc and requirements fixes --- README.md | 2 +- tools/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eff0744c..14ad7a82 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Python 3.7-3.9 must be installed. It is recommended to setup a virtual environment. With conda: ```bash - conda create --name ch python=3.7 + conda create --name ch python=3.9 conda activate ch ``` diff --git a/tools/setup.py b/tools/setup.py index 7ce516dc..eea5c7fb 100644 --- a/tools/setup.py +++ b/tools/setup.py @@ -42,5 +42,5 @@ long_description="""\ MetaCell Neuroscience Platform - CloudHarness deploy library """, - python_requires='>=3.7.9, <=3.9.10' + python_requires='>=3.7.9, <3.10' ) From dda0342a6f97d21eef391c2cc83c5ebd747b69ec Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Wed, 4 May 2022 17:35:44 +0200 Subject: [PATCH 5/8] #392 Fix test dependencies --- tools/test-requirements.txt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/test-requirements.txt b/tools/test-requirements.txt index e2fead49..776cb8c4 100644 --- a/tools/test-requirements.txt +++ b/tools/test-requirements.txt @@ -1,8 +1,7 @@ -coverage>=4.0.3 -nose>=1.3.7 -pluggy>=0.3.1 -py>=1.4.31 -randomize>=0.13 -pytest>=5.0.0 -pytest-cov --e . +coverage==6.3.2 +nose==1.3.7 +randomize==0.14 +py==1.11.0 +pyparsing==3.0.8 +pytest==7.1.2 +pytest-cov==3.0.0 \ No newline at end of file From 559dab0fe9795aa7639cc53a5caa43950e2d98a2 Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Wed, 4 May 2022 17:37:43 +0200 Subject: [PATCH 6/8] #392 Fix test dependencies --- .../cloudharness-common/test-requirements.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libraries/cloudharness-common/test-requirements.txt b/libraries/cloudharness-common/test-requirements.txt index 435a3ac4..277600f4 100644 --- a/libraries/cloudharness-common/test-requirements.txt +++ b/libraries/cloudharness-common/test-requirements.txt @@ -1,9 +1,9 @@ -coverage>=4.0.3 -nose>=1.3.7 -pluggy>=0.3.1 -py>=1.4.31 -randomize>=0.13 -pytest>=5.0.0 -pytest-cov +coverage==6.3.2 +nose==1.3.7 +randomize==0.14 +py==1.11.0 +pyparsing==3.0.8 +pytest==7.1.2 +pytest-cov==3.0.0 -e . -e ../client/cloudharness_cli \ No newline at end of file From 6967008ff03e1793ebeecba04cf25410b79fea81 Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Wed, 4 May 2022 17:39:04 +0200 Subject: [PATCH 7/8] #392 Fix test dependencies --- tools/test-requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/test-requirements.txt b/tools/test-requirements.txt index 776cb8c4..27e4e949 100644 --- a/tools/test-requirements.txt +++ b/tools/test-requirements.txt @@ -4,4 +4,5 @@ randomize==0.14 py==1.11.0 pyparsing==3.0.8 pytest==7.1.2 -pytest-cov==3.0.0 \ No newline at end of file +pytest-cov==3.0.0 +-e . \ No newline at end of file From 310144969d62e710b3129dca77a3f14f1af57182 Mon Sep 17 00:00:00 2001 From: Filippo Ledda Date: Wed, 4 May 2022 17:43:53 +0200 Subject: [PATCH 8/8] #392 Fix python requirements --- libraries/client/cloudharness_cli/setup.py | 2 +- libraries/cloudharness-common/setup.py | 2 +- tools/setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/client/cloudharness_cli/setup.py b/libraries/client/cloudharness_cli/setup.py index 8f96679a..de0a3085 100644 --- a/libraries/client/cloudharness_cli/setup.py +++ b/libraries/client/cloudharness_cli/setup.py @@ -39,5 +39,5 @@ long_description="""\ CloudHarness Python API Client # noqa: E501 """, - python_requires='>=3.7.9, <=3.9.10' + python_requires='>=3.9' ) diff --git a/libraries/cloudharness-common/setup.py b/libraries/cloudharness-common/setup.py index 6133e8d5..d77828bf 100644 --- a/libraries/cloudharness-common/setup.py +++ b/libraries/cloudharness-common/setup.py @@ -40,5 +40,5 @@ long_description="""\ Cloudharness common library """, - python_requires='>=3.7.9, <=3.9.10' + python_requires='>=3.9' ) diff --git a/tools/setup.py b/tools/setup.py index eea5c7fb..8b2f1272 100644 --- a/tools/setup.py +++ b/tools/setup.py @@ -42,5 +42,5 @@ long_description="""\ MetaCell Neuroscience Platform - CloudHarness deploy library """, - python_requires='>=3.7.9, <3.10' + python_requires='>=3.9' )