-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
185 lines (150 loc) · 4.59 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "linearmoney"
dynamic = ["version"]
description = "Full multi-currency support for python."
authors = [{name = "GrammAcc", email = "[email protected]"}]
maintainers = [{name = "GrammAcc", email = "[email protected]"}]
license = "MIT"
readme = "README.md"
requires-python = ">=3.10"
keywords = ["money", "framework", "currency", "forex", "fintech"]
classifiers = ["Development Status :: 3 - Alpha"]
[project.urls]
homepage = "https://github.com/GrammAcc/linearmoney"
bug_tracker = "https://github.com/GrammAcc/linearmoney/issues"
documentation = "https://grammacc.github.io/linearmoney"
repository = "https://github.com/GrammAcc/linearmoney"
[project.optional-dependencies]
dev = [
"pytest",
"pytest-parametrize-cases",
"pytest-lazy-fixtures",
]
sqlalchemy = ["sqlalchemy"]
[tool.hatch.version]
path = "src/linearmoney/__init__.py"
[tool.hatch.build]
ignore-vcs = true
include = ["*.json", "py.typed"]
# This is needed for hatchling to find the version in the package __init__.py file.
# See https://github.com/pypa/hatch/issues/981#issuecomment-1743631364
[tool.hatch.build.targets.sdist]
include = ["src"]
# This is needed for hatchling to find the version in the package __init__.py file.
# See https://github.com/pypa/hatch/issues/981#issuecomment-1743631364
[tool.hatch.build.targets.wheel]
packages = ["src/linearmoney"]
[tool.hatch.envs.default]
python = "3.12"
[tool.hatch.envs.default.scripts]
ci = [
"hatch run test:suite",
"hatch run -py=3.10,3.11 test:cov",
"hatch run docs:test-prose",
"hatch run docs:test-in-source",
"hatch run types:check",
"hatch run style:lintsrc",
"hatch run style:linttests",
"hatch run style:lintdocs",
]
all = [
"hatch run style:format",
"- hatch run test:suite",
"- hatch run -py=3.10,3.11 test:cov",
"- hatch run docs:test-prose",
"- hatch run docs:test-in-source",
"- hatch run types:check",
"- hatch run style:lintsrc",
"- hatch run style:linttests",
"- hatch run style:lintdocs",
]
quicktest = "hatch run -py=3.10,3.11 test:suite {args}"
[tool.hatch.envs.py310]
python = "3.10"
[tool.hatch.envs.py311]
python = "3.11"
[tool.hatch.envs.test]
description = "Test Suite and Coverage Reporting"
dependencies = [
"pytest",
"pytest-cov",
"pytest-parametrize-cases",
"pytest-lazy-fixtures",
"pytest-asyncio",
"aiosqlite",
"sqlalchemy[asyncio]",
]
features = ["sqlalchemy"]
[[tool.hatch.envs.test.matrix]]
python = ["3.10", "3.11", "3.12"]
[tool.hatch.envs.test.scripts]
suite = "pytest {args}"
cov = "pytest --cov-config=pyproject.toml --cov-report html:htmlcov --cov=linearmoney {args}"
prod = "- pip install --force-reinstall -i https://test.pypi.org/simple linearmoney && pytest"
ext = "pytest tests/ext {args}"
[tool.hatch.envs.types]
description = "Run static type checker"
dependencies = [
"mypy",
"sqlalchemy[mypy]",
]
[tool.hatch.envs.types.scripts]
check = "mypy -p linearmoney"
[tool.hatch.envs.style]
detached = true
python = "3.12"
description = "Autoformatting and Linting"
dependencies = [
"black",
"flake8",
"isort",
]
[tool.hatch.envs.style.scripts]
format = ["isort --atomic .", "black ."]
lintsrc = "flake8 src"
linttests = "flake8 tests"
lintdocs = "flake8 documentation"
[tool.hatch.envs.docs]
description = "Documentation generation and utilities"
dependencies = [
"pdoc",
"mkdocs",
"mkdocs-material",
"pytest",
]
features = ["sqlalchemy"]
[tool.hatch.envs.docs.scripts]
build = [
"sh -c 'pygmentize -f html -a .language-python -S default > documentation/md/syntax-highlighting.css'",
"pdoc 'linearmoney' --docformat='google' --output-directory='documentation/md/api_reference' --template-directory='documentation/pdoc_templates'",
"mkdocs build -f documentation/mkdocs.yml",
]
serve = "python documentation/serve.py"
test-prose = "pytest --doctest-glob='*.md' README.md documentation"
test-in-source = "python documentation/run_doctests.py"
[tool.hatch.envs.cldr]
description = "CLDR data tooling"
detached = true
[tool.hatch.envs.cldr.scripts]
build = "python process_cldr_data.py"
test = "python tests/cldr/check_data.py"
[tool.pytest.ini_options]
log_file="testsuite.log"
log_file_level="DEBUG"
addopts = "--import-mode=importlib --show-capture=no --ignore=cldr-json"
asyncio_mode = "auto"
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"@abstractmethod",
]
omit = ["_utils.py"]
[tool.coverage.run]
source = ["linearmoney"]
[tool.isort]
profile = "black"
skip_gitignore = true