-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathpyproject.toml
More file actions
204 lines (187 loc) · 5.59 KB
/
pyproject.toml
File metadata and controls
204 lines (187 loc) · 5.59 KB
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
[project]
authors = [
{name = "Jon Connell", email = "python@figsandfudge.com"},
]
license = "MIT"
requires-python = ">=3.10"
dependencies = [
"compact-json>=1.1.3",
"protobuf>=6.32.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",
]
classifiers = [
"Topic :: Office/Business :: Financial :: Spreadsheet",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
description = "Read and write Apple Numbers spreadsheets"
name = "numbers-parser"
readme = "README.md"
version = "4.18.2"
[project.urls]
repository = "https://github.com/masaccio/numbers-parser"
documentation = "https://github.com/masaccio/numbers-parser/blob/main/README.md"
[project.scripts]
cat-numbers = "numbers_parser._cat_numbers:main"
unpack-numbers = "numbers_parser._unpack_numbers:main"
csv2numbers = "numbers_parser._csv2numbers:main"
[dependency-groups]
dev = [
"gprof2dot<2023.0.0,>=2022.7.29",
"line-profiler>=5.0.0",
"mock>=5.1.0",
"pytest>=7.2.0",
"pytest-check>=1.0",
"pytest-console-scripts<2.0.0,>=1.3.1",
"pytest-cov>=4.0,>=5.0",
"pytest-xdist<4.0.0,>=3.3.1",
"ruff",
"tox<5.0.0,>=4.11.4",
"python-magic>=0.4",
"tqdm>=4.66",
"colorama<1.0.0,>=0.4.6",
"pympler<2.0,>=1.1",
]
docs = [
"sphinx>=7.3",
"enum-tools>=0.11",
"sphinx-toolbox>=3.5",
"sphinx-nefertiti>=0.7",
"sphinx-markdown-builder>=0.6",
"sphinx-copybutton>=0.5.2",
# Security updates
"urllib3>=2.6.0",
"filelock>=3.20.1"
]
bootstrap = [
"rich>=14.0",
"pyobjc-core>=12.0",
"pyobjc-framework-Cocoa>=10.2",
"py2app>=0.28",
]
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
include = ["numbers_parser*"]
exclude = ["*tests*"]
namespaces = false # disable scanning PEP 420 namespaces
[tool.setuptools.package-data]
"numbers_parser" = ["data/*"]
[tool.coverage.run]
branch = true
omit = ["src/numbers_parser/generated/*.py"]
[tool.coverage.html]
directory = "coverage_html_report"
show_contexts = false
[tool.pytest.ini_options]
addopts = "--cov=src/numbers_parser --cov-report=html --cov-report=term-missing:skip-covered"
[tool.tox]
requires = ["tox>=4.0"]
envlist = ["py39", "py310", "py311", "py312", "py313"]
[testenv]
deps = [
"pytest",
"pytest-check",
"pytest-console-scripts",
"pytest-cov",
"pytest-xdist",
"python-magic",
"pympler",
"colorama"
]
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
lint.ignore = [
"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", # Remove 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
# Conflicts with other rules
"D212", # Multiline summary first line
"D203", # Blank lines before class docstrings
"D416", # Colon after after section titles
]
lint.select = [ "ALL" ]
lint.unfixable = [
"ERA", # do not autoremove commented out code
]
line-length = 100
src = ["src", "tests"]
target-version = "py39"
[tool.ruff.lint.pylint]
max-statements = 100
max-branches = 20
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.per-file-ignores]
"docs/conf.py" = ["INP001"]
"src/build/**" = ["PLR2004", "INP001", "PTH"]
"src/build/protodump.py" = ["PLR2004", "INP001", "PTH", "S110", "N806"]
"src/debug/**" = ["INP001"]
"tests/**" = ["PLR2004", "S101", "D103", "ANN201", "ANN001", "DTZ001"]