-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
127 lines (103 loc) · 3.41 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
[project]
authors = [{ name = "raceychan", email = "raceychan@gmail.com" }]
description = "A dependency injection library for Python, Optimized for serverless applications"
dynamic = ["version"]
name = "ididi"
# license = "MIT"
readme = "README.md"
requires-python = ">= 3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[project.optional-dependencies]
graphviz = ["python-graphviz>=0.20.3,<0.21"]
# ======== Build =========
[build-system]
requires = ["setuptools", "Cython"]
build-backend = "setuptools.build_meta"
[tool.hatch.version]
path = "setup.py"
[tool.setuptools]
py-modules = ["ididi"]
[tool.setuptools.packages.find]
where = ["."]
# ======== Build =========
# ======== Test =========
[tool.pytest.ini_options]
addopts = "--strict-markers --capture=no"
filterwarnings = ["ignore::DeprecationWarning"]
markers = [
"integration_test: marks tests as slow integration tests (deselect with '-m \"not integration_test\"')",
"debug: marks tests as debug tests (deselect with '-m \"not debug\"')",
"benchmark: marks tests as benchmark tests (deselect with '-m \"not benchmark\"')",
]
testpaths = ["tests"]
asyncio_mode = "auto"
[tool.coverage.run]
# plugins = "Cython.Coverage"
omit = [
# omit anything in a .local directory anywhere
"*/utils/*",
]
# ======== Test =========
[tool.pyright]
exclude = ["tests"]
include = ["ididi/*.py"]
python_version = "3.9"
typeCheckingMode = "strict"
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64"]
[tool.pixi.environments]
default = { solve-group = "default" }
dev = { features = ["dev"], solve-group = "default" }
publish = { features = ["publish"], solve-group = "default" }
test = { features = ["test"], solve-group = "default" }
[tool.pixi.dependencies]
python = "3.9.0.*"
typing_extensions = ">=4.12.2,<5"
cython = "==3.0.12"
[tool.pixi.feature.dev.dependencies]
jupyter = ">=1.1.1,<2"
mkdocs-material = ">=9.5.44,<10"
[tool.pixi.feature.test.dependencies]
pytest = ">=8.3.3"
pytest-asyncio = ">=0.24.0,<0.25"
pytest-cov = "==6.0.0"
python-graphviz = ">=0.20.3,<0.21"
pyinstrument = ">=5.0.0,<6"
[tool.pixi.feature.publish.dependencies]
hatch = ">=1.13.0,<2"
twine = ">=6.1"
cibuildwheel = ">=2.21.3,<3"
setuptools = ">=75.8.0,<76"
[tool.cibuildwheel]
build = "cp39* cp310* cp311* cp312* cp313*"
# test-command = "pytest -vx --capture=fd tests/"
# [tool.cibuildwheel.macos]
# archs = "x86_64 universal2"
# [tool.cibuildwheel.windows]
# archs = "AMD64 x86 ARM64"
# test-command = "pytext -vs tests"
[tool.cibuildwheel.linux]
[tool.pixi.feature.publish.tasks]
# Build into a wheel using hatch
build = { cmd = "hatch build", inputs = ["ididi/*"], outputs = ["dist/*"] }
# Upload to custom GCP registry using twine
check = { cmd = "twine check" }
publish = { cmd = "twine upload --skip-existing dist/*", depends-on = [
"build",
] }
test-publish = { cmd = "twine upload --repository testpypi --skip-existing dist/" }
patch = { cmd = "hatch version patch" }