-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
149 lines (137 loc) · 4.32 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
[tool.poetry]
name = "digiarch"
version = "5.2.2"
description = "Tools for the Digital Archive Project at Aarhus Stadsarkiv"
authors = ["Aarhus Stadsarkiv <[email protected]>"]
license = "GPL-3.0"
readme = "README.md"
homepage = "https://stadsarkiv.aarhus.dk/"
repository = "https://github.com/aarhusstadsarkiv/digiarch"
keywords = ["archiving", "preservation", "identification"]
include = ["pyproject.toml"]
[tool.poetry.dependencies]
python = "^3.11"
acacore = {git = "https://github.com/aarhusstadsarkiv/acacore.git", tag = "v4.1.2"}
patool = "^3.1.0"
tnefparse = "^1.4.0"
extract-msg = "^0.52.0"
chardet = "^5.2.0"
[tool.poetry.group.dev.dependencies]
pytest = "^8.3.2"
ruff = "^0.5.6"
coverage = "^7.6.1"
types-click = "^7.1.8"
[tool.poetry.scripts]
digiarch = "digiarch.cli:app"
[tool.ruff]
line-length = 120
[tool.ruff.format]
line-ending = "lf"
[tool.ruff.lint]
select = [
"C",
"E",
"F",
"W",
# "B", Will ask for some refactoring of error handling
"I",
# "C90", Checks for complexity, might be good but not essential
# "N", Will force us to redo the naming of several functions
"D",
"UP",
"YTT",
"ANN",
# "S", Will help us have secure calls to sub.process and such, might be good
"BLE",
# "FBT", Will asks us to remove boolean flags
"A",
# "COM",
"C4",
"DTZ",
"T10",
"ISC",
"ICN",
"INP",
"PIE",
"PT",
"RSE",
"RET",
"SIM",
"TID",
"ARG",
"PLE",
# "PLR", Will suggest several large refactoring
"PLW",
# "TRY", Will help with our exception handling
"RUF",
]
ignore = [
"ANN002", # missing type anottation for *args
"ANN003", # missing type anotation for **kwargs
"ANN101", # missing type for self
"ANN102", # missing type for cls
"ANN201", # missing return type
"ANN202", # missing return type
"ANN206", # missing return type
"ARG001", # missing type anotattion for args
"BLE001", # catching general exceptions
"C901", # complexity check
"D100", # missing docstring
"D101", # missing docstring
"D102", # missing docstring
"D103", # missing docstring,
"D104", # missing docstring,
"D105", # missing docstring in magic method,
"D106", # missing docstring in nested class,
"D107", # missing docstring in __init__,
"D203", # 0 blank line required before class docstring,
"D204", # 1 blank line required after class docstring,
"D212", # multi-line docstring summary should start at the first line,
"D213", # multi-line docstring summary should start at the second line,
"D300", # use triple docstring
"D400", # First line should end with a period
"D401", # first line of docstring should be in imperative mood
"DTZ005", # datetime.datetime.now() called without a tz argument
"DTZ006", # datetime.datetime.fromtimestamp() called without a tz argument
"E501", # line to long, to many false positives, gets handled by black
"E712", # comparison to True/False, we ignore because we use sqlalchemy
"E741", # Ambiguous variable name: `l`
"FBT001", # boolean arguement in function definition
"INP001", # implicit namespace without __init__ (throws errors in tests)
"ISC001", # check for implicit concatanation of str on one line, not compatabil with black.
"N802", # name of function should be lowercase
"PLR2004", # magic value used in comparison
"PLW2901", # redefing loop variables
"PT012", # ptest.raises should contain a simple statement
"RET505", # unnecessary {branch} after return statement
"S101", # use of assert,
"SIM114", # combine `if` branches using logical `or` operator
"TRY003", # avoid using long messages outside exception class
"UP007", # not using | in type anotations
]
exclude = [
".venv",
"env",
"venv",
".git",
"__pycache__",
".github",
".mypy_cache",
".pytest_cache",
"__init__.py"
]
[tool.ruff.lint.isort]
combine-as-imports = false
force-single-line = true
order-by-type = false
[tool.ruff.lint.pydocstyle]
convention = "pep257"
ignore-decorators = ["pytest.fixture"]
[tool.ruff.lint.pycodestyle]
max-doc-length = 300
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
[tool.pytest.ini_options]
asyncio_mode="strict"
pythonpath = ["."]