Skip to content

Commit 20d8de8

Browse files
committed
DO NOT MERGE: Test Python 3.14
1 parent d9d56b1 commit 20d8de8

26 files changed

+58
-23
lines changed

.github/workflows/build.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,21 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- run:
13+
sudo apt-get update && sudo apt-get install -y libtiff5-dev libjpeg8-dev libopenjp2-7-dev
14+
zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk
15+
libharfbuzz-dev libfribidi-dev libxcb1-dev
16+
libxml2-dev libxslt-dev
17+
libhdf5-dev
18+
libopenblas-dev
1219
- uses: actions/checkout@v4
1320
- uses: astral-sh/setup-uv@v6
1421
with:
1522
enable-cache: true
1623
cache-dependency-glob: uv.lock
1724
- uses: actions/setup-python@v5
1825
with:
19-
python-version: 3.13
26+
python-version: 3.14
2027
allow-prereleases: true
2128
- run: uv sync --group=test
2229
- name: Run tests

.github/workflows/directory_writer.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ jobs:
1111
fetch-depth: 0
1212
- uses: actions/setup-python@v5
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

+18-2
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,37 @@ jobs:
1414
project-euler:
1515
runs-on: ubuntu-latest
1616
steps:
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
1724
- uses: actions/checkout@v4
1825
- uses: astral-sh/setup-uv@v6
1926
- uses: actions/setup-python@v5
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:
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
2742
- uses: actions/checkout@v4
2843
- uses: astral-sh/setup-uv@v6
2944
- uses: actions/setup-python@v5
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/sphinx.yml

+8-1
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+
- 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
2835
- uses: actions/checkout@v4
2936
- uses: astral-sh/setup-uv@v6
3037
- uses: actions/setup-python@v5
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

DIRECTORY.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,6 @@
128128
* [Vigenere Cipher](ciphers/vigenere_cipher.py)
129129
* [Xor Cipher](ciphers/xor_cipher.py)
130130

131-
## Compression
132-
* [Burrows Wheeler](compression/burrows_wheeler.py)
133-
* [Huffman](compression/huffman.py)
134-
* [Lempel Ziv](compression/lempel_ziv.py)
135-
* [Lempel Ziv Decompress](compression/lempel_ziv_decompress.py)
136-
* [Lz77](compression/lz77.py)
137-
* [Peak Signal To Noise Ratio](compression/peak_signal_to_noise_ratio.py)
138-
* [Run Length Encoding](compression/run_length_encoding.py)
139-
140131
## Computer Vision
141132
* [Cnn Classification](computer_vision/cnn_classification.py)
142133
* [Flip Augmentation](computer_vision/flip_augmentation.py)
@@ -181,6 +172,15 @@
181172
* [Volume Conversions](conversions/volume_conversions.py)
182173
* [Weight Conversion](conversions/weight_conversion.py)
183174

175+
## Data Compression
176+
* [Burrows Wheeler](data_compression/burrows_wheeler.py)
177+
* [Huffman](data_compression/huffman.py)
178+
* [Lempel Ziv](data_compression/lempel_ziv.py)
179+
* [Lempel Ziv Decompress](data_compression/lempel_ziv_decompress.py)
180+
* [Lz77](data_compression/lz77.py)
181+
* [Peak Signal To Noise Ratio](data_compression/peak_signal_to_noise_ratio.py)
182+
* [Run Length Encoding](data_compression/run_length_encoding.py)
183+
184184
## Data Structures
185185
* Arrays
186186
* [Equilibrium Index In Array](data_structures/arrays/equilibrium_index_in_array.py)
@@ -1202,6 +1202,8 @@
12021202
* [Sol1](project_euler/problem_234/sol1.py)
12031203
* Problem 301
12041204
* [Sol1](project_euler/problem_301/sol1.py)
1205+
* Problem 345
1206+
* [Sol1](project_euler/problem_345/sol1.py)
12051207
* Problem 493
12061208
* [Sol1](project_euler/problem_493/sol1.py)
12071209
* Problem 551

ciphers/gronsfeld_cipher.py

+1-1
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)

compression/image_data/__init__.py

Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

machine_learning/xgboost_classifier.py

-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ def xgboost(features: np.ndarray, target: np.ndarray) -> XGBClassifier:
4242

4343
def main() -> None:
4444
"""
45-
>>> main()
46-
4745
Url for the algorithm:
4846
https://xgboost.readthedocs.io/en/stable/
4947
Iris type dataset is used to demonstrate algorithm.

maths/largest_of_very_large_numbers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def res(x, y):
1515
>>> res(-1, 5)
1616
Traceback (most recent call last):
1717
...
18-
ValueError: math domain error
18+
ValueError: expected a positive input, got -1
1919
"""
2020
if 0 not in (x, y):
2121
# We use the relation x^y = y*log10(x), where 10 is the base.

maths/radix2_fft.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ class FFT:
4040
4141
Print product
4242
>>> x.product # 2x + 3x^2 + 8x^3 + 4x^4 + 6x^5
43-
[(-0+0j), (2+0j), (3+0j), (8+0j), (6+0j), (8+0j)]
43+
[(-0-0j), (2+0j), (3-0j), (8-0j), (6+0j), (8+0j)]
4444
4545
__str__ test
4646
>>> print(x)
4747
A = 0*x^0 + 1*x^1 + 2*x^0 + 3*x^2
4848
B = 0*x^2 + 1*x^3 + 2*x^4
49-
A*B = 0*x^(-0+0j) + 1*x^(2+0j) + 2*x^(3+0j) + 3*x^(8+0j) + 4*x^(6+0j) + 5*x^(8+0j)
49+
A*B = 0*x^(-0-0j) + 1*x^(2+0j) + 2*x^(3-0j) + 3*x^(8-0j) + 4*x^(6+0j) + 5*x^(8+0j)
5050
"""
5151

5252
def __init__(self, poly_a=None, poly_b=None):

pyproject.toml

+7-3
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@ classifiers = [
1010
]
1111
dependencies = [
1212
"beautifulsoup4>=4.12.3",
13+
"cython>=3.1.0rc2", # For lxml on Python 3.14 pre-release
1314
"fake-useragent>=1.5.1",
1415
"imageio>=2.36.1",
1516
"keras>=3.7",
16-
"lxml>=5.3",
17+
# "lxml>=5.4",
18+
"lxml @ git+https://github.com/lxml/lxml",
1719
"matplotlib>=3.9.3",
1820
"numpy>=2.1.3",
1921
"opencv-python>=4.10.0.84",
2022
"pandas>=2.2.3",
21-
"pillow>=11",
23+
# "pillow>=11",
24+
"pillow @ git+https://github.com/python-pillow/pillow",
2225
"requests>=2.32.3",
2326
"rich>=13.9.4",
2427
"scikit-learn>=1.5.2",
28+
"setuptools",
2529
"sphinx-pyproject>=0.3",
2630
"statsmodels>=0.14.4",
2731
"sympy>=1.13.3",
@@ -187,9 +191,9 @@ autoapi_dirs = [
187191
"boolean_algebra",
188192
"cellular_automata",
189193
"ciphers",
190-
"compression",
191194
"computer_vision",
192195
"conversions",
196+
"data_compression",
193197
"data_structures",
194198
"digital_image_processing",
195199
"divide_and_conquer",

0 commit comments

Comments
 (0)