-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathpyproject.toml
More file actions
169 lines (146 loc) · 3.96 KB
/
Copy pathpyproject.toml
File metadata and controls
169 lines (146 loc) · 3.96 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
166
167
168
169
[build-system]
requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
[project]
name = "python-ulid"
description = "Universally unique lexicographically sortable identifier"
dynamic = ["version", "readme"]
license = "MIT"
requires-python = ">=3.10"
authors = [
{ name = "Martin Domke", email = "mail@martindomke.net" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Programming Language :: Python",
"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",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"typing-extensions; python_version < '3.11'",
]
[project.urls]
Homepage = "https://github.com/mdomke/python-ulid"
Documentation = "https://python-ulid.readthedocs.io"
Changelog = "https://python-ulid.readthedocs.io/en/latest/changelog.html"
Issues = "https://github.com/mdomke/python-ulid/issues"
CI = "https://github.com/mdomke/python-ulid/actions"
Repository = "https://github.com/mdomke/python-ulid"
[project.optional-dependencies]
pydantic = [
"pydantic>=2.0"
]
[project.scripts]
ulid = "ulid.__main__:entrypoint"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.targets.wheel]
packages = [
"ulid",
]
[tool.hatch.build.targets.sdist]
exclude = [
".flox",
]
[tool.ruff]
extend = ".ruff_defaults.toml"
target-version = "py310"
line-length = 100
[tool.ruff.format]
preview = true
[tool.ruff.lint]
extend-fixable = ["RUF100", "I001"]
ignore = [
"S101", # Allow usage of asserts
"A001", # Allow shadowing bultins
"A003", # Allow shadowing bultins on classes
"EM101", # Allow raw strings in exceptions
"EM102", # Allow f-strings in exceptions
"EM102", # Allow f-strings in exceptions
"TRY003", # Allow "long" messages in exceptions
]
[tool.ruff.lint.per-file-ignores]
"docs/**/*" = [
"INP001", # Ignore possible static credentials
]
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.isort]
force-single-line = true
lines-after-imports = 2
order-by-type = false
[tool.mypy]
disallow_untyped_defs = true
follow_imports = "normal"
ignore_missing_imports = true
pretty = true
show_column_numbers = true
show_error_codes = true
warn_no_return = false
warn_unused_ignores = true
plugins = [
"pydantic.mypy",
]
[tool.uv]
default-groups = ["dev", "doc"]
[tool.pyrefly]
preset = "strict"
project-excludes = ["docs"]
[tool.poe.tasks]
test = "uv run --extra pydantic pytest --cov --cov-report=term-missing"
check-code = "uv run ruff check"
check-fmt = "uv run ruff format --check"
check-types = "uv run --extra pydantic pyrefly check"
check-docs = "uv run doc8 docs/source"
fmt = "uv run ruff format"
fix = "uv run ruff check --fix"
build = "uv build"
cov-combine = "coverage combine"
cov-xml = "coverage xml"
[tool.poe.tasks.docs]
help = "Build the HTML documentation"
cmd = "uv run --with-requirements requirements.txt make html"
cwd = "docs"
[tool.poe.tasks.check]
help = "Run all checks (code, format, types, docs)"
sequence = [
{ ref = "check-code" },
{ ref = "check-fmt" },
{ ref = "check-types" },
{ ref = "check-docs" },
]
[tool.coverage.run]
branch = true
parallel = true
source = ["ulid"]
[tool.doc8]
max-line-length = 100
[dependency-groups]
dev = [
"coverage==7.15.*",
"freezegun==1.5.*",
"poethepoet==0.48.*",
"prek==0.4.*",
"pyrefly==1.1.*",
"pytest==9.1.*",
"pytest-cov==7.1.*",
"ruff==0.15.*",
]
doc = [
"doc8>=2.0.0",
"sphinx==8.1.*",
]
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/x-rst"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.rst"
start-after = ".. teaser-begin"