From 8aa4a76861ebcb39f96f7fe78fc564ba9038d85e Mon Sep 17 00:00:00 2001 From: Ivan Podkidyshev Date: Tue, 30 Jun 2026 16:48:08 +0200 Subject: [PATCH 1/3] targeting python 3.14 + smoke tests for 3.10 and 3.14 --- .github/workflows/ci.yml | 60 ++++++++++++++++++++++++++++------------ .python-version | 2 +- doc/index.rst | 6 +++- pyproject.toml | 7 +++++ 4 files changed, 55 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b7bb7add..af7b8076f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 + with: + python-version-file: .python-version - name: Install uv uses: astral-sh/setup-uv@v5 @@ -23,18 +25,18 @@ jobs: enable-cache: true - name: Install dependencies - run: uv sync --extra dev --extra docs + run: uv sync --locked --extra dev --extra docs - name: Run linting via pre-commit - run: uv run pre-commit run --all-files --show-diff-on-failure + run: uv run --locked pre-commit run --all-files --show-diff-on-failure - name: Build documentation run: | set -eE set -o pipefail - cd doc - make html + uv run --locked --extra docs sphinx-build -M html "doc" "doc/_build" + touch doc/_build/html/.nojekyll test: name: Run pytest @@ -43,7 +45,7 @@ jobs: strategy: matrix: - python-version: ["3.10", "3.12"] + python-version: ["3.14"] fail-fast: false steps: @@ -63,49 +65,71 @@ jobs: enable-cache: true - name: Install dependencies - run: uv sync --python ${{ matrix.python-version }} --extra dev + run: uv sync --locked --python ${{ matrix.python-version }} --extra dev - name: Run pytest run: | set -eEx set -o pipefail - uv run --python ${{ matrix.python-version }} --extra dev python -m pytest -vv --cov + uv run --locked --python ${{ matrix.python-version }} --extra dev python -m pytest -vv --cov # <100% coverage might indicate that some tests are not doing what they should, # but realistically, it might too hard to reach, so lower it a bit # (at the moment of writing, it is 99.95%) - uv run --python ${{ matrix.python-version }} --extra dev coverage report --include='tests/*' --precision=2 --fail-under=97.00 + uv run --locked --python ${{ matrix.python-version }} --extra dev coverage report --include='tests/*' --precision=2 --fail-under=97.00 + + uv run --locked --python ${{ matrix.python-version }} --extra dev python -m pytest --dead-fixtures + + uv run --locked --python ${{ matrix.python-version }} --extra dev python -m pytest -vv -m ci_only + + smoke: + name: Smoke test + + runs-on: ubuntu-latest - uv run --python ${{ matrix.python-version }} --extra dev python -m pytest --dead-fixtures + strategy: + matrix: + python-version: ["3.10", "3.14"] + fail-fast: false - uv run --python ${{ matrix.python-version }} --extra dev python -m pytest -vv -m ci_only + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} - name: Test local installation run: | set -eE set -o pipefail - uv pip install --system . - uv pip uninstall --system cloudai - uv pip install --system -e . + python -m venv .smoke-venv + .smoke-venv/bin/python -m pip install . + .smoke-venv/bin/python -m pip uninstall --yes cloudai + .smoke-venv/bin/python -m pip install --editable . - name: Test commands run: | set -eEx set -o pipefail - cloudai --help + .smoke-venv/bin/cloudai --help # this checks that all TOMLs are valid, Test Scenarios are checked for _all_ tests - cloudai verify-configs conf/ + .smoke-venv/bin/cloudai verify-configs conf/ # this checks that all TOMLs are valid, Test Scenarios are checked _only_ the tests in the specified directory - cloudai verify-configs --tests-dir conf/common/test conf/common - cloudai verify-configs --tests-dir conf/release/spcx/l40s/test conf/release/spcx/l40s + .smoke-venv/bin/cloudai verify-configs --tests-dir conf/common/test conf/common + .smoke-venv/bin/cloudai verify-configs --tests-dir conf/release/spcx/l40s/test conf/release/spcx/l40s # set monitor_interval to 1 to speed up the test sed -i '/scheduler =/a monitor_interval = 1' conf/common/system/example_slurm_cluster.toml - cloudai dry-run --system-config conf/common/system/example_slurm_cluster.toml \ + .smoke-venv/bin/cloudai dry-run --system-config conf/common/system/example_slurm_cluster.toml \ --tests-dir conf/common/test/ \ --test-scenario conf/common/test_scenario/sleep.toml \ --output-dir ./results diff --git a/.python-version b/.python-version index c8cfe3959..6324d401a 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.10 +3.14 diff --git a/doc/index.rst b/doc/index.rst index cb1f715c8..f124c8ecc 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -30,6 +30,8 @@ This document contains the following chapters: Getting Started --------------- +CloudAI officially targets Python 3.14 while remaining compatible with Python 3.10 and newer. + .. code-block:: bash git clone git@github.com:NVIDIA/cloudai.git @@ -43,7 +45,9 @@ Getting Started pip-based Installation ~~~~~~~~~~~~~~~~~~~~~~~ -See the required Python version in the ``.python-version`` file and make sure you have it installed (For installation, see :ref:`install-custom-python-version`). Follow these steps: +See the preferred Python version in the ``.python-version`` file and make sure you have it installed +(For installation, see :ref:`install-custom-python-version`). Python 3.10 and newer remain supported. +Follow these steps: .. code-block:: bash diff --git a/pyproject.toml b/pyproject.toml index 398326fc3..bc77a9721 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,13 @@ dependencies = [ "huggingface-hub~=1.4", ] requires-python = ">=3.10" +classifiers = [ + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", +] [project.scripts] cloudai = "cloudai.cli:main" From fe2531c3f3741c00fe94ee33018b36a02aee0f8b Mon Sep 17 00:00:00 2001 From: Ivan Podkidyshev Date: Tue, 30 Jun 2026 16:57:03 +0200 Subject: [PATCH 2/3] remain compatible for this pr with gh ruleset --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af7b8076f..79e7fccdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: strategy: matrix: - python-version: ["3.14"] + python-version: ["3.10", "3.12", "3.14"] fail-fast: false steps: From 737f3cc15e0ec54563891973d0851c54eb31ded3 Mon Sep 17 00:00:00 2001 From: Ivan Podkidyshev Date: Wed, 1 Jul 2026 12:50:07 +0200 Subject: [PATCH 3/3] update doc --- doc/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/index.rst b/doc/index.rst index f124c8ecc..48fb1332d 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -53,7 +53,7 @@ Follow these steps: git clone git@github.com:NVIDIA/cloudai.git cd cloudai - python -m venv venv + python3.14 -m venv venv source venv/bin/activate pip install -e .