-
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathpyproject.toml
More file actions
175 lines (153 loc) · 4.68 KB
/
pyproject.toml
File metadata and controls
175 lines (153 loc) · 4.68 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
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "whatstk"
version = "0.8.1"
description = "Parser and analytics tools for WhatsApp group chats"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "GPL-3.0-only" }
authors = [{ name = "Lucas Rodes-Guirao" }]
keywords = ["whatsapp", "analysis", "parser", "chat"]
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
]
dependencies = [
"emoji~=2.15",
"numpy~=2.1",
"pandas~=2.2",
"plotly~=6.5",
"seaborn~=0.13",
]
[project.optional-dependencies]
gdrive = ["PyDrive2~=1.21", "PyYAML~=6.0"]
generate = ["scipy~=1.14", "python-lorem~=1.3"]
full = ["whatstk[gdrive,generate]"]
test = [
"pytest~=9.0",
"pytest-cov~=7.0",
"coverage~=7.6",
"codecov~=2.1",
"pytest-html~=4.1",
"pytest-mock~=3.14",
"pytest-xdist~=3.6",
"pytest-rerunfailures~=16.0",
]
lint = ["ruff~=0.14", "pyright~=1.1"]
docs = [
"recommonmark~=0.7",
"Sphinx~=8.0",
"sphinx-rtd-theme~=3.0",
"sphinx-copybutton~=0.5",
"sphinx-git~=11.0",
"sphinx-togglebutton~=0.3",
"autodocsumm~=0.2",
"auto-changelog~=0.6",
"docutils~=0.20",
]
dev = ["whatstk[test,lint,docs]", "bump-my-version~=1.2"]
[project.urls]
Documentation = "https://whatstk.readthedocs.io/en/latest/"
Github = "http://github.com/lucasrodes/whatstk"
"Bug Tracker" = "https://github.com/lucasrodes/whatstk/issues"
[project.scripts]
whatstk-generate-chat = "whatstk.scripts.generate_chats:main"
whatstk-to-csv = "whatstk.scripts.txt_to_csv:main"
whatstk-graph = "whatstk.scripts.graph:main"
[tool.setuptools]
packages = ["whatstk"]
include-package-data = true
[tool.setuptools.package-data]
whatstk = ["whatsapp/assets/header_format_support.json"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "--strict-markers"
[tool.coverage.run]
source = ["whatstk"]
omit = ["*/tests/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]
[tool.bumpversion]
current_version = "0.8.1"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(\\.(?P<pre>[a-z]+)(?P<prenum>\\d+))?"
serialize = ["{major}.{minor}.{patch}.{pre}{prenum}", "{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
tag = false
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "Bump version: {current_version} → {new_version}"
[tool.bumpversion.parts.pre]
optional_value = "stable"
values = ["dev", "a", "b", "rc", "stable"]
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""
[[tool.bumpversion.files]]
filename = "whatstk/__init__.py"
[[tool.bumpversion.files]]
filename = "docs/conf.py"
search = "version = 'v{current_version}'"
replace = "version = 'v{new_version}'"
[[tool.bumpversion.files]]
filename = "README.md"
[tool.ruff]
line-length = 120
target-version = "py311"
[tool.ruff.lint]
# Enable flake8-bugbear (B), flake8-builtins (A), flake8-bandit (S),
# pydocstyle/flake8-docstrings (D), and flake8-annotations (ANN) equivalents
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"B", # flake8-bugbear
"A", # flake8-builtins
"S", # flake8-bandit (security)
"D", # pydocstyle (docstrings)
"ANN", # flake8-annotations
"C90", # mccabe complexity
]
# Ignore same rules as flake8 config
ignore = [
"ANN401", # Dynamically typed expressions (typing.Any)
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.ruff.lint.per-file-ignores]
# Tests can use assert statements, don't need docstrings or type annotations
"tests/**/*.py" = [
"S101", # Use of assert
"D100", # Missing docstring in public module
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"ANN001", # Missing type annotation for function argument (fixtures)
"ANN201", # Missing return type annotation
]