Skip to content

Commit a7d8634

Browse files
committed
rel 2025.1.0
1 parent e13fe8d commit a7d8634

File tree

4 files changed

+282
-0
lines changed

4 files changed

+282
-0
lines changed

Diff for: tests/data/issue_112.toml

+182
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
[build-system]
2+
requires = [
3+
"scikit-build-core>=0.11",
4+
"Cython >=3.0.12, <3.1.0"
5+
]
6+
build-backend = "scikit_build_core.build"
7+
8+
[project]
9+
name = "RapidFuzz"
10+
dynamic = ["version"]
11+
requires-python = ">= 3.9"
12+
authors = [
13+
{name = "Max Bachmann", email = "pypi@maxbachmann.de"},
14+
]
15+
description = "rapid fuzzy string matching"
16+
readme = "README.md"
17+
license = "MIT"
18+
classifiers=[
19+
"Programming Language :: Python :: 3",
20+
"Programming Language :: Python :: 3.9",
21+
"Programming Language :: Python :: 3.10",
22+
"Programming Language :: Python :: 3.11",
23+
"Programming Language :: Python :: 3.12",
24+
"Programming Language :: Python :: 3.13",
25+
]
26+
27+
[project.urls]
28+
Homepage = "https://github.com/rapidfuzz/RapidFuzz"
29+
Documentation = "https://rapidfuzz.github.io/RapidFuzz/"
30+
Repository = "https://github.com/rapidfuzz/RapidFuzz.git"
31+
Issues = "https://github.com/rapidfuzz/RapidFuzz/issues"
32+
Changelog = "https://github.com/rapidfuzz/RapidFuzz/blob/main/CHANGELOG.rst"
33+
34+
[project.optional-dependencies]
35+
all = [
36+
"numpy"
37+
]
38+
39+
[project.entry-points.pyinstaller40]
40+
hook-dirs = "rapidfuzz.__pyinstaller:get_hook_dirs"
41+
tests = "rapidfuzz.__pyinstaller:get_PyInstaller_tests"
42+
43+
[tool.scikit-build]
44+
minimum-version = "build-system.requires"
45+
sdist.include = [
46+
"src/rapidfuzz/*.cxx",
47+
"src/rapidfuzz/distance/*.cxx",
48+
]
49+
sdist.exclude = [
50+
".github"
51+
]
52+
wheel.exclude = [
53+
"**.pyx",
54+
"**.cxx",
55+
"**.pxd",
56+
"**.cpp",
57+
"**.hpp",
58+
"**.h",
59+
"CMakeLists.txt"
60+
]
61+
wheel.packages = ["src/rapidfuzz"]
62+
wheel.cmake = false
63+
messages.after-success = "{yellow}CMake unavailable, falling back to pure Python Extension"
64+
65+
[[tool.scikit-build.overrides]]
66+
if.any.system-cmake = ">=3.15"
67+
if.any.cmake-wheel = true
68+
wheel.cmake = true
69+
messages.after-success = "{green}C++ Extension built successfully"
70+
71+
[[tool.scikit-build.overrides]]
72+
if.failed = true
73+
if.env.CIBUILDWHEEL = false
74+
if.env.CONDA_BUILD = false
75+
if.env.PIWHEELS_BUILD = false
76+
if.env.RAPIDFUZZ_BUILD_EXTENSION = false
77+
wheel.cmake = false
78+
messages.after-success = "{yellow}Failed to build C++ Extension, falling back to pure Python Extension"
79+
80+
[[tool.scikit-build.overrides]]
81+
if.any.env.CIBUILDWHEEL = true
82+
if.any.env.CONDA_BUILD = true
83+
if.any.env.PIWHEELS_BUILD = true
84+
if.any.env.RAPIDFUZZ_BUILD_EXTENSION = true
85+
wheel.cmake = true
86+
messages.after-success = "{green}C++ Extension built successfully"
87+
messages.after-failure = "{red}Failed to build C++ Extension in a packaged build"
88+
89+
[tool.scikit-build.metadata.version]
90+
provider = "scikit_build_core.metadata.regex"
91+
input = "src/rapidfuzz/__init__.py"
92+
93+
94+
[tool.black]
95+
line-length = 120
96+
97+
[tool.mypy]
98+
files = ["src"]
99+
python_version = "3.9"
100+
warn_unused_configs = true
101+
show_error_codes = true
102+
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
103+
strict = true
104+
disallow_untyped_defs = false
105+
106+
[tool.pytest.ini_options]
107+
minversion = "6.0"
108+
testpaths = ["tests"]
109+
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
110+
norecursedirs = ["_skbuild"]
111+
xfail_strict = true
112+
log_cli_level = "info"
113+
114+
[tool.pylint]
115+
py-version = "3.9"
116+
117+
[tool.pylint.reports]
118+
output-format = "colorized"
119+
120+
[tool.pylint.messages_control]
121+
disable = [
122+
"design",
123+
"fixme",
124+
"imports",
125+
"line-too-long",
126+
"imports",
127+
"invalid-name",
128+
"protected-access",
129+
"missing-module-docstring",
130+
]
131+
132+
[tool.ruff]
133+
target-version = "py39"
134+
src = ["src"]
135+
exclude = []
136+
137+
[tool.ruff.lint]
138+
select = [
139+
"E", "F", "W", # flake8
140+
"B", # flake8-bugbear
141+
"I", # isort
142+
"ARG", # flake8-unused-arguments
143+
"C4", # flake8-comprehensions
144+
"EM", # flake8-errmsg
145+
"ICN", # flake8-import-conventions
146+
"ISC", # flake8-implicit-str-concat
147+
"G", # flake8-logging-format
148+
"PGH", # pygrep-hooks
149+
"PIE", # flake8-pie
150+
"PL", # pylint
151+
"PT", # flake8-pytest-style
152+
"PTH", # flake8-use-pathlib
153+
"RET", # flake8-return
154+
"RUF", # Ruff-specific
155+
"SIM", # flake8-simplify
156+
"T20", # flake8-print
157+
"UP", # pyupgrade
158+
"YTT", # flake8-2020
159+
"EXE", # flake8-executable
160+
"NPY", # NumPy specific rules
161+
"PD", # pandas-vet
162+
]
163+
extend-ignore = [
164+
"PLR", # Design related pylint codes
165+
"E501", # Line too long
166+
"PTH123", # use pathlib instead of builtin open
167+
]
168+
unfixable = [
169+
"T20", # Removes print statements
170+
"F841", # Removes unused variables
171+
]
172+
flake8-unused-arguments.ignore-variadic-names = true
173+
isort.required-imports = ["from __future__ import annotations"]
174+
isort.combine-as-imports = true
175+
176+
[tool.ruff.lint.per-file-ignores]
177+
"tests/**" = ["T20"]
178+
"bench/**" = ["T20"]
179+
"tools/**" = ["T20"]
180+
"tools/test_process_typing.py" = ["ARG001"]
181+
"_custom_build/backend.py" = ["T20"]
182+
"setup.py" = ["T20"]

