-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
130 lines (117 loc) · 4.03 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
[project]
name = "reddit_research"
version = "1.1.0"
description = "Tools for scraping and analyzing Reddit"
authors = [{ name = "Joseph Reagle"}]
license = { text = "MIT" }
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"adjusttext>=1.2.0",
"arrow>=1.3.0",
"cachier>=3.0.1",
"fuzz>=0.1.1",
"jsonlines>=4.0.0",
"lxml>=5.3.0",
"matplotlib>=3.9.2",
"numpy>=2.1.2",
"pandas>=2.2.3",
"pendulum>=3.0.0",
"praw>=7.7.1",
"psaw>=0.1.0",
"pytz>=2024.2",
"python-dotenv>=1.0.0",
"rapidfuzz>=3.11.0",
"requests>=2.32.3",
"seaborn>=0.13.2",
"tqdm>=4.66.5",
"zstandard>=0.23.0",
"pip>=24.3.1",
"ipython>=8.31.0",
"sh>=2.1.0",
"ipdb>=0.13.13",
]
[project.scripts]
reddit-search = "reddit_research.reddit_search:main"
reddit-watch = "reddit_research.reddit_watch:main"
reddit-query = "reddit_research.reddit_query:main"
reddit-message = "reddit_research.reddit_message:main"
subreddits-get-info = "reddit_research.subreddits_get_info:main"
subreddits-plot = "reddit_research.subreddits_plot:main"
redditors-from-subject = "reddit_research.redditors_from_subject:main"
[tool.setuptools]
package-dir = {"" = "src"}
[tool.ruff]
line-length = 88 # Same as Black
lint.select = [
"A", # flake8-builtins https://tinyurl.com/ruff-rules#flake8-builtins-a
"B", # Flake8-bugbear https://tinyurl.com/ruff-rules#flake8-bugbear-b
"BLE", # Flake8-blind-except https://tinyurl.com/ruff-rules#flake8-blind-except-ble
"C4", # Flake8-comprehensions https://tinyurl.com/ruff-rules#flake8-comprehensions-c4
"C90", # McCabe complexity https://tinyurl.com/ruff-rules#mccabe-c90
"D", # Pydocstyle https://tinyurl.com/ruff-rules#pydocstyle-d
"E", # Pycodestyle errors https://tinyurl.com/ruff-rules#pycodestyle-e-w
"F", # Pyflakes https://tinyurl.com/ruff-rules#pyflakes-f
"I", # Isort https://tinyurl.com/ruff-rules#isort-i
"PIE", # Flake8-pie https://tinyurl.com/ruff-rules#flake8-pie-pie
"PLR", # Pylint refactor https://tinyurl.com/ruff-rules#pylint-pl
"PTH", # Flake8-use-pathlib https://tinyurl.com/ruff-rules#flake8-use-pathlib-pth
"Q", # Flake8-quotes https://tinyurl.com/ruff-rules#flake8-quotes-q
"RSE", # Flake8-raise https://tinyurl.com/ruff-rules#flake8-raise-rse
"RUF", # Ruff-specific https://tinyurl.com/ruff-rules#ruff-specific-rules-ruf
"SIM", # Flake8-simplify https://tinyurl.com/ruff-rules#flake8-simplify-sim
"UP", # Pyupgrade https://tinyurl.com/ruff-rules#pyupgrade-up
"YTT", # Flake8-2020 https://tinyurl.com/ruff-rules#flake8-2020-ytt
]
lint.ignore = [
"D102", # Missing docstring in public method
"D203", # one-blank-line-before-class
"D213", # multi-line-summary-second-line
"D107", # Missing docstring in __init__
"E501", # doctests need long lines
"PLR0912", # Too many branches in function or method
"PLR0915", # Too many statements in function or method
"PLR0913", # Too many arguments to function call
"PLR2004", # Magic value used in comparison
"RUF001", # String contains ambiguous Unicode character (curly quotes)
"RUF002", # Docstring contains ambiguous Unicode character (curly quotes)
]
lint.unfixable = [
"F401", # keep unused modules as I'm likely to use them shortly
]
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"_old",
]
[tool.ruff.lint.mccabe] # enabled via "C90" above
max-complexity = 10
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-r a -q --doctest-modules"
filterwarnings = "ignore::DeprecationWarning"
enable_assertion_pass_hook = true
[tool.pyright]
reportMissingImports = false
reportMissingTypeStubs = false
pythonVersion = '3.12'