Skip to content

Commit 26be4f8

Browse files
committed
refactor tests
1 parent 6603cc3 commit 26be4f8

File tree

5 files changed

+113
-379
lines changed

5 files changed

+113
-379
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
!test
2-
README.rst
3-
requirements_optional.txt
2+
uv.lock
43
profile.*
54

65
# DepHell stuff

.pre-commit-config.yaml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,46 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.3.3
3+
rev: v0.9.6
44
hooks:
55
- id: ruff
66
args: [ --fix ]
77
- id: ruff-format
88

99
- repo: https://github.com/RobertCraigie/pyright-python
10-
rev: v1.1.354
10+
rev: v1.1.394
1111
hooks:
1212
- id: pyright
1313

14-
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
15-
rev: v1.3.3
14+
- repo: local
1615
hooks:
17-
- id: python-safety-dependencies-check
18-
files: pyproject.toml
16+
- id: generate requirements
17+
name: generate requirements
18+
entry: uv export --no-hashes --no-dev -o requirements.txt
19+
language: system
20+
pass_filenames: false
21+
- id: safety
22+
name: safety
23+
entry: uv run safety
24+
language: system
25+
pass_filenames: false
26+
- id: make docs
27+
name: make docs
28+
entry: uv run handsdown --cleanup -o documentation/reference
29+
language: system
30+
pass_filenames: false
31+
- id: build package
32+
name: build package
33+
entry: uv build
34+
language: system
35+
pass_filenames: false
36+
- id: pytest
37+
name: pytest
38+
entry: uv run pytest
39+
language: system
40+
pass_filenames: false
1941

2042
- repo: https://github.com/pre-commit/pre-commit-hooks
21-
rev: v4.5.0
43+
rev: v5.0.0
2244
hooks:
2345
- id: trailing-whitespace
2446
- id: end-of-file-fixer
@@ -35,7 +57,7 @@ repos:
3557
- id: mixed-line-ending
3658

3759
- repo: https://github.com/boidolr/pre-commit-images
38-
rev: v1.5.2
60+
rev: v1.8.4
3961
hooks:
4062
- id: optimize-jpg
4163
- id: optimize-png

pyproject.toml

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
[tool.poetry]
1+
[project]
22
name = "blendmodes"
33
version = "2024.1.1"
4-
license = "mit"
54
description = "Use this module to apply a number of blending modes to a background and foreground image"
6-
authors = ["FredHappyface"]
5+
authors = [{ name = "FredHappyface" }]
6+
requires-python = ">=3.9,<4.0"
7+
readme = "README.md"
8+
license = "mit"
79
classifiers = [
810
"Development Status :: 5 - Production/Stable",
911
"Intended Audience :: Developers",
@@ -13,30 +15,28 @@ classifiers = [
1315
"Programming Language :: Python :: Implementation :: CPython",
1416
"Topic :: Multimedia :: Graphics",
1517
"Topic :: Software Development :: Libraries :: Python Modules",
16-
"Topic :: Utilities"
18+
"Topic :: Utilities",
19+
]
20+
dependencies = [
21+
"aenum>=3.1.15",
22+
"numpy>=2.0.2",
23+
"pillow>=10.4.0",
1724
]
18-
homepage = "https://github.com/FHPythonUtils/BlendModes"
19-
repository = "https://github.com/FHPythonUtils/BlendModes"
20-
documentation = "https://github.com/FHPythonUtils/BlendModes/blob/master/README.md"
21-
readme = "README.md"
22-
23-
[tool.poetry.dependencies]
24-
python = ">=3.9,<4.0"
25-
Pillow = "<11,>=10.2.0"
26-
numpy = "<2,>=1.26.4"
27-
aenum = "<4,>=3.1.15"
2825

29-
[tool.poetry.group.dev.dependencies]
30-
imgcompare = "^2.0.1"
31-
pytest = "^8.1.1"
32-
handsdown = "^2.1.0"
33-
coverage = "^7.4.4"
34-
ruff = "^0.3.3"
35-
pyright = "^1.1.354"
26+
[project.urls]
27+
Homepage = "https://github.com/FHPythonUtils/BlendModes"
28+
Repository = "https://github.com/FHPythonUtils/BlendModes"
29+
Documentation = "https://github.com/FHPythonUtils/BlendModes/blob/master/README.md"
3630

37-
[build-system]
38-
requires = ["poetry-core"]
39-
build-backend = "poetry.core.masonry.api"
31+
[dependency-groups]
32+
dev = [
33+
"coverage>=7.6.12",
34+
"handsdown>=2.1.0",
35+
"imgcompare>=2.0.1",
36+
"pyright>=1.1.394",
37+
"pytest>=8.3.4",
38+
"ruff>=0.9.7",
39+
]
4040

4141
[tool.ruff]
4242
line-length = 100
@@ -46,7 +46,6 @@ target-version = "py38"
4646
[tool.ruff.lint]
4747
select = ["ALL"]
4848
ignore = [
49-
"ANN101", # type annotation for self in method
5049
"COM812", # enforce trailing comma
5150
"D2", # pydocstyle formatting
5251
"ISC001",
@@ -87,3 +86,7 @@ deps =
8786
pytest
8887
commands = pytest tests
8988
"""
89+
90+
[build-system]
91+
requires = ["hatchling"]
92+
build-backend = "hatchling.build"

requirements.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
Pillow<11,>=10.2.0
2-
aenum<4,>=3.1.15
3-
numpy<2,>=1.26.4
1+
# This file was autogenerated by uv via the following command:
2+
# uv export --no-hashes --no-dev -o requirements.txt
3+
-e .
4+
aenum==3.1.15
5+
numpy==2.0.2 ; python_full_version < '3.10'
6+
numpy==2.2.3 ; python_full_version >= '3.10'
7+
pillow==10.4.0

0 commit comments

Comments
 (0)