Skip to content
Draft
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
18 changes: 16 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,28 @@ jobs:
cache-dependency-glob: uv.lock
- uses: actions/setup-python@v7
with:
python-version-file: pyproject.toml
python-version: 3.14t

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this change in all workflows that use actions/setup-python.

Suggested change
python-version: 3.14t
python-version-file: 'pyproject.toml'

This will make the diffs smaller in PRs like this one and:

allow-prereleases: true
- run: uv sync --group=test
- name: Run tests
# TODO: #8818 Re-enable quantum tests
# opencv-python is gated out on 3.14t (no cp314t wheel yet), so skip the
# files that import cv2. Pure-Python algorithms in computer_vision/ and
# data_compression/ still run; digital_image_processing/ is almost entirely
# cv2-based so it is skipped as a tree. Re-enable when a cp314t wheel ships.
# --ignore-gil-enabled: some compiled deps (sklearn, xgboost, ...) don't
# yet ship the Py_mod_gil slot, so importing them re-enables the GIL under
# 3.14t. That's an upstream-wheel gap, not our code; the flag lets the suite
# run anyway and pytest-run-parallel still reports which tests are not
# thread-safe. Drop the flag once the scientific stack ships free-threaded wheels.
run: uv run --with=pytest-run-parallel pytest
--iterations=8 --parallel-threads=auto
--iterations=8 --parallel-threads=auto --ignore-gil-enabled
--ignore=computer_vision/cnn_classification.py
--ignore=computer_vision/flip_augmentation.py
--ignore=computer_vision/harris_corner.py
--ignore=computer_vision/mosaic_augmentation.py
--ignore=data_compression/peak_signal_to_noise_ratio.py
--ignore=digital_image_processing/
--ignore=docs/conf.py
--ignore=dynamic_programming/k_means_clustering_tensorflow.py
--ignore=machine_learning/local_weighted_learning/local_weighted_learning.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/directory_writer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v7
with:
python-version-file: pyproject.toml
python-version: 3.14t
allow-prereleases: true
- name: Write DIRECTORY.md
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/project_euler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: astral-sh/setup-uv@v7
- uses: actions/setup-python@v7
with:
python-version-file: pyproject.toml
python-version: 3.14t
allow-prereleases: true
- run: uv sync --group=euler-validate --group=test
- run: uv run pytest --doctest-modules --cov-report=term-missing:skip-covered --cov=project_euler/ project_euler/
Expand All @@ -43,7 +43,7 @@ jobs:
- uses: astral-sh/setup-uv@v7
- uses: actions/setup-python@v7
with:
python-version-file: pyproject.toml
python-version: 3.14t
allow-prereleases: true
- run: uv sync --group=euler-validate --group=test
- run: uv run pytest scripts/validate_solutions.py
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: astral-sh/setup-uv@v7
- uses: actions/setup-python@v7
with:
python-version-file: pyproject.toml
python-version: 3.14t
allow-prereleases: true
- run: uv sync --group=docs
- uses: actions/configure-pages@v6
Expand Down
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ dependencies = [
"lxml>=6",
"matplotlib>=3.9.3",
"numpy>=2.1.3",
"opencv-python>=4.10.0.84",
"pandas>=2.2.3",
"pandas>=2.3.3",
"pillow>=11.3",
"rich>=13.9.4",
"scikit-learn>=1.5.2",
Expand All @@ -42,6 +41,14 @@ docs = [
"sphinx-autoapi>=3.4",
"sphinx-pyproject>=0.3",
]
# opencv-python has no free-threaded (cp314t) wheel yet and fails to build from
# source under 3.14t (CMake), which blocks `uv sync` for every job. Keep it in an
# optional group so the free-threaded CI can install everything else and actually
# run pytest-run-parallel on the pure-Python algorithms. Re-fold into core deps
# once a cp314t wheel ships (upstream: opencv/opencv#27933).
cv = [
"opencv-python>=4.10.0.84",
]
euler-validate = [
"httpx>=0.28.1",
"numpy>=2.1.3",
Expand Down