-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
98 lines (88 loc) · 2.75 KB
/
pyproject.toml
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
87
88
89
90
91
92
93
94
95
96
97
98
[project]
name = "giskard-vision"
version = "1.0.0"
description = "The expansion of Giskard into testing computer vision models"
authors = [{ name = "Giskard AI", email = "[email protected]" }]
dependencies = [
"opencv-python",
"numpy<2",
"pillow>=10.4.0",
"scikit-learn>=1.5.1",
"pandas>=2.2.2",
]
requires-python = ">=3.10,<3.12"
readme = "README.md"
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["giskard_vision*"]
exclude = ["docs*", "tests*"]
[tool.setuptools.package-data]
giskard_vision = [
"**/demo/300W/*.png",
"**/demo/300W/*.pts",
"**/demo/ffhq/*.png",
"**/demo/ffhq/*.json",
]
[tool.pdm.scripts]
notebook = "jupyter notebook --ip 0.0.0.0 --port 8888 --no-browser --notebook-dir ./examples --NotebookApp.token=''"
format.cmd = "bash -c 'ruff check ./giskard_vision ./tests --fix && black ./giskard_vision ./examples ./tests && isort ./giskard_vision ./tests'"
check-format.cmd = "bash -c 'ruff check ./giskard_vision ./tests && black --check ./giskard_vision ./examples ./tests && isort --check ./giskard_vision ./tests'"
test.cmd = "pytest tests/ -c pyproject.toml --disable-warnings -vvv --durations=0"
check-notebook = "bash -c 'for dir in $(find ~+/examples -type f -name \"*ipynb\" ! -name \"*scan*\" | sed -E \"s|/[^/]+$||\" |sort -u); do cd $dir && pdm run jupyter nbconvert --to script -y $(ls *.ipynb | grep -v \"scan\") && find . -type f | grep -e \".py$\" | sort | xargs -I {} echo \"pdm run python {} && echo \"Notebook {} OK\" || exit 1\" | sh; done'"
[tool.pdm.dev-dependencies]
dev = [
"face-alignment",
"opencv-contrib-python", # needed for lbfmodel
"notebook",
"matplotlib",
"black[jupyter]>=23.7.0",
"pytest>=7.4.0",
"pip>=23.2.1",
"pre-commit>=2.19.0",
"ruff",
"isort",
"sixdrepnet>=0.1.6",
"deepface==0.0.83",
"pillow>=10.2.0",
"pandas>=2.1.4",
"tensorflow==2.15.1",
"tensorflow-datasets>=4.9.4",
"scipy>=1.11.4",
"tensorflow-io-gcs-filesystem==0.34; platform_machine == 'arm64' and sys_platform == 'darwin'", # The only wheel for ARM64 Mac
"giskard>=2.14.3",
"datasets>=2.20.0",
"pytorch-lightning>=2.3.2",
"albumentations==0.4.6",
"tomli>=2.0.1", # needed for black in py3.10
"exceptiongroup>=1.2.2", # needed for pdm test in py3.10
"pytz>=2024.1",
"transformers>=4.43.4",
]
[tool.ruff]
line-length = 120
ignore = ["E501"]
[tool.isort]
profile = "black"
[tool.black]
# https://github.com/psf/black
target-version = ['py310', 'py311']
line-length = 120
color = true
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| env
| venv
| .history
)/
'''