forked from openfoodfacts/openfoodfacts-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
86 lines (77 loc) · 2.13 KB
/
pyproject.toml
File metadata and controls
86 lines (77 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
[project]
name = "openfoodfacts"
version = "4.0.0"
authors = [
{name = "The Open Food Facts team", email = "contact@openfoodfacts.org"}
]
description = "Official Python SDK of Open Food Facts"
readme = "README.md"
license = "MIT"
license-files = [
"LICENSE",
]
requires-python = ">=3.10"
dependencies = [
"requests>=2.20.0",
"pydantic>=2.0.0,<3.0.0",
"tqdm>=4.0.0,<5.0.0",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
[project.urls]
repository = "https://github.com/openfoodfacts/openfoodfacts-python"
[tool.mypy]
ignore_missing_imports = true
[tool.ruff.lint]
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
# "UP",
# flake8-bugbear
"B",
# flake8-simplify
# "SIM",
# isort
"I",
]
[tool.isort] # From https://black.readthedocs.io/en/stable/compatible_configs.html#isort
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 88
[dependency-groups]
dev = [
"requests-mock==1.12.1",
"mypy==1.17.1",
"coverage[toml]==7.13.4",
"pytest==9.0.2",
"types-requests==2.32.4.20260107",
"types-tqdm==4.67.3.20260205",
"types-redis==4.6.0.20240425",
"ruff==0.15.0",
]
[project.optional-dependencies]
redis = ["redis[hiredis]~=7.1.1"]
pillow = ["Pillow>=9.3,<12.2"]
ml = ["tritonclient[grpc]>2.0.0,<3.0.0", "opencv-python-headless>4.0.0,<5.0.0", "Pillow", "albumentations>=2.0.0"]
[tool.pytest.ini_options]
# Use importlib mode as some test names have duplicate basename
# (ex: test_utils.py is both in tests/ml and in tests/unit). See:
# https://docs.pytest.org/en/stable/explanation/pythonpath.html#import-modes
addopts = [
"--import-mode=importlib",
]
# Add the `src` directory to Python path, so that the openfoodfacts module can
# be imported:
# https://docs.pytest.org/en/stable/reference/reference.html#confval-pythonpath
pythonpath = ["src"]