-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
206 lines (175 loc) · 5.49 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
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
[project]
authors = [{ name = "Szymon Szyszkowski", email = "ss60@sanger.ac.uk" }]
name = "gentroutils"
version = "0.1.5"
description = "Open Targets python genetics utility CLI tools"
dependencies = [
"click>=8.1.7",
"google-cloud-storage>=2.18.1",
"pyfiglet>=1.0.2",
"requests>=2.32.3",
]
readme = "README.md"
requires-python = ">= 3.10"
license = "Apache-2.0"
documentation = "https://github.com/opentargets/gentroutils"
repository = "https://github.com/opentargets/gentroutils"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Healthcare Industry",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Operating System :: Unix",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: Apache Software License",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project.scripts]
gentroutils = "gentroutils:cli"
[tool.rye]
managed = true
dev-dependencies = [
"ruff>=0.5.6",
"pytest>=8.3.2",
"deptry>=0.19.0",
"pre-commit>=3.8.0",
"interrogate>=1.7.0",
"isort>=5.13.2",
"mypy>=1.11.1",
"pytest-cov>=5.0.0",
"pytest-xdist>=3.6.1",
"pytest-sugar>=1.0.0",
"pydoclint>=0.5.6",
"gcloud-storage-emulator>=0.5.0",
"types-requests>=2.32.0.20240712",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["src/gentroutils"]
# test configuration
[tool.pytest.ini_options]
markers = ["integration_test", "unit_test"]
addopts = "-n0 --doctest-modules --cov=gentroutils --cov-report=xml -s -p no:warnings --cov-report term-missing --cov-fail-under=80"
pythonpath = ["src/"]
testpaths = ["tests/"]
# linting configuration
[tool.ruff.lint]
ignore = [
"E501", # line too long
"E731", # do not assign a lambda expression, use a def
# Ignore ignored, as the rule is now back in preview/nursery, which cannot
# be ignored anymore without warnings.
# https://github.com/astral-sh/ruff/issues/7491
# "PLC1901", # Lots of false positives
# False positives https://github.com/astral-sh/ruff/issues/5386
"PLC0208", # Use a sequence type instead of a `set` when iterating over values
"PLR0911", # Too many return statements ({returns} > {max_returns})
"PLR0912", # Too many branches ({branches} > {max_branches})
"PLR0913", # Too many arguments to function call ({c_args} > {max_args})
"PLR0915", # Too many statements ({statements} > {max_statements})
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"PLW2901", # Outer {outer_kind} variable {name} overwritten by inner {inner_kind} target
"UP006", # keep type annotation style as is
"UP007", # keep type annotation style as is
# Ignored due to performance: https://github.com/charliermarsh/ruff/issues/2923
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)`
]
# add classifiers
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402"]
"path/to/file.py" = ["E402"]
"**/{tests,docs,tools}/*" = ["E402"]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.pydoclint]
style = 'google'
exclude = '\.git|\.venv|__init__.py|tests|docs'
require-return-section-when-returning-nothing = false
check-return-types = true
allow-init-docstring = true
arg-type-hints-in-docstring = true
skip-checking-short-docstrings = true
check-class-attributes = false
[tool.interrogate]
fail-under = 95
color = true
exclude = ["dist"]
ignore-init-method = true
generate-badge = "."
badge-format = "svg"
# type checking configuration
[tool.mypy]
disallow_any_generics = true
disallow_incomplete_defs = true
no_implicit_optional = true
no_implicit_reexport = true
warn_no_return = false
strict_equality = true
warn_redundant_casts = true
warn_unused_ignores = true
# plugins = ["returns.contrib.mypy.returns_plugin"]
[[tool.mypy.overrides]]
module = ["google.cloud", "pyfiglet", "click", "google.cloud.storage"]
ignore_missing_imports = true
[tool.semantic_release]
version_toml = ["pyproject.toml:project.version"]
assets = []
commit_message = "{version}\n\nAutomatically generated by python-semantic-release"
commit_parser = "angular"
logging_use_named_masks = false
major_on_zero = true
allow_zero_version = true
tag_format = "v{version}"
[tool.semantic_release.branches.main]
match = "(main|master)"
prerelease_token = "rc"
prerelease = false
[semantic_release.changelog]
template_dir = "templates"
changelog_file = "CHANGELOG.md"
exclude_commit_patterns = []
[tool.semantic_release.changelog.environment]
block_start_string = "{%"
block_end_string = "%}"
variable_start_string = "{{"
variable_end_string = "}}"
comment_start_string = "{#"
comment_end_string = "#}"
trim_blocks = false
lstrip_blocks = false
newline_sequence = "\n"
keep_trailing_newline = false
extensions = []
autoescape = true
[tool.semantic_release.commit_author]
env = "GIT_COMMIT_AUTHOR"
default = "semantic-release <semantic-release>"
[tool.semantic_release.commit_parser_options]
allowed_tags = [
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"style",
"refactor",
"test",
]
minor_tags = ["feat"]
patch_tags = ["fix", "perf", "docs", "style", "test", "ci"]
default_bump_level = 0
[tool.semantic_release.remote]
name = "origin"
type = "github"
ignore_token_for_push = false
[tool.semantic_release.publish]
dist_glob_patterns = ["dist/*"]
upload_to_vcs_release = true