Diff for: tests/data/test_issue_112.txt

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
Info
3+
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
4+
┃ Item ┃ Value ┃
5+
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
6+
│ program │ licensecheck │
7+
│ version │ dev │
8+
│ license │ MIT LICENSE │
9+
│ project_license │ MIT LICENSE │
10+
└─────────────────┴──────────────┘
11+
12+
List Of Packages
13+
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
14+
┃ Compatible ┃ Package ┃ License(s) ┃
15+
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
16+
│ ✔ │ appdirs │ MIT LICENSE │
17+
│ ✔ │ attrs │ MIT LICENSE │
18+
│ ✔ │ boolean-py │ BSD-2-CLAUSE │
19+
│ ✔ │ cattrs │ MIT LICENSE │
20+
│ ✔ │ certifi │ MOZILLA PUBLIC LICENSE 2.0 _MPL 2.0_ │
21+
│ ✔ │ charset-normalizer │ MIT LICENSE │
22+
│ ✔ │ colorama │ BSD LICENSE │
23+
│ ✔ │ fhconfparser │ MIT LICENSE │
24+
│ ✔ │ idna │ BSD LICENSE │
25+
│ ✔ │ license-expression │ APACHE-2.0 │
26+
│ ✔ │ loguru │ MIT LICENSE │
27+
│ ✔ │ markdown │ BSD LICENSE │
28+
│ ✔ │ markdown-it-py │ MIT LICENSE │
29+
│ ✔ │ mdurl │ MIT LICENSE │
30+
│ ✔ │ packaging │ APACHE SOFTWARE LICENSE;; BSD LICENSE │
31+
│ ✔ │ platformdirs │ MIT LICENSE │
32+
│ ✔ │ pygments │ BSD LICENSE │
33+
│ ✔ │ requests │ APACHE SOFTWARE LICENSE │
34+
│ ✔ │ requests-cache │ BSD LICENSE │
35+
│ ✔ │ requirements-parser │ APACHE SOFTWARE LICENSE │
36+
│ ✔ │ rich │ MIT LICENSE │
37+
│ ✔ │ setuptools │ MIT LICENSE │
38+
│ ✔ │ six │ MIT LICENSE │
39+
│ ✔ │ tomli │ MIT LICENSE │
40+
│ ✔ │ types-setuptools │ APACHE SOFTWARE LICENSE │
41+
│ ✔ │ url-normalize │ MIT LICENSE │
42+
│ ✔ │ urllib3 │ MIT LICENSE │
43+
│ ✔ │ uv │ APACHE SOFTWARE LICENSE;; MIT LICENSE │
44+
│ ✔ │ win32-setctime │ MIT LICENSE │
45+
└────────────┴─────────────────────┴───────────────────────────────────────┘
46+

