-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
119 lines (110 loc) · 3.18 KB
/
Copy pathpyproject.toml
File metadata and controls
119 lines (110 loc) · 3.18 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "histalign"
dynamic = ["version"]
description = 'Processing workflow for histological image alignments to the Allen CCF.'
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
keywords = []
authors = [
{ name = "Olivier Delrée", email = "olivierdelree@protonmail.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"allensdk",
"click",
"h5py",
"imagecodecs",
"matplotlib",
"numpy",
"opencv-python",
"psutil",
"pyside6",
"pynrrd",
"pydantic",
"readlif",
"scikit-image",
"tifffile",
"vedo",
]
[project.urls]
Documentation = "https://github.com/olivierdelree/histalign#readme"
Issues = "https://github.com/olivierdelree/histalign/issues"
Source = "https://github.com/olivierdelree/histalign"
[project.scripts]
histalign = "histalign:histalign"
[tool.hatch.version]
path = "src/histalign/__about__.py"
[dependency-groups]
dev = [
{ include-group = "docs" },
{ include-group = "test" },
{ include-group = "type" },
"jupyter",
]
docs = [
"griffe-pydantic",
"mkdocs",
"mkdocs-caption",
"mkdocs-click",
"mkdocs-gen-files",
"mkdocs-literate-nav",
"mkdocs-material",
"mkdocs-section-index",
"mkdocstrings-python",
]
test = [
"pytest",
]
type = [
"mypy",
]
[tool.hatch.envs.default]
path = ".venv" # Use the environment provided by uv
[tool.hatch.envs.default.scripts]
docs-build = "mkdocs build --clean --strict"
docs-serve = "mkdocs serve --dev-addr localhost:8888"
test-run = "pytest --ignore=tests/backend/registration/resources/re_baseline_test.py {args:tests}"
type-check = "mypy --install-types --non-interactive {args:src/histalign}"
type-hunt = "check 2>&1 > /dev/null | grep 'src/histalign' | cut -d ':' -f 1 | uniq -c | sort -r"
type-fewest = "hunt | awk 'END{{print}}' | rev | cut -d ' ' -f 1 | rev"
# Very ugly, no sure how to have script expansion after the first word of a script.
# This prints the errors for the file with the fewest errors and copies the path to the WSL clipboard.
type-next = """
mypy --install-types --non-interactive \
$(bash -c "mypy --install-types --non-interactive src/histalign 2>&1 > /dev/null \
| grep 'src/histalign' | cut -d ':' -f 1 | uniq -c | sort -r \
| awk 'END{{print}}' | rev | cut -d ' ' -f 1 | rev | tr -d '\n' | tee >(clip.exe)")
"""
# Same but without copying, dropping bash and WSL dependencies
type-next-no-copy = """
mypy --install-types --non-interactive \
$(mypy --install-types --non-interactive src/histalign 2>&1 > /dev/null \
| grep 'src/histalign' | cut -d ':' -f 1 | uniq -c | sort -r \
| awk 'END{{print}}' | rev | cut -d ' ' -f 1 | rev)
"""
[tool.mypy]
ignore_missing_imports = true
follow_imports = "normal"
pretty = true
allow_redefinition = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
disable_error_code = [
"call-overload",
]
[tool.pytest.ini_options]
filterwarnings = [
"ignore:(?i).*swig.*:DeprecationWarning"
]