From f879460c63306b57435060b557cfba2d2e1e41b6 Mon Sep 17 00:00:00 2001 From: Luis Pita-Romero <61829118+l-prr@users.noreply.github.com> Date: Fri, 27 Dec 2024 14:24:42 +0100 Subject: [PATCH] Expand all our workflows to run on Python version 3.12 Issue #579 (#591) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update Python version support and dependencies across workflows and requirements files - Updated Python version matrix in GitHub Actions workflows to include Python 3.12. - Upgraded pandas, ortools, pyomo, and other dependencies in requirements files to their latest compatible versions. - Adjusted Python version requirement in setup.py files to require at least Python 3.9. * Update Python version to 3.9 and Airflow version to 2.9.1 across GitHub Actions workflows - Changed Python version from 3.8 to 3.9 in build and publish workflows. - Updated Airflow version from 2.7.1 to 2.9.1 in test workflows for improved compatibility and features. --------- Co-authored-by: Guillermo González-Santander de la Cruz --- .github/workflows/build_docs.yml | 2 +- .../cornflow-client-publish-to-pypi.yml | 4 ++-- .../workflows/cornflow-publish-to-pypi.yml | 4 ++-- .github/workflows/test_cornflow_client.yml | 6 ++--- .github/workflows/test_cornflow_dags.yml | 4 ++-- .github/workflows/test_cornflow_server.yml | 2 +- cornflow-dags/requirements.txt | 6 ++--- cornflow-server/requirements.txt | 22 +++++++++---------- cornflow-server/setup.py | 2 +- libs/client/requirements.txt | 4 ++-- libs/client/setup.py | 2 +- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index 6bb7a59d..70829c84 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/setup-python@v2 with: # Semantic version range syntax or exact version of a Python version - python-version: '3.8' + python-version: '3.9' architecture: 'x64' # Standard drop-in approach that should work for most people. - name: Install dependencies diff --git a/.github/workflows/cornflow-client-publish-to-pypi.yml b/.github/workflows/cornflow-client-publish-to-pypi.yml index 7a1439d8..980d46f9 100644 --- a/.github/workflows/cornflow-client-publish-to-pypi.yml +++ b/.github/workflows/cornflow-client-publish-to-pypi.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: 3.9 - name: Install wheel run: >- python -m diff --git a/.github/workflows/cornflow-publish-to-pypi.yml b/.github/workflows/cornflow-publish-to-pypi.yml index 1d1ae8c9..4f8c93b0 100644 --- a/.github/workflows/cornflow-publish-to-pypi.yml +++ b/.github/workflows/cornflow-publish-to-pypi.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: 3.9 - name: Install wheel run: >- python -m diff --git a/.github/workflows/test_cornflow_client.yml b/.github/workflows/test_cornflow_client.yml index 8e916fe5..c70c4a7b 100644 --- a/.github/workflows/test_cornflow_client.yml +++ b/.github/workflows/test_cornflow_client.yml @@ -29,7 +29,7 @@ jobs: strategy: max-parallel: 21 matrix: - python-version: [ 3.8, 3.9, '3.10', '3.11' ] + python-version: [ 3.9, '3.10', '3.11', '3.12' ] os: [ubuntu-latest, macOS-latest, windows-latest] steps: @@ -59,7 +59,7 @@ jobs: strategy: max-parallel: 21 matrix: - python-version: [3.8, 3.9, '3.10', '3.11'] + python-version: [3.9, '3.10', '3.11', '3.12'] os: [ ubuntu-latest ] steps: @@ -86,7 +86,7 @@ jobs: cd cornflow-server python -m venv afvenv source afvenv/bin/activate - AIRFLOW_VERSION=2.7.1 + AIRFLOW_VERSION=2.9.1 PYTHON_VERSION="$(python3 --version | cut -d " " -f 2 | cut -d "." -f 1-2)" CLIENT_BRANCH="${{ github.head_ref || github.ref_name }}" CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt" diff --git a/.github/workflows/test_cornflow_dags.yml b/.github/workflows/test_cornflow_dags.yml index 9d660d79..8a34c9b2 100644 --- a/.github/workflows/test_cornflow_dags.yml +++ b/.github/workflows/test_cornflow_dags.yml @@ -27,7 +27,7 @@ jobs: strategy: max-parallel: 21 matrix: - python-version: [3.8, 3.9, '3.10', '3.11'] + python-version: [3.9, '3.10', '3.11', '3.12'] os: [ubuntu-latest] steps: @@ -48,7 +48,7 @@ jobs: python -m pip install -U "git+https://github.com/baobabsoluciones/cornflow@${CLIENT_BRANCH}#subdirectory=libs/client" - name: Install airflow run: | - AIRFLOW_VERSION=2.7.1 + AIRFLOW_VERSION=2.9.1 PYTHON_VERSION="$(python3 --version | cut -d " " -f 2 | cut -d "." -f 1-2)" CLIENT_BRANCH="${{ github.head_ref || github.ref_name }}" CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt" diff --git a/.github/workflows/test_cornflow_server.yml b/.github/workflows/test_cornflow_server.yml index 37f6e2fd..8559808a 100644 --- a/.github/workflows/test_cornflow_server.yml +++ b/.github/workflows/test_cornflow_server.yml @@ -29,7 +29,7 @@ jobs: strategy: max-parallel: 21 matrix: - python-version: [3.8, 3.9, '3.10', '3.11', '3.12'] + python-version: [3.9, '3.10', '3.11', '3.12'] os: [ubuntu-latest] services: diff --git a/cornflow-dags/requirements.txt b/cornflow-dags/requirements.txt index f06c51bf..1b7e00f1 100644 --- a/cornflow-dags/requirements.txt +++ b/cornflow-dags/requirements.txt @@ -1,12 +1,12 @@ cornflow-client>=1.1.0 orloge<=0.17.2 PuLP<=2.9.0 -pandas<=2.1.1 +pandas<=2.2.0 hackathonbaobab2020[solvers] pytups<=0.86.2 -ortools<=9.7.2996 +ortools<=9.8.3296 xmltodict<=0.13.0 openpyxl<=3.1.2 -pyomo<=6.6.2 +pyomo<=6.7.0 tsplib95<=0.7.1 numpy<2.0.0 diff --git a/cornflow-server/requirements.txt b/cornflow-server/requirements.txt index 35270077..0c5dc5d9 100644 --- a/cornflow-server/requirements.txt +++ b/cornflow-server/requirements.txt @@ -1,30 +1,30 @@ alembic==1.9.2 -apispec<=6.2.0 -click<=8.1.3 +apispec<=6.3.0 +click<=8.1.7 cornflow-client>=1.1.0 cryptography<=42.0.5 disposable-email-domains>=0.0.86 Flask==2.3.2 flask-apispec<=0.11.4 Flask-Bcrypt<=1.0.1 -Flask-Compress<=1.13 +Flask-Compress<=1.14 flask-cors>=4.0.2 flask-inflate<=0.3 -Flask-Migrate<=4.0.4 -Flask-RESTful<=0.3.9 +Flask-Migrate<=4.0.5 +Flask-RESTful<=0.3.10 Flask-SQLAlchemy==2.5.1 gevent==23.9.1 greenlet<=2.0.2;python_version<"3.11" -greenlet==3.0.0;python_version>="3.11" +greenlet==3.0.3;python_version>="3.11" gunicorn<=22.0.0 -jsonpatch<=1.32 +jsonpatch<=1.33 ldap3<=2.9.1 -marshmallow<=3.19.0 +marshmallow<=3.20.2 PuLP<=2.9.0 -psycopg2<=2.95 -PyJWT<=2.6.0 +psycopg2<=2.9.9 +PyJWT<=2.8.0 pytups>=0.86.2 requests<=2.32.3 SQLAlchemy==1.3.21 -webargs<=8.2.0 +webargs<=8.3.0 Werkzeug==3.0.6 \ No newline at end of file diff --git a/cornflow-server/setup.py b/cornflow-server/setup.py index 0f6a81e2..74f62218 100644 --- a/cornflow-server/setup.py +++ b/cornflow-server/setup.py @@ -24,7 +24,7 @@ "Operating System :: OS Independent", "Development Status :: 5 - Production/Stable", ], - python_requires=">=3.8", + python_requires=">=3.9", entry_points={ "console_scripts": [ "cornflow = cornflow.cli:cli", diff --git a/libs/client/requirements.txt b/libs/client/requirements.txt index 27c7dd93..add95497 100644 --- a/libs/client/requirements.txt +++ b/libs/client/requirements.txt @@ -1,7 +1,7 @@ requests<=2.32.3 genson<=1.2.2 -jsonschema<=4.19.1 -marshmallow<=3.19.0 +jsonschema<=4.21.1 +marshmallow<=3.20.2 pytups<=0.86.2 ortools<=9.8.3296 PuLP<=2.9.0 diff --git a/libs/client/setup.py b/libs/client/setup.py index ebfe1a45..705f6816 100644 --- a/libs/client/setup.py +++ b/libs/client/setup.py @@ -26,7 +26,7 @@ "Operating System :: OS Independent", "Development Status :: 5 - Production/Stable", ], - python_requires=">=3.8", + python_requires=">=3.9", include_package_data=True, install_requires=required, extra_require=extra_required,