Skip to content

Commit

Permalink
Expand all our workflows to run on Python version 3.12 Issue #579 (#591)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
l-prr and ggsdc authored Dec 27, 2024
1 parent 161e0d4 commit f879460
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cornflow-client-publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cornflow-publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_cornflow_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_cornflow_dags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_cornflow_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions cornflow-dags/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
22 changes: 11 additions & 11 deletions cornflow-server/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion cornflow-server/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions libs/client/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion libs/client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f879460

Please sign in to comment.