Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 42 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,27 @@ 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
with:
enable-cache: true
Comment thread
podkidyshev marked this conversation as resolved.

- 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
Expand All @@ -43,7 +45,7 @@ jobs:

strategy:
matrix:
python-version: ["3.10", "3.12"]
python-version: ["3.10", "3.12", "3.14"]
fail-fast: false

steps:
Expand All @@ -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
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10
3.14
8 changes: 6 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -43,13 +45,15 @@ 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:
Comment thread
coderabbitai[bot] marked this conversation as resolved.

.. code-block:: bash

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 .

Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading