Skip to content

Commit baa6c2a

Browse files
authored
Merge branch 'master' into test/improve-test-coverage
2 parents c236a80 + 8934bab commit baa6c2a

28 files changed

+393
-67
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,25 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v5
13-
- uses: astral-sh/setup-uv@v6
12+
- run: sudo apt-get update && sudo apt-get install -y libhdf5-dev
13+
- uses: actions/checkout@v6
14+
- uses: astral-sh/setup-uv@v7
1415
with:
1516
enable-cache: true
1617
cache-dependency-glob: uv.lock
1718
- uses: actions/setup-python@v6
1819
with:
19-
python-version: 3.x
20+
python-version: 3.14
2021
allow-prereleases: true
2122
- run: uv sync --group=test
2223
- name: Run tests
2324
# TODO: #8818 Re-enable quantum tests
24-
run: uv run pytest
25+
run: uv run --with=pytest-run-parallel pytest
26+
--iterations=8 --parallel-threads=auto
2527
--ignore=computer_vision/cnn_classification.py
2628
--ignore=docs/conf.py
2729
--ignore=dynamic_programming/k_means_clustering_tensorflow.py
30+
--ignore=machine_learning/local_weighted_learning/local_weighted_learning.py
2831
--ignore=machine_learning/lstm/lstm_prediction.py
2932
--ignore=neural_network/input_data.py
3033
--ignore=project_euler/

.github/workflows/devcontainer_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v5
15+
- uses: actions/checkout@v6
1616
- uses: devcontainers/[email protected]
1717
with:
1818
push: never

.github/workflows/directory_writer.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ jobs:
66
directory_writer:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v5
9+
- uses: actions/checkout@v6
1010
with:
1111
fetch-depth: 0
1212
- uses: actions/setup-python@v6
1313
with:
14-
python-version: 3.x
14+
python-version: 3.14
15+
allow-prereleases: true
1516
- name: Write DIRECTORY.md
1617
run: |
1718
scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md

.github/workflows/project_euler.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,37 @@ jobs:
1414
project-euler:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v5
18-
- uses: astral-sh/setup-uv@v6
17+
- run:
18+
sudo apt-get update && sudo apt-get install -y libtiff5-dev libjpeg8-dev libopenjp2-7-dev
19+
zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk
20+
libharfbuzz-dev libfribidi-dev libxcb1-dev
21+
libxml2-dev libxslt-dev
22+
libhdf5-dev
23+
libopenblas-dev
24+
- uses: actions/checkout@v6
25+
- uses: astral-sh/setup-uv@v7
1926
- uses: actions/setup-python@v6
2027
with:
21-
python-version: 3.x
28+
python-version: 3.14
29+
allow-prereleases: true
2230
- run: uv sync --group=euler-validate --group=test
2331
- run: uv run pytest --doctest-modules --cov-report=term-missing:skip-covered --cov=project_euler/ project_euler/
2432
validate-solutions:
2533
runs-on: ubuntu-latest
2634
steps:
27-
- uses: actions/checkout@v5
28-
- uses: astral-sh/setup-uv@v6
35+
- run:
36+
sudo apt-get update && sudo apt-get install -y libtiff5-dev libjpeg8-dev libopenjp2-7-dev
37+
zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk
38+
libharfbuzz-dev libfribidi-dev libxcb1-dev
39+
libxml2-dev libxslt-dev
40+
libhdf5-dev
41+
libopenblas-dev
42+
- uses: actions/checkout@v6
43+
- uses: astral-sh/setup-uv@v7
2944
- uses: actions/setup-python@v6
3045
with:
31-
python-version: 3.x
46+
python-version: 3.14
47+
allow-prereleases: true
3248
- run: uv sync --group=euler-validate --group=test
3349
- run: uv run pytest scripts/validate_solutions.py
3450
env:

.github/workflows/ruff.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ jobs:
1111
ruff:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v5
15-
- uses: astral-sh/setup-uv@v6
14+
- uses: actions/checkout@v6
15+
- uses: astral-sh/setup-uv@v7
1616
- run: uvx ruff check --output-format=github .

