-
Notifications
You must be signed in to change notification settings - Fork 15
/
pyproject.toml
187 lines (170 loc) · 5.06 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
186
187
[tool.poetry]
authors = ["Jon Connell <[email protected]>"]
classifiers = [
"Topic :: Office/Business :: Financial :: Spreadsheet",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
description = "Read and write Apple Numbers spreadsheets"
documentation = "https://github.com/masaccio/numbers-parser/blob/main/README.md"
license = "MIT"
name = "numbers-parser"
packages = [{include = "numbers_parser", from = "src"}]
readme = "README.md"
repository = "https://github.com/masaccio/numbers-parser"
version = "4.14.1"
[tool.poetry.scripts]
cat-numbers = "numbers_parser._cat_numbers:main"
unpack-numbers = "numbers_parser._unpack_numbers:main"
csv2numbers = "numbers_parser._csv2numbers:main"
[tool.poetry.dependencies]
compact-json = "^1.1.3"
protobuf = "*"
python = ">=3.9,<4.0"
python-snappy = "^0.7"
sigfig = "^1.3.3"
setuptools = ">=70.0.0"
importlib-resources = ">=6.1"
enum-tools = ">=0.11"
python-dateutil = "^2.9.0.post0"
[tool.poetry.group.dev.dependencies]
black = "*"
gprof2dot = "^2022.7.29"
line-profiler = "^4.0.3"
mock = ">=5.1.0"
psutil = ">=5.9"
pytest = ">=7.2.0"
pytest-check = ">=1.0"
pytest-console-scripts = "^1.3.1"
pytest-cov = ">=4.0,>=5.0"
pytest-xdist = "^3.3.1"
ruff = "*"
tox = "^4.11.4"
python-magic = ">=0.4"
tqdm = ">=4.66"
colorama = "^0.4.6"
roman = "^4.2"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
sphinx = ">= 7.3"
enum-tools = ">=0.11"
sphinx-toolbox = ">=3.5"
sphinx-nefertiti = ">=0.3.3"
sphinx-markdown-builder = ">=0.6"
sphinx-copybutton = ">=0.5"
[tool.poetry.group.bootstrap]
optional = true
[tool.poetry.group.bootstrap.dependencies]
pyobjc-core = ">=10.2"
pyobjc-framework-Cocoa = ">=10.2"
py2app = ">=0.28"
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0"]
[tool.coverage.run]
branch = true
omit = ["src/numbers_parser/generated/*.py"]
[tool.coverage.html]
directory = "coverage_html_report"
show_contexts = true
[tool.pytest.ini_options]
addopts = "--cov=src/numbers_parser --cov-report=html --cov-report=term-missing:skip-covered --cov-context=test"
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
envlist = py39, py310, py311, py312, py313
[testenv]
deps =
pytest
pytest-check
pytest-console-scripts
pytest-cov
pytest-xdist
python-magic
psutil
roman
commands =
pytest tests/ --import-mode importlib -n logical --no-cov
"""
[tool.isort]
profile = "black"
[tool.ruff]
exclude = [
# Machine-generated files
"**/.bootstrap/*",
"**/.tox/*",
"**/.vscode/*",
"**/src/numbers_parser/generated/*",
# Third-party files not to lint
"**/src/debug/lldbutil.py",
]
fix = true
ignore = [
# "PLR2004", # Allow constant values
"T201", # Allow print()
# To fix:
"ANN001", #Missing type annotation
"ANN002", #Missing type annotation
"ANN003", #Missing type annotation
"ANN201", #Missing return type annotation
"ANN202", #Missing return type annotation
"ANN204", #Missing return type annotation
"ANN205", #Missing return type annotation
"ANN206", #Missing return type annotation
"ANN401", #Dynamically typed expressions
"ARG001", #Unused function argument
"ARG002", #Unused method argument
"ARG003", #Unused class method argument
"BLE001", #Do not catch blind exception
"C901", #code too complex
"D100", #Missing docstring
"D101", #Missing docstring
"D102", #Missing docstring
"D103", #Missing docstring
"D105", #Missing docstring
"D107", #Missing docstring
"D205", # Blank line - conflicts with black
"D210", #No whitespaces allowed surrounding docstring text
"D400", #First line should end with a period
"D401", #First line of docstring should be in imperative mood
"D415", #First line should end with a period, question mark, or exclamation point
"E501", #Line too long
"ERA001", #Found commented-out code
"FBT001", #Boolean-typed positional argument in function definition
"FBT002", #Boolean default positional argument in function definition
"FBT003", #Boolean positional value in function call
"FIX002", #Line contains TODO, consider resolving the issue
"ISC003", #Explicitly concatenated string should be implicitly concatenated
"PERF401", #Use a list comprehension to create a transformed list
"PLR0913", #Too many arguments
"PLR2004", #Magic value used
"PLW0603", #Using the global statement
"PTH103", # Use of os.makedirs()
"PTH118", # Use of os.path.join()
"PTH119", # Use of os.path.basename()
"PTH123", # Use of open()
"RUF001", #String contains ambiguous
"RUF002", #Docstring contains ambiguous
"RUF003", #Comment contains ambiguous
"SIM115", #Use a context manager for opening files
"SLF001", #Private member accessed
"TD002", # TODO author
"TD003", # TODO author
]
line-length = 100
select = [ "ALL" ]
src = ["src", "tests"]
target-version = "py39"
unfixable = [
"ERA", # do not autoremove commented out code
]
[tool.ruff.pylint]
max-statements = 100
max-branches = 20
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.per-file-ignores]
"src/bootstrap/**" = ["PLR2004"]
"tests/**" = ["PLR2004", "S101", "D103", "ANN201", "ANN001"]