Diff for: tests/data/test_issue_112_expected.txt

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
Info
3+
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
4+
┃ Item ┃ Value ┃
5+
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
6+
│ program │ licensecheck │
7+
│ version │ dev │
8+
│ license │ MIT LICENSE │
9+
│ project_license │ MIT LICENSE │
10+
└─────────────────┴──────────────┘
11+
12+
List Of Packages
13+
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
14+
┃ Compatible ┃ Package ┃ License(s) ┃
15+
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
16+
│ ✔ │ appdirs │ MIT LICENSE │
17+
│ ✔ │ attrs │ MIT LICENSE │
18+
│ ✔ │ boolean-py │ BSD-2-CLAUSE │
19+
│ ✔ │ cattrs │ MIT LICENSE │
20+
│ ✔ │ certifi │ MOZILLA PUBLIC LICENSE 2.0 _MPL 2.0_ │
21+
│ ✔ │ charset-normalizer │ MIT LICENSE │
22+
│ ✔ │ colorama │ BSD LICENSE │
23+
│ ✔ │ fhconfparser │ MIT LICENSE │
24+
│ ✔ │ idna │ BSD LICENSE │
25+
│ ✔ │ license-expression │ APACHE-2.0 │
26+
│ ✔ │ loguru │ MIT LICENSE │
27+
│ ✔ │ markdown │ BSD LICENSE │
28+
│ ✔ │ markdown-it-py │ MIT LICENSE │
29+
│ ✔ │ mdurl │ MIT LICENSE │
30+
│ ✔ │ packaging │ APACHE SOFTWARE LICENSE;; BSD LICENSE │
31+
│ ✔ │ platformdirs │ MIT LICENSE │
32+
│ ✔ │ pygments │ BSD LICENSE │
33+
│ ✔ │ requests │ APACHE SOFTWARE LICENSE │
34+
│ ✔ │ requests-cache │ BSD LICENSE │
35+
│ ✔ │ requirements-parser │ APACHE SOFTWARE LICENSE │
36+
│ ✔ │ rich │ MIT LICENSE │
37+
│ ✔ │ setuptools │ MIT LICENSE │
38+
│ ✔ │ six │ MIT LICENSE │
39+
│ ✔ │ tomli │ MIT LICENSE │
40+
│ ✔ │ types-setuptools │ APACHE SOFTWARE LICENSE │
41+
│ ✔ │ url-normalize │ MIT LICENSE │
42+
│ ✔ │ urllib3 │ MIT LICENSE │
43+
│ ✔ │ uv │ APACHE SOFTWARE LICENSE;; MIT LICENSE │
44+
│ ✔ │ win32-setctime │ MIT LICENSE │
45+
└────────────┴─────────────────────┴───────────────────────────────────────┘
46+

Diff for: tests/test_cli.py

+8
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ def aux_file(file: str) -> str:
5353
},
5454
0,
5555
),
56+
(
57+
{
58+
"pypi_api": "https://pypi.org/",
59+
"file": aux_file("test_issue_112.txt"),
60+
"requirements_paths": ["pyproject.toml"],
61+
},
62+
0,
63+
),
5664
]
5765

5866

0 commit comments

Comments
 (0)