.github/workflows/sphinx.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,18 @@ jobs:
2525
build_docs:
2626
runs-on: ubuntu-24.04-arm
2727
steps:
28-
- uses: actions/checkout@v5
29-
- uses: astral-sh/setup-uv@v6
28+
- run:
29+
sudo apt-get update && sudo apt-get install -y libtiff5-dev libjpeg8-dev libopenjp2-7-dev
30+
zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk
31+
libharfbuzz-dev libfribidi-dev libxcb1-dev
32+
libxml2-dev libxslt-dev
33+
libhdf5-dev
34+
libopenblas-dev
35+
- uses: actions/checkout@v6
36+
- uses: astral-sh/setup-uv@v7
3037
- uses: actions/setup-python@v6
3138
with:
32-
python-version: 3.13
39+
python-version: 3.14
3340
allow-prereleases: true
3441
- run: uv sync --group=docs
3542
- uses: actions/configure-pages@v5

.pre-commit-config.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
ci:
2+
autoupdate_schedule: monthly
3+
14
repos:
25
- repo: https://github.com/pre-commit/pre-commit-hooks
36
rev: v6.0.0
@@ -16,7 +19,7 @@ repos:
1619
- id: auto-walrus
1720

1821
- repo: https://github.com/astral-sh/ruff-pre-commit
19-
rev: v0.13.1
22+
rev: v0.14.7
2023
hooks:
2124
- id: ruff-check
2225
- id: ruff-format
@@ -29,7 +32,7 @@ repos:
2932
- tomli
3033

3134
- repo: https://github.com/tox-dev/pyproject-fmt
32-
rev: v2.6.0
35+
rev: v2.11.1
3336
hooks:
3437
- id: pyproject-fmt
3538

@@ -47,7 +50,7 @@ repos:
4750
- id: validate-pyproject
4851

4952
- repo: https://github.com/pre-commit/mirrors-mypy
50-
rev: v1.18.2
53+
rev: v1.19.0
5154
hooks:
5255
- id: mypy
5356
args:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ We want your work to be readable by others; therefore, we encourage you to note
9999
ruff check
100100
```
101101

102-
- Original code submission require docstrings or comments to describe your work.
102+
- Original code submissions require docstrings or comments to describe your work.
103103

104104
- More on docstrings and comments:
105105

DIRECTORY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@
195195
* [Permutations](data_structures/arrays/permutations.py)
196196
* [Prefix Sum](data_structures/arrays/prefix_sum.py)
197197
* [Product Sum](data_structures/arrays/product_sum.py)
198+
* [Rotate Array](data_structures/arrays/rotate_array.py)
198199
* [Sparse Table](data_structures/arrays/sparse_table.py)
199200
* [Sudoku Solver](data_structures/arrays/sudoku_solver.py)
200201
* Binary Tree
@@ -623,6 +624,7 @@
623624
* [Sequential Minimum Optimization](machine_learning/sequential_minimum_optimization.py)
624625
* [Similarity Search](machine_learning/similarity_search.py)
625626
* [Support Vector Machines](machine_learning/support_vector_machines.py)
627+
* [T Stochastic Neighbour Embedding](machine_learning/t_stochastic_neighbour_embedding.py)
626628
* [Word Frequency Functions](machine_learning/word_frequency_functions.py)
627629
* [Xgboost Classifier](machine_learning/xgboost_classifier.py)
628630
* [Xgboost Regressor](machine_learning/xgboost_regressor.py)

ciphers/gronsfeld_cipher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def gronsfeld(text: str, key: str) -> str:
2020
>>> gronsfeld('yes, ¥€$ - _!@#%?', '')
2121
Traceback (most recent call last):
2222
...
23-
ZeroDivisionError: integer modulo by zero
23+
ZeroDivisionError: division by zero
2424
"""
2525
ascii_len = len(ascii_uppercase)
2626
key_len = len(key)

0 commit comments

Comments
 (0)