Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
165 lines (146 loc) · 4.53 KB
/
Copy pathpyproject.toml
File metadata and controls
165 lines (146 loc) · 4.53 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# https://peps.python.org/pep-0517/
[build-system]
requires = ["hatchling"] # disable automatic versioning: removed "hatch-vcs"
build-backend = "hatchling.build"
# https://hatch.pypa.io/latest/config/metadata/
# [tool.hatch.version]
# source = "vcs"
# read more about configuring hatch at:
# https://hatch.pypa.io/latest/config/build/
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]
# https://peps.python.org/pep-0621/
[project]
name = "abba-python"
version = "0.25.0"
description = "Aligning Big Brains and Atlases (ABBA), controlled from python."
readme = "README.md"
requires-python = ">=3.10"
license = { text = "BSD-3-Clause" }
authors = [{ name = "Nicolas Chiaruttini", email = "nicolas.chiaruttini@unige.ch" }]
# https://pypi.org/classifiers/
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Typing :: Typed",
]
# add your package dependencies here
dependencies = [
# >=1.8.0 (scyjava>=1.12.4, jgo>=2.1): fetches Java itself and resolves jars
# without Maven; 1.7.x needs a pre-installed JDK
"pyimagej>=1.8.0"
]
# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
# "extras" (e.g. for `pip install .[test]`)
[project.optional-dependencies]
# add dependencies used for testing here
test = ["pytest", "pytest-cov"]
# add anything else you like to have in your dev environment here
dev = [
"ipython",
"mypy",
"pdbpp", # https://github.com/pdbpp/pdbpp
"pre-commit",
"rich", # https://github.com/Textualize/rich
"ruff",
]
[project.urls]
homepage = "https://github.com/BIOP/abba_python"
repository = "https://github.com/BIOP/abba_python"
# Entry points
# https://peps.python.org/pep-0621/#entry-points
# same as console_scripts entry point
# [project.scripts]
# abba-python-cli = "abba_python:main_cli"
# [project.entry-points."some.group"]
# tomatoes = "abba_python:main_tomatoes"
# https://docs.astral.sh/ruff
[tool.ruff]
line-length = 120
target-version = "py310"
src = ["src"]
# Generated by scripts/generate_commands.py
extend-exclude = ["src/abba_python/commands.py"]
# https://docs.astral.sh/ruff/rules
[tool.ruff.lint]
pydocstyle = { convention = "numpy" }
select = [
"E", # style errors
"W", # style warnings
"F", # flakes
"D", # pydocstyle
"D417", # Missing argument descriptions in Docstrings
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"RUF", # ruff-specific rules
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
]
ignore = [
"D401", # First line should be in imperative mood (remove to opt in)
"D205", # summary lines may run on: docstrings here are not in numpy style
"D400", # First line should end with a period
]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["D", "S"]
# Scripts, not API: no docstring required
"examples/*.py" = ["D"]
"scripts/*.py" = ["D"]
# https://docs.astral.sh/ruff/formatter/
[tool.ruff.format]
docstring-code-format = true
skip-magic-trailing-comma = false # default is false
# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
files = "src"
strict = true
disallow_any_generics = false
disallow_subclassing_any = false
show_error_codes = true
pretty = true
# The Java bridge libraries ship no type information
[[tool.mypy.overrides]]
module = ["imagej.*", "jpype.*", "scyjava.*"]
ignore_missing_imports = true
# https://docs.pytest.org/
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
filterwarnings = ["error"]
# https://coverage.readthedocs.io/
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"@overload",
"except ImportError",
"\\.\\.\\.",
"raise NotImplementedError()",
"pass",
]
[tool.coverage.run]
source = ["abba_python"]
# https://github.com/mgedmin/check-manifest#configuration
# add files that you want check-manifest to explicitly ignore here
# (files that are in the repo but shouldn't go in the package)
[tool.check-manifest]
ignore = [
".pre-commit-config.yaml",
".ruff_cache/**/*",
"tests/**/*",
]
# https://github.com/crate-ci/typos
[tool.typos.default.extend-words]
ba = "ba" # the atlas parameter of ABBA's Java commands
ome = "ome" # OME-TIFF