-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
107 lines (92 loc) · 2.53 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
[tool.poetry]
name = "dataverse-metadata-crawler"
version = "0.1.1"
description = "A Python CLI tool for bulk extracting and exporting metadata from Dataverse repositories' collections to JSON and CSV formats."
authors = ["Ken Lui <[email protected]>"]
license = "MIT"
readme = "README.md"
package-mode = false
[tool.poetry.dependencies]
python = "^3.10"
httpx = "^0.27.2"
orjson = "^3.10.14"
asyncio = "^3.4.3"
jmespath = "^1.0.1"
typer = "^0.13.1"
rich-argparse = "^1.6.0"
jinja2 = "^3.1.4"
ipykernel = "^6.29.5"
pandas = "^2.2.3"
python-dotenv = "^1.0.1"
pydataverse = "^0.3.4"
numpy = "^2.2.1"
json2 = "^0.9.0"
[tool.poetry.group.dev.dependencies]
ipykernel = "^6.29.5"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
# General settings
line-length = 120
indent-width = 4
ignore = ["T201"] # Ignore print statements globally
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = [
"E", # pycodestyle errors
"F", # Pyflakes
"W", # pycodestyle warnings
"C90", # mccabe
"I", # isort
"N", # pep8-naming
"D", # pydocstring
"UP", # pyupgrade
"ANN", # flake8-annotations
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"EM", # flake8-errmsg
"G", # flake8-logging-format
"PIE", # flake8-pie
"T20", # flake8-print
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"PL", # Pylint
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
force-single-line = true
lines-after-imports = 2
known-first-party = ["my_package"]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "single"
[tool.ruff.lint.pylint]
max-args = 6 # Google suggests keeping functions focused
max-locals = 15
max-statements = 50
[tool.ruff.lint.mccabe]
max-complexity = 10 # Google suggests keeping functions simple
[tool.ruff.lint.per-file-ignores]
# Ignore some rules in tests
"test_*.py" = ["D", "ANN"]
# Ignore some rules in __init__.py files
"__init__.py" = ["F401"]
# Ignore long line warnings in main.py
"dvmeta/main.py" = ["E501", "W505"]
[tool.ruff.lint.pep8-naming]
# Google style guide naming conventions
classmethod-decorators = ["classmethod"]
staticmethod-decorators = ["staticmethod"]
[tool.ruff.lint.pycodestyle]
max-doc-length = 120