mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-09-29 05:53:07 +08:00
* ci: switch default Python to free-threaded 3.14t Change the interpreter used across CI workflows from 3.14 to the free-threaded build 3.14t to surface which dependencies and tests are not yet free-threading compatible. Opened as DRAFT for documentation purposes per maintainer request (#15081). * ci(3.14t): gate opencv-python into optional 'cv' group + skip cv2 files opencv-python has no cp314t wheel yet and fails to build from source under free-threaded 3.14t (CMake), blocking uv sync for every job. Move it to an optional [dependency-groups] cv group so the ft CI installs everything else and runs pytest-run-parallel on the pure-Python algorithms. Skip the 20 files that import cv2 (computer_vision augmentations, data_compression PSNR, and the mostly-cv2 digital_image_processing/ tree). Re-fold once a cp314t wheel ships (upstream: opencv/opencv#27933). * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * ci(3.14t): add --ignore-gil-enabled so sklearn/xgboost imports don't abort the run * ci(3.14t): gate qiskit into an optional group like opencv qiskit re-enables the GIL under free-threaded CPython and the team is still scoping free-threading support (Qiskit/qiskit#16893), so move it out of the core deps into an optional 'quantum' group and ignore the one algorithm that imports it (quantum/q_fourier_transform.py) in the 3.14t test run. Mirrors the existing opencv 'cv' carve-out. Per cclauss: default all workflows to 3.14t except tests depending on OpenCV or Qiskit. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * ci: single-source 3.14t via .python-version; declare Free Threading :: 2 - Beta Un-ignore .python-version and pin it to 3.14t, then point all four workflows at python-version-file: .python-version so the free-threaded interpreter is selected from one place. Also add the 'Programming Language :: Python :: Free Threading :: 2 - Beta' trove classifier to document our free-threaded support status per https://py-free-threading.github.io/porting/#define-and-document-thread-safety-guarantees --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
27 lines
977 B
YAML
27 lines
977 B
YAML
# The objective of this GitHub Action is to update the DIRECTORY.md file (if needed)
|
|
# when doing a git push
|
|
name: directory_writer
|
|
on: [push]
|
|
jobs:
|
|
directory_writer:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-python@v7
|
|
with:
|
|
python-version-file: .python-version
|
|
allow-prereleases: true
|
|
- name: Write DIRECTORY.md
|
|
run: |
|
|
scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md
|
|
git config --global user.name "$GITHUB_ACTOR"
|
|
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
|
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
|
|
- name: Update DIRECTORY.md
|
|
run: |
|
|
git add DIRECTORY.md
|
|
git commit -am "updating DIRECTORY.md" || true
|
|
git push --force origin HEAD:$GITHUB_REF || true
|