-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
166 lines (150 loc) · 3.26 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
# v1
# v2
[build-system]
requires = ["setuptools>=61.0.0", "wheel", "setuptools_scm"]
build-backend = "setuptools.build_meta"
[project]
name = "personal-mnemonic-medium"
version = "0.2.0"
authors = [
{ name = "Martin Bernstorff", email = "[email protected]" },
]
description = "Personal Mnemonic Medium"
classifiers = [
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3.10",
]
requires-python = ">=3.10"
dependencies = [
"misaka==2.1.1",
"genanki==0.13.0",
"typer==0.9.0",
"wasabi==1.1.2",
"tqdm==4.66.1",
"sentry-sdk==1.32.0",
]
[project.optional-dependencies]
dev = [
"cruft==2.15.0",
"pyright==1.1.328",
"pre-commit==2.20.0",
"ruff==0.0.254",
"black==22.8.0",
]
tests = [
"pytest==7.1.3",
"pytest-cov==3.0.0",
"pytest-xdist==3.3.1",
"pytest-sugar==0.9.7",
]
[project.urls]
homepage = "https://github.com/MartinBernstorff/personal-mnemonic-medium"
repository = "https://github.com/MartinBernstorff/personal-mnemonic-medium"
documentation = "https://MartinBernstorff.github.io/personal-mnemonic-medium/"
[tool.pyright]
exclude = [".*venv*", ".tox", "*.apkg"]
pythonPlatform = "Darwin"
typeCheckingMode = "basic"
[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = [
"A",
"ANN",
"ARG",
"B",
"C4",
"COM",
"D417",
"E",
"ERA",
"F",
"I",
"ICN",
"NPY001",
"PD002",
"PIE",
"PLE",
"PLW",
"PT",
"UP",
"Q",
"PTH",
"RSE",
"RET",
"RUF",
"SIM",
"W",
]
ignore = ["ANN101", "ANN401", "E402", "E501", "F401", "F841", "UP006", "RET504"]
# Allow autofix for all enabled rules (when `--fix`) is provided.
unfixable = ["ERA"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"__init__.py",
"docs/conf.py",
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py39"
[tool.ruff.flake8-annotations]
mypy-init-return = true
suppress-none-returning = true
[tool.ruff.isort]
known-third-party = ["wandb"]
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.semantic_release]
branch = "main"
version_variable = ["pyproject.toml:version"]
upload_to_pypi = false
upload_to_release = false
build_command = "python -m pip install build; python -m build"
[tool.setuptools]
include-package-data = true
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py{39}
[testenv]
description: run unit tests
extras = tests
use_develop = true
commands =
pytest -n auto {posargs:test}
[testenv:type]
description: run type checks
extras = tests, dev
basepython = py39 # Setting these explicitly avoid recreating env if your shell is set to a different version
use_develop = true
commands =
pyright .
[testenv:docs]
description: build docs
extras = docs
basepython = py39 # Setting these explicitly avoid recreating env if your shell is set to a different version
use_develop = true
commands =
sphinx-build -b html docs docs/_build/html
"""