-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpyproject.toml
149 lines (134 loc) · 4.62 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
[project]
name = "thunderdell"
version = "1.0.0"
description = "Bibliographic management toolkit"
readme = "README.md"
license = {file = "GPLv3"}
authors = [
{name = "Joseph Reagle"}
]
requires-python = ">=3.12"
dependencies = [
"arrow",
"atproto",
"BeautifulSoup4",
"datefinder",
"dotenv",
"lxml",
"mastodon.py",
"pyenchant",
"python-dotenv",
"requests",
"roman",
"Send2Trash",
"twitter-api-client",
"xmltodict"
]
[project.scripts]
arxiv-query = "thunderdell.arxiv_query:main"
busy = "thunderdell.busy:main"
busy-query = "thunderdell.busy_query:main"
change-case = "thunderdell.change_case:main"
doi-query = "thunderdell.doi_query:main"
extract-bibtex = "thunderdell.extract_bibtex:main"
extract-dictation = "thunderdell.extract_dictation:main"
extract-goodreader = "thunderdell.extract_goodreader:main"
extract-kindle = "thunderdell.extract_kindle:main"
extract-raindrop = "thunderdell.extract_raindrop:main"
field-notes-categorize = "thunderdell.field_notes_categorize:main"
fix-mindmaps = "thunderdell.fix_mindmaps:main"
isbn-query = "thunderdell.isbn_query:main"
map-query = "thunderdell.map_query:main"
search = "thunderdell.search:main"
[tool.setuptools]
# Add this line because your package code seems to be inside the 'src' directory
package-dir = {"" = "src"}
[tool.setuptools.package-data]
# This line tells setuptools to include all .txt files
# within the thunderdell.biblio package directory.
"thunderdell.biblio" = ["*.txt"]
[tool.black]
line-length = 88
preview = true
[tool.ruff]
# Same as Black.
line-length = 88
lint.select = [
"A", # flake8-builtins https://tinyurl.com/ruff-rules#flake8-builtins-a
"B", # Flake8-bugbear https://tinyurl.com/ruff-rules#flake8-bugbear-b
"BLE", # Flake8-blind-except https://tinyurl.com/ruff-rules#flake8-blind-except-ble
"C4", # Flake8-comprehensions https://tinyurl.com/ruff-rules#flake8-comprehensions-c4
"C90", # McCabe complexity https://tinyurl.com/ruff-rules#mccabe-c90
"D", # Pydocstyle https://tinyurl.com/ruff-rules#pydocstyle-d
"E", # Pycodestyle errors https://tinyurl.com/ruff-rules#pycodestyle-e-w
"F", # Pyflakes https://tinyurl.com/ruff-rules#pyflakes-f
"I", # Isort https://tinyurl.com/ruff-rules#isort-i
"PIE", # Flake8-pie https://tinyurl.com/ruff-rules#flake8-pie-pie
"PLR", # Pylint refactor https://tinyurl.com/ruff-rules#pylint-pl
"PTH", # Flake8-use-pathlib https://tinyurl.com/ruff-rules#flake8-use-pathlib-pth
"Q", # Flake8-quotes https://tinyurl.com/ruff-rules#flake8-quotes-q
"RSE", # Flake8-raise https://tinyurl.com/ruff-rules#flake8-raise-rse
"RUF", # Ruff-specific https://tinyurl.com/ruff-rules#ruff-specific-rules-ruf
"SIM", # Flake8-simplify https://tinyurl.com/ruff-rules#flake8-simplify-sim
"UP", # Pyupgrade https://tinyurl.com/ruff-rules#pyupgrade-up
"YTT", # Flake8-2020 https://tinyurl.com/ruff-rules#flake8-2020-ytt
]
lint.ignore = [
"D102", # Missing docstring in public method
"D107", # Missing docstring in __init__
"E501", # doctests need long lines
"PLR0912", # Too many branches in function or method
"PLR0915", # Too many statements in function or method
"PLR0913", # Too many arguments to function call
"PLR2004", # Magic value used in comparison
"RUF001", # String contains ambiguous Unicode character (curly quotes)
"RUF002", # Docstring contains ambiguous Unicode character (curly quotes)
"SIM105", # I don't mind try/except
]
lint.unfixable = [
"F401", # keep unused modules as I'm likely to use them soon
]
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"_old",
]
[tool.ruff.lint.mccabe] # enabled via "C90" above
max-complexity = 10
[tool.pytest.ini_options]
minversion = "6.0"
# all test summary; quiet; use importlib import mode for src layout
addopts = "-r a -q --doctest-modules --import-mode=importlib"
pythonpath = ["src"] # adds the src directory to Python's import path
# doctests in src/thunderdell and regular tests in tests/
testpaths = ["src/thunderdell", "tests"]
python_files = ["test_*.py"]
filterwarnings = "ignore::DeprecationWarning"
[tool.pyright]
reportMissingImports = false
reportMissingTypeStubs = false
pythonVersion = '3.12'
[dependency-groups]
dev = [
"ipdb>=0.13.13",
]