From ef1b63d4f0c2e121b71dce59037e7953cef48695 Mon Sep 17 00:00:00 2001 From: brais <26645694+braisvq1996@users.noreply.github.com> Date: Sun, 28 May 2023 16:52:44 +0200 Subject: [PATCH 01/15] add python 3.11 --- common/jenkins-agents/python/docker/Dockerfile.ubi8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/jenkins-agents/python/docker/Dockerfile.ubi8 b/common/jenkins-agents/python/docker/Dockerfile.ubi8 index 89ee1f7c3..b8077d196 100644 --- a/common/jenkins-agents/python/docker/Dockerfile.ubi8 +++ b/common/jenkins-agents/python/docker/Dockerfile.ubi8 @@ -12,10 +12,11 @@ ENV PYTHONUNBUFFERED=1 \ RUN yum module install -y python38:3.8/build && \ yum module install -y python39:3.9/build --allowerasing && \ + yum install -y python3.11 python3.11-pip && \ yum install -y autoconf automake gcc-c++ openssl-devel libffi-devel && \ yum -y clean all -RUN pipVersions=( pip3.8 pip3.9 ); \ +RUN pipVersions=( pip3.8 pip3.9 pip3.11 ); \ for pipV in "${pipVersions[@]}"; \ do \ if [ ! -z ${nexusHost} ] && [ ! -z ${nexusAuth} ]; \ From 42f0b2078ac146daa55309d969732822d4a4cdc9 Mon Sep 17 00:00:00 2001 From: Author Brais Date: Sun, 28 May 2023 17:24:24 +0200 Subject: [PATCH 02/15] update agent and python qs --- be-python-flask/Jenkinsfile.template | 4 ++-- be-python-flask/files/docker/Dockerfile | 2 +- be-python-flask/files/requirements.txt | 4 ++-- be-python-flask/files/tests_requirements.txt | 8 ++++---- common/jenkins-agents/python/docker/Dockerfile.ubi8 | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/be-python-flask/Jenkinsfile.template b/be-python-flask/Jenkinsfile.template index 1e6e11a3c..4fe1df37a 100644 --- a/be-python-flask/Jenkinsfile.template +++ b/be-python-flask/Jenkinsfile.template @@ -29,7 +29,7 @@ def stageTestSuite(def context) { stage('Prepare Test Suite') { sh """ - python3.9 -m venv testsuite + python3.11 -m venv testsuite . ./testsuite/bin/activate pip install -r tests_requirements.txt pip check @@ -50,7 +50,7 @@ def stageTestSuite(def context) { def status = sh( script: """ . ./testsuite/bin/activate - PYTHONPATH=src python3.9 -m pytest --junitxml=tests.xml -o junit_family=xunit2 --cov-report term-missing --cov-report xml --cov=src -o testpaths=tests + PYTHONPATH=src python3.11 -m pytest --junitxml=tests.xml -o junit_family=xunit2 --cov-report term-missing --cov-report xml --cov=src -o testpaths=tests mv tests.xml ${testLocation} mv coverage.xml ${coverageLocation} mv .coverage ${coverageLocation} diff --git a/be-python-flask/files/docker/Dockerfile b/be-python-flask/files/docker/Dockerfile index 463aa2708..66a1b5e30 100644 --- a/be-python-flask/files/docker/Dockerfile +++ b/be-python-flask/files/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi9/python-39 +FROM registry.access.redhat.com/ubi9/python-311 ARG nexusHostWithBasicAuth ARG nexusHostWithoutScheme diff --git a/be-python-flask/files/requirements.txt b/be-python-flask/files/requirements.txt index 229550e65..ad074ba4c 100644 --- a/be-python-flask/files/requirements.txt +++ b/be-python-flask/files/requirements.txt @@ -1,2 +1,2 @@ -gunicorn==20.1.0 -flask==2.2.2 +gunicorn==20.23.0 +flask==2.3.2 diff --git a/be-python-flask/files/tests_requirements.txt b/be-python-flask/files/tests_requirements.txt index f32611857..408da5e34 100644 --- a/be-python-flask/files/tests_requirements.txt +++ b/be-python-flask/files/tests_requirements.txt @@ -1,6 +1,6 @@ -r ./requirements.txt -mypy==0.982 -flake8==5.0.4 -pytest==7.2.0 -pytest-cov==4.0.0 +mypy==1.3.0 +flake8==6.0.0 +pytest==7.3.1 +pytest-cov==4.1.0 diff --git a/common/jenkins-agents/python/docker/Dockerfile.ubi8 b/common/jenkins-agents/python/docker/Dockerfile.ubi8 index b8077d196..cbdb97cde 100644 --- a/common/jenkins-agents/python/docker/Dockerfile.ubi8 +++ b/common/jenkins-agents/python/docker/Dockerfile.ubi8 @@ -12,7 +12,7 @@ ENV PYTHONUNBUFFERED=1 \ RUN yum module install -y python38:3.8/build && \ yum module install -y python39:3.9/build --allowerasing && \ - yum install -y python3.11 python3.11-pip && \ + yum install -y python3.11 python3.11-pip python3.11-venv && \ yum install -y autoconf automake gcc-c++ openssl-devel libffi-devel && \ yum -y clean all @@ -26,7 +26,7 @@ RUN pipVersions=( pip3.8 pip3.9 pip3.11 ); \ fi; \ $pipV config set global.cert /etc/ssl/certs/ca-bundle.crt && \ $pipV install --upgrade pip --user && \ - $pipV install virtualenv==20.16.6 setuptools==65.5.1 Cython==0.29.32 pypandoc==1.10; \ + $pipV install virtualenv==20.23.0 setuptools==67.8.0 Cython==0.29.35 pypandoc==1.11; \ done; # Enables default user to access $HOME folder From 0e16985fb20ffaac48864bc2523e5a22f5879a1c Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Mon, 29 May 2023 09:42:44 +0200 Subject: [PATCH 03/15] modify python package --- common/jenkins-agents/python/docker/Dockerfile.ubi8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/jenkins-agents/python/docker/Dockerfile.ubi8 b/common/jenkins-agents/python/docker/Dockerfile.ubi8 index cbdb97cde..8625e084e 100644 --- a/common/jenkins-agents/python/docker/Dockerfile.ubi8 +++ b/common/jenkins-agents/python/docker/Dockerfile.ubi8 @@ -12,7 +12,8 @@ ENV PYTHONUNBUFFERED=1 \ RUN yum module install -y python38:3.8/build && \ yum module install -y python39:3.9/build --allowerasing && \ - yum install -y python3.11 python3.11-pip python3.11-venv && \ + yum install -y python3.11 python3.11-pip python3.11-devel python3.11-setuptools && \ +# yum install -y python3.11 python3.11-pip python3.11-venv python3.11-devel python3.11-setuptools && \ yum install -y autoconf automake gcc-c++ openssl-devel libffi-devel && \ yum -y clean all From 1d4a9a4e41278ab8ff64abbdba4e299168e1ea40 Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Mon, 29 May 2023 09:52:19 +0200 Subject: [PATCH 04/15] update agent --- common/jenkins-agents/python/docker/Dockerfile.ubi8 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/jenkins-agents/python/docker/Dockerfile.ubi8 b/common/jenkins-agents/python/docker/Dockerfile.ubi8 index 8625e084e..02e46e4c2 100644 --- a/common/jenkins-agents/python/docker/Dockerfile.ubi8 +++ b/common/jenkins-agents/python/docker/Dockerfile.ubi8 @@ -12,8 +12,7 @@ ENV PYTHONUNBUFFERED=1 \ RUN yum module install -y python38:3.8/build && \ yum module install -y python39:3.9/build --allowerasing && \ - yum install -y python3.11 python3.11-pip python3.11-devel python3.11-setuptools && \ -# yum install -y python3.11 python3.11-pip python3.11-venv python3.11-devel python3.11-setuptools && \ + yum install -y python3.11 python3.11-pip python3.11-devel python3.11-setuptools --allowerasing && \ yum install -y autoconf automake gcc-c++ openssl-devel libffi-devel && \ yum -y clean all From 100846f553d49d7f938bd2bc8d8fe893e68a2a8d Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Mon, 29 May 2023 10:05:24 +0200 Subject: [PATCH 05/15] fix --- be-python-flask/Jenkinsfile.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be-python-flask/Jenkinsfile.template b/be-python-flask/Jenkinsfile.template index 4fe1df37a..ec22dd21a 100644 --- a/be-python-flask/Jenkinsfile.template +++ b/be-python-flask/Jenkinsfile.template @@ -50,7 +50,7 @@ def stageTestSuite(def context) { def status = sh( script: """ . ./testsuite/bin/activate - PYTHONPATH=src python3.11 -m pytest --junitxml=tests.xml -o junit_family=xunit2 --cov-report term-missing --cov-report xml --cov=src -o testpaths=tests + PYTHONPATH=src python -m pytest --junitxml=tests.xml -o junit_family=xunit2 --cov-report term-missing --cov-report xml --cov=src -o testpaths=tests mv tests.xml ${testLocation} mv coverage.xml ${coverageLocation} mv .coverage ${coverageLocation} From 5ffbaa129ef3ed8ba30a2b0ad4efb916c21ec1df Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Mon, 29 May 2023 10:09:53 +0200 Subject: [PATCH 06/15] test new agent --- be-python-flask/Jenkinsfile | 2 +- be-python-flask/Jenkinsfile.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/be-python-flask/Jenkinsfile b/be-python-flask/Jenkinsfile index 5c18f8bc7..90ff6f16a 100644 --- a/be-python-flask/Jenkinsfile +++ b/be-python-flask/Jenkinsfile @@ -15,7 +15,7 @@ node { library("ods-jenkins-shared-library@${sharedLibraryRef}") odsQuickstarterPipeline( - imageStreamTag: "${odsNamespace}/jenkins-agent-python:${agentImageTag}", + imageStreamTag: "${odsNamespace}/jenkins-agent-python:3.11", ) { context -> odsQuickstarterStageCopyFiles(context) diff --git a/be-python-flask/Jenkinsfile.template b/be-python-flask/Jenkinsfile.template index ec22dd21a..6bf4ba2f9 100644 --- a/be-python-flask/Jenkinsfile.template +++ b/be-python-flask/Jenkinsfile.template @@ -3,7 +3,7 @@ @Library('ods-jenkins-shared-library@@shared_library_ref@') _ odsComponentPipeline( - imageStreamTag: '@ods_namespace@/jenkins-agent-python:@agent_image_tag@', + imageStreamTag: '@ods_namespace@/jenkins-agent-python:3.11', branchToEnvironmentMapping: [ 'master': 'dev', // 'release/': 'test' From cfc08a8e2def8fdb16e9dcb0b933ffc9d281a98e Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Mon, 29 May 2023 10:20:30 +0200 Subject: [PATCH 07/15] fix version --- be-python-flask/files/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be-python-flask/files/requirements.txt b/be-python-flask/files/requirements.txt index ad074ba4c..9e4644e18 100644 --- a/be-python-flask/files/requirements.txt +++ b/be-python-flask/files/requirements.txt @@ -1,2 +1,2 @@ -gunicorn==20.23.0 +gunicorn==20.1.0 flask==2.3.2 From 80ef3afcfb2325ffa3b7b64e3279f00eea28d1aa Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Mon, 29 May 2023 10:27:31 +0200 Subject: [PATCH 08/15] restore agent --- be-python-flask/Jenkinsfile | 2 +- be-python-flask/Jenkinsfile.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/be-python-flask/Jenkinsfile b/be-python-flask/Jenkinsfile index 90ff6f16a..5c18f8bc7 100644 --- a/be-python-flask/Jenkinsfile +++ b/be-python-flask/Jenkinsfile @@ -15,7 +15,7 @@ node { library("ods-jenkins-shared-library@${sharedLibraryRef}") odsQuickstarterPipeline( - imageStreamTag: "${odsNamespace}/jenkins-agent-python:3.11", + imageStreamTag: "${odsNamespace}/jenkins-agent-python:${agentImageTag}", ) { context -> odsQuickstarterStageCopyFiles(context) diff --git a/be-python-flask/Jenkinsfile.template b/be-python-flask/Jenkinsfile.template index 6bf4ba2f9..ec22dd21a 100644 --- a/be-python-flask/Jenkinsfile.template +++ b/be-python-flask/Jenkinsfile.template @@ -3,7 +3,7 @@ @Library('ods-jenkins-shared-library@@shared_library_ref@') _ odsComponentPipeline( - imageStreamTag: '@ods_namespace@/jenkins-agent-python:3.11', + imageStreamTag: '@ods_namespace@/jenkins-agent-python:@agent_image_tag@', branchToEnvironmentMapping: [ 'master': 'dev', // 'release/': 'test' From a33809e83e28e703de39431b64772ff3ffb8a06a Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Mon, 29 May 2023 10:35:30 +0200 Subject: [PATCH 09/15] use proper version in qs --- be-python-flask/Jenkinsfile.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/be-python-flask/Jenkinsfile.template b/be-python-flask/Jenkinsfile.template index ec22dd21a..4fe1df37a 100644 --- a/be-python-flask/Jenkinsfile.template +++ b/be-python-flask/Jenkinsfile.template @@ -50,7 +50,7 @@ def stageTestSuite(def context) { def status = sh( script: """ . ./testsuite/bin/activate - PYTHONPATH=src python -m pytest --junitxml=tests.xml -o junit_family=xunit2 --cov-report term-missing --cov-report xml --cov=src -o testpaths=tests + PYTHONPATH=src python3.11 -m pytest --junitxml=tests.xml -o junit_family=xunit2 --cov-report term-missing --cov-report xml --cov=src -o testpaths=tests mv tests.xml ${testLocation} mv coverage.xml ${coverageLocation} mv .coverage ${coverageLocation} From 8a9070a8770e300d35d6c191749aac3b2b18c32b Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Mon, 29 May 2023 10:51:37 +0200 Subject: [PATCH 10/15] update streamlit qs --- CHANGELOG.md | 1 + ds-streamlit/Jenkinsfile.template | 2 +- ds-streamlit/files/docker_streamlit/Dockerfile | 2 +- ds-streamlit/files/requirements.txt | 6 +++--- ds-streamlit/files/test_requirements.txt | 10 +++++----- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcf4edcf4..e0ea242a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Scala maintenance ([#879](https://github.com/opendevstack/ods-quickstarters/issues/879)) - Ionic maintenance ([#899](https://github.com/opendevstack/ods-quickstarters/issues/899)) - Update of Maven agent, Java and Spock/Geb quickstarter ([#878](https://github.com/opendevstack/ods-quickstarters/issues/878)) +- Update of Python agent, Python and Streamlit quickstarter ([#902](https://github.com/opendevstack/ods-quickstarters/issues/902)) ## [4.1] - 2022-11-17 diff --git a/ds-streamlit/Jenkinsfile.template b/ds-streamlit/Jenkinsfile.template index 5c39e6f98..9a166edc2 100644 --- a/ds-streamlit/Jenkinsfile.template +++ b/ds-streamlit/Jenkinsfile.template @@ -33,7 +33,7 @@ def createTestVirtualenv(def context) { stage('Create virtualenv for tests') { sh( script: """ - python3.9 -m venv testvenv + python3.11 -m venv testvenv . ./testvenv/bin/activate pip install --upgrade pip pip install -r test_requirements.txt diff --git a/ds-streamlit/files/docker_streamlit/Dockerfile b/ds-streamlit/files/docker_streamlit/Dockerfile index 7f4c102d1..271c6f5b6 100644 --- a/ds-streamlit/files/docker_streamlit/Dockerfile +++ b/ds-streamlit/files/docker_streamlit/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi9/python-39 +FROM registry.access.redhat.com/ubi9/python-311 ARG nexusHostWithBasicAuth ARG nexusHostWithoutScheme diff --git a/ds-streamlit/files/requirements.txt b/ds-streamlit/files/requirements.txt index fe85f07fb..c7ddc09d0 100644 --- a/ds-streamlit/files/requirements.txt +++ b/ds-streamlit/files/requirements.txt @@ -1,3 +1,3 @@ -streamlit==1.18.1 -plotly==5.12.0 -pandas==1.5.3 +streamlit==1.22.0 +plotly==5.14.1 +pandas==2.0.2 diff --git a/ds-streamlit/files/test_requirements.txt b/ds-streamlit/files/test_requirements.txt index 2655fb822..ca60e2e74 100644 --- a/ds-streamlit/files/test_requirements.txt +++ b/ds-streamlit/files/test_requirements.txt @@ -1,7 +1,7 @@ -r ./requirements.txt -mypy==0.982 -flake8==5.0.4 -pytest==7.2.1 -pytest-cov==4.0.0 -black==23.1.0 +mypy==1.3.0 +flake8==6.0.0 +pytest==7.3.1 +pytest-cov==4.1.0 +black==23.3.0 From e0fc187fe534470d938d7ba7d4b8e3f301bf8614 Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Mon, 29 May 2023 10:55:32 +0200 Subject: [PATCH 11/15] test streamlit --- ds-streamlit/Jenkinsfile | 2 +- ds-streamlit/Jenkinsfile.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ds-streamlit/Jenkinsfile b/ds-streamlit/Jenkinsfile index 99f1a3801..f983dc3be 100644 --- a/ds-streamlit/Jenkinsfile +++ b/ds-streamlit/Jenkinsfile @@ -15,7 +15,7 @@ node { library("ods-jenkins-shared-library@${agentImageTag}") odsQuickstarterPipeline( - imageStreamTag: "${odsNamespace}/jenkins-agent-python:${odsImageTag}", + imageStreamTag: "${odsNamespace}/jenkins-agent-python:3.11", ) { context -> odsQuickstarterStageCopyFiles(context) diff --git a/ds-streamlit/Jenkinsfile.template b/ds-streamlit/Jenkinsfile.template index 9a166edc2..b1a78dd6d 100644 --- a/ds-streamlit/Jenkinsfile.template +++ b/ds-streamlit/Jenkinsfile.template @@ -3,7 +3,7 @@ @Library('ods-jenkins-shared-library@@ods_git_ref@') _ odsComponentPipeline( - imageStreamTag: '@ods_namespace@/jenkins-agent-python:@ods_image_tag@', + imageStreamTag: '@ods_namespace@/jenkins-agent-python:3.11', branchToEnvironmentMapping: [ 'master': 'dev', // 'release/': 'test' From 0d0dfc9380b727720ee627c6818e716362190c35 Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Mon, 29 May 2023 11:24:06 +0200 Subject: [PATCH 12/15] restore test and update toml file --- ds-streamlit/Jenkinsfile | 2 +- ds-streamlit/Jenkinsfile.template | 2 +- ds-streamlit/files/pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ds-streamlit/Jenkinsfile b/ds-streamlit/Jenkinsfile index f983dc3be..99f1a3801 100644 --- a/ds-streamlit/Jenkinsfile +++ b/ds-streamlit/Jenkinsfile @@ -15,7 +15,7 @@ node { library("ods-jenkins-shared-library@${agentImageTag}") odsQuickstarterPipeline( - imageStreamTag: "${odsNamespace}/jenkins-agent-python:3.11", + imageStreamTag: "${odsNamespace}/jenkins-agent-python:${odsImageTag}", ) { context -> odsQuickstarterStageCopyFiles(context) diff --git a/ds-streamlit/Jenkinsfile.template b/ds-streamlit/Jenkinsfile.template index b1a78dd6d..9a166edc2 100644 --- a/ds-streamlit/Jenkinsfile.template +++ b/ds-streamlit/Jenkinsfile.template @@ -3,7 +3,7 @@ @Library('ods-jenkins-shared-library@@ods_git_ref@') _ odsComponentPipeline( - imageStreamTag: '@ods_namespace@/jenkins-agent-python:3.11', + imageStreamTag: '@ods_namespace@/jenkins-agent-python:@ods_image_tag@', branchToEnvironmentMapping: [ 'master': 'dev', // 'release/': 'test' diff --git a/ds-streamlit/files/pyproject.toml b/ds-streamlit/files/pyproject.toml index 73708343c..c1f6dce34 100644 --- a/ds-streamlit/files/pyproject.toml +++ b/ds-streamlit/files/pyproject.toml @@ -4,7 +4,7 @@ # https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml-file [tool.mypy] -python_version = 3.9 +python_version = 3.11 warn_unused_configs = true disallow_untyped_calls = true # Disallow calling functions without type annotations from functions with type annotations (inverse: __allow_untyped_calls) disallow_untyped_defs=true # Disallow defining functions without type annotations or with incomplete type annotations (inverse: __allow_untyped_defs) From 7d49d06bb45fa464781d76102a50f11ea7d65b66 Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Mon, 29 May 2023 16:06:44 +0200 Subject: [PATCH 13/15] update Juyter qs and python related documentation --- CHANGELOG.md | 2 +- docs/modules/quickstarters/nav.adoc | 1 + .../modules/quickstarters/pages/be-python-flask.adoc | 12 ++++++------ docs/modules/quickstarters/pages/ds-jupyter-lab.adoc | 2 +- docs/modules/quickstarters/pages/ds-streamlit.adoc | 6 +++--- ds-jupyter-lab/files/docker_jupyterlab/Dockerfile | 2 +- .../files/docker_jupyterlab/requirements.txt | 4 ++-- 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0ea242a8..7acf9ed9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ - Scala maintenance ([#879](https://github.com/opendevstack/ods-quickstarters/issues/879)) - Ionic maintenance ([#899](https://github.com/opendevstack/ods-quickstarters/issues/899)) - Update of Maven agent, Java and Spock/Geb quickstarter ([#878](https://github.com/opendevstack/ods-quickstarters/issues/878)) -- Update of Python agent, Python and Streamlit quickstarter ([#902](https://github.com/opendevstack/ods-quickstarters/issues/902)) +- Update of Python agent, Python, Streamlit and Jupyter quickstarters ([#902](https://github.com/opendevstack/ods-quickstarters/issues/902)) ## [4.1] - 2022-11-17 diff --git a/docs/modules/quickstarters/nav.adoc b/docs/modules/quickstarters/nav.adoc index 72ee13afb..ca4754081 100644 --- a/docs/modules/quickstarters/nav.adoc +++ b/docs/modules/quickstarters/nav.adoc @@ -10,6 +10,7 @@ ** xref:quickstarters:fe-ionic.adoc[FE Ionic] ** xref:quickstarters:ds-jupyter-lab.adoc[Data Science Jupyter Lab] ** xref:quickstarters:ds-rshiny.adoc[Data Science RShiny app] +** xref:quickstarters:ds-streamlit.adoc[Data Science Streamlit app] ** xref:quickstarters:e2e-cypress.adoc[Cypress E2E testing] ** xref:quickstarters:e2e-spock-geb.adoc[Spock, Geb and Unirest E2E testing] ** xref:quickstarters:inf-terraform-aws.adoc[INF Terraform AWS] diff --git a/docs/modules/quickstarters/pages/be-python-flask.adoc b/docs/modules/quickstarters/pages/be-python-flask.adoc index eae24e91c..1d3e68d25 100644 --- a/docs/modules/quickstarters/pages/be-python-flask.adoc +++ b/docs/modules/quickstarters/pages/be-python-flask.adoc @@ -34,7 +34,7 @@ It contains the basic setup for Docker, Jenkins, SonarQube and OpenShift. == Frameworks used -* https://docs.python.org/3.9[Python 3.9] +* https://docs.python.org/3.11[Python 3.11] * https://gunicorn.org/[gunicorn] * http://flask.pocoo.org/[flask] * https://docs.pytest.org/en/stable/[pytest] @@ -47,9 +47,9 @@ The project is production ready when deployed in OpenShift thanks to gunicorn. It is strongly recommended when you are developing a Python project to use separated environments. For this purpose usually one can use Python's -https://docs.python.org/3.9/library/venv.html[venv] core package (check how to use it in the next steps). +https://docs.python.org/3.11/library/venv.html[venv] core package (check how to use it in the next steps). -NOTE: since the version of Python is 3.9, ensure your system's python executable is also in version 3.9 +NOTE: since the version of Python is 3.11, ensure your system's python executable is also in version 3.11 [source,bash] ---- @@ -115,16 +115,16 @@ The Jenkinsfile is provisioned with this quick starter to ease CI/CD process. In This quickstarter uses https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/python[Python] builder agent Jenkins builder agent. -**NOTE**: The ODS Jenkins Pytnon Agent supports Python versions 3.9, 3.8 and 3.6. See next chapter for further information. +**NOTE**: The ODS Jenkins Pytnon Agent supports Python versions 3.11, 3.9, 3.8 and 3.6. See next chapter for further information. == Multiple Python versions support -Build and run environment defaults to python3.9, but older python3.8 and python3.6 versions are also supported. +Build and run environment defaults to python3.11, but older python3.8 and python3.6 versions are also supported. If you need older versions support in your project, change: -* in the provided `Jenkinsfile`, the mentions of `python3.9` binary to, for example, `python3.8` binary, +* in the provided `Jenkinsfile`, the mentions of `python3.11` binary to, for example, `python3.9` binary, * and switch the `FROM` statement in your `Dockerfile` to the python version required, for example, `registry.access.redhat.com/ubi8/python-38`. diff --git a/docs/modules/quickstarters/pages/ds-jupyter-lab.adoc b/docs/modules/quickstarters/pages/ds-jupyter-lab.adoc index 480b7fbd7..b478965e2 100644 --- a/docs/modules/quickstarters/pages/ds-jupyter-lab.adoc +++ b/docs/modules/quickstarters/pages/ds-jupyter-lab.adoc @@ -20,7 +20,7 @@ Provision a shared Jupyter Lab within OpenShift for rapid prototyping of data sc == Frameworks used -* https://docs.python.org/3.9[Python 3.9] +* https://docs.python.org/3.11[Python 3.11] * https://jupyterlab.readthedocs.io/en/stable/[JupyterLab] == Usage - how do you start after you provisioned this quickstarter diff --git a/docs/modules/quickstarters/pages/ds-streamlit.adoc b/docs/modules/quickstarters/pages/ds-streamlit.adoc index 680204830..82a89b0b6 100644 --- a/docs/modules/quickstarters/pages/ds-streamlit.adoc +++ b/docs/modules/quickstarters/pages/ds-streamlit.adoc @@ -34,7 +34,7 @@ Provisions a streamlit based dashboard with authentication. == Frameworks used -* https://docs.python.org/3.9[Python 3.9] +* https://docs.python.org/3.11[Python 3.11] * https://docs.streamlit.io/library/changelog[streamlit] * https://pandas.pydata.org/[pandas] * https://plotly.com/python/[plotly] @@ -45,9 +45,9 @@ The quickstarter sets up in OpenShift a pod with two containers. The main `ds-st It is strongly recommended when you are developing a Python project to use separated environments. For this purpose usually one can use Python's -https://docs.python.org/3.9/library/venv.html[venv] core package (check how to use it in the next steps). +https://docs.python.org/3.11/library/venv.html[venv] core package (check how to use it in the next steps). -NOTE: since the version of Python is 3.9, ensure your system's python executable is also in version 3.9 +NOTE: since the version of Python is 3.11, ensure your system's python executable is also in version 3.11 [source,bash] ---- diff --git a/ds-jupyter-lab/files/docker_jupyterlab/Dockerfile b/ds-jupyter-lab/files/docker_jupyterlab/Dockerfile index e0c3402d0..328455c56 100644 --- a/ds-jupyter-lab/files/docker_jupyterlab/Dockerfile +++ b/ds-jupyter-lab/files/docker_jupyterlab/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi9/python-39 +FROM registry.access.redhat.com/ubi9/python-311 ARG nexusHostWithBasicAuth ARG nexusHostWithoutScheme diff --git a/ds-jupyter-lab/files/docker_jupyterlab/requirements.txt b/ds-jupyter-lab/files/docker_jupyterlab/requirements.txt index ee33a9ba3..d4648782c 100644 --- a/ds-jupyter-lab/files/docker_jupyterlab/requirements.txt +++ b/ds-jupyter-lab/files/docker_jupyterlab/requirements.txt @@ -1,3 +1,3 @@ jupyter==1.0.0 -ipywidgets==8.0.2 -jupyterlab==3.5.0 +ipywidgets==8.0.6 +jupyterlab==4.0.0 From 42dc2b09786e53f66cf2361989fbf69751a824cd Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Mon, 29 May 2023 16:12:13 +0200 Subject: [PATCH 14/15] add Streamlit to index doc --- docs/modules/quickstarters/pages/index.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/modules/quickstarters/pages/index.adoc b/docs/modules/quickstarters/pages/index.adoc index 261583cd0..0a447eaa9 100644 --- a/docs/modules/quickstarters/pages/index.adoc +++ b/docs/modules/quickstarters/pages/index.adoc @@ -37,6 +37,7 @@ Quickstarters are used from the https://github.com/opendevstack/ods-provisioning === Data Science Quickstarter * xref::ds-jupyter-lab.adoc[Data Science - Jupyter Lab] * xref::ds-rshiny.adoc[Data Science - R-Shiny] +* xref::ds-streamlit.adoc[Data Science Streamlit app] === E2E Test Quickstarter * xref::e2e-cypress.adoc[E2E test - Cypress] From 3e4d64e58384ae840f843dc0fd6398c19a17a37c Mon Sep 17 00:00:00 2001 From: "Vazquez,Brais (IT EDP)" Date: Mon, 29 May 2023 17:22:28 +0200 Subject: [PATCH 15/15] add notice for python on agent and remove from quickstarter --- docs/modules/jenkins-agents/pages/python.adoc | 4 +++- docs/modules/quickstarters/pages/be-python-flask.adoc | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/modules/jenkins-agents/pages/python.adoc b/docs/modules/jenkins-agents/pages/python.adoc index 1b83dfbd6..80587bc61 100644 --- a/docs/modules/jenkins-agents/pages/python.adoc +++ b/docs/modules/jenkins-agents/pages/python.adoc @@ -6,7 +6,9 @@ This agent is used to build / execute Python code. The image is built in the global `ods` project and is named `jenkins-agent-python`. It can be referenced in a `Jenkinsfile` with `ods/jenkins-agent-python`. -It supports building on **Python** versions: **3.9, 3.8 and 3.6**. +It supports building on **Python** versions: **3.11, 3.9, 3.8 and 3.6**. + +**NOTE**: Python 3.6 have reached EOL on 2021-12-23. See https://devguide.python.org/versions/[Python versions] for further information. == Features 1. https://docs.python.org/[Python] diff --git a/docs/modules/quickstarters/pages/be-python-flask.adoc b/docs/modules/quickstarters/pages/be-python-flask.adoc index 1d3e68d25..003463852 100644 --- a/docs/modules/quickstarters/pages/be-python-flask.adoc +++ b/docs/modules/quickstarters/pages/be-python-flask.adoc @@ -115,7 +115,7 @@ The Jenkinsfile is provisioned with this quick starter to ease CI/CD process. In This quickstarter uses https://github.com/opendevstack/ods-quickstarters/tree/master/common/jenkins-agents/python[Python] builder agent Jenkins builder agent. -**NOTE**: The ODS Jenkins Pytnon Agent supports Python versions 3.11, 3.9, 3.8 and 3.6. See next chapter for further information. +**NOTE**: The ODS Jenkins Pytnon Agent supports Python versions 3.11, 3.9 and 3.8. See next chapter for further information. == Multiple Python versions support