-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpyproject.toml
164 lines (147 loc) · 3.18 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
[build-system]
build-backend = "hatchling.build"
requires = [ "hatch-vcs", "hatchling" ]
[project]
name = "aleph-message"
description = "Aleph.im message specification"
readme = "README.md"
license = { file = "LICENSE" }
authors = [
{ name = "Hugo Herter", email = "[email protected]" },
]
requires-python = ">=3"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: System :: Distributed Computing",
]
dynamic = [ "version" ]
dependencies = [
"pydantic>=1.10.5,<2",
"typing-extensions>=4.5",
]
urls.Documentation = "https://aleph.im/"
urls.Homepage = "https://github.com/aleph-im/aleph-message"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.targets.wheel]
packages = [
"Dockerfile",
"LICENSE",
"pyproject.toml",
"README.md",
"aleph_message",
]
[tool.hatch.build.targets.sdist]
include = [
"Dockerfile",
"LICENSE",
"pyproject.toml",
"README.md",
"aleph_message",
]
[tool.hatch.envs.testing]
dependencies = [
"requests",
"rich",
"pytest==8.0.1",
"pytest-cov==4.1.0",
]
# XXX see https://github.com/aleph-im/pyaleph/blob/main/.github/workflows/pyaleph-ci.yml
[tool.hatch.envs.testing.scripts]
test = "pytest -v {args:.}"
test-cov = "pytest -v --cov {args:.}"
cov-report = [
"- coverage combine",
"coverage report",
]
cov = [
"test-cov",
"cov-report",
]
[tool.hatch.envs.linting]
detached = true
dependencies = [
"black==24.2.0",
"mypy==1.2.0",
"mypy-extensions==1.0.0",
"ruff==0.4.8",
"isort==5.13.2",
"check-sdist==0.1.3",
"yamlfix==1.16.1",
"pyproject-fmt==2.2.1",
"types-requests",
"typing-extensions",
]
[tool.hatch.envs.linting.scripts]
typing = "mypy --config-file=pyproject.toml {args:} ./aleph_message/"
style = [
"ruff check {args:.}",
"black --check --diff {args:} ./aleph_message/",
"isort --check-only --profile black {args:} ./aleph_message/",
"yamlfix --check .",
"pyproject-fmt --check pyproject.toml",
]
sdist = "check-sdist --inject-junk"
fmt = [
"black {args:} ./aleph_message/",
"ruff check --fix {args:.} ./aleph_message/",
"isort --profile black {args:} ./aleph_message/",
"yamlfix .",
"pyproject-fmt pyproject.toml",
"style",
]
all = [
"style",
"typing",
"sdist",
]
[tool.isort]
profile = "black"
[tool.check-sdist]
git-only = [
"tests",
"docs",
"deployment",
".coveragerc",
".dockerignore",
"shell.nix",
]
default-ignore = true
[tool.pytest]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
[tool.coverage.run]
branch = true
parallel = true
source = [
"aleph_message/",
]
omit = [
"*/site-packages/*",
]
[tool.coverage.paths]
source = [
"aleph_message/",
]
omit = [
"*/site-packages/*",
]
[tool.mypy]
show_column_numbers = true
install_types = true
ignore_missing_imports = true
[tool.yamlfix]
sequence_style = "keep_style"
preserve_quotes = true
whitelines = 1
section_whitelines = 2