-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
173 lines (157 loc) · 4.14 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
[project]
name = "fediview"
version = "0.1.0"
description = "Get a digest of popular posts and boosts from your Mastodon (fediverse) timeline."
readme = "README.md"
requires-python = ">=3.10,<4.0"
license = "MIT"
authors = [
{ name = "Adam Hill", email = "[email protected]" },
]
dependencies = [
"Django>=4,<5",
"django-fbv>=0,<1",
"django-cache-memoize>=0,<1",
"python-dotenv>=0.17,<0.18",
"sentry-sdk>=1,<2",
"first>=2,<3",
"mastodon-py>=1.8.0,<2.0.0",
"scipy>=1.9.3,<2.0.0",
"django-unicorn==0.51.1",
"django-rich-logging==0.3.0",
"gunicorn>=20.1.0,<21.0.0",
"redis>=4.4.0,<5.0.0",
"hiredis>=2.1.0,<3.0.0",
"whitenoise>=6.2.0,<7.0.0",
"coltrane[mistune]>=0.22.0,<0.23.0",
"django-compressor>=4.1,<5.0",
"dj-database-url>=1.2.0,<2.0.0",
"psycopg2-binary>=2.9.5,<3.0.0",
"python-dateutil>=2.8.2,<3.0.0",
"pydantic>=1.10,<2.0",
"django-model-utils>=4.3.1,<5.0.0",
"emoji>=2.2.0,<3.0.0",
"django-q2>=1.5.2,<2.0.0",
#"croniter>=1.3.14,<2.0.0",
"django-ndarrayfield>=1.0.0rc4,<2.0.0",
#"torch>=2.0.0,<3.0.0",
"numpy>=1.24.3,<2.0.0",
#"sentence-transformers>=2.2.2,<3.0.0",
"httpx>=0.24.0,<0.25.0",
"glom>=23.3.0,<24.0.0",
"django-axes>=5.41.1,<6.0.0",
"django-test-plus>=2.2.1,<3.0.0",
"model-bakery>=1.11.0,<2.0.0",
"modal>=0,<1",
"django-post-office>=3.6.3,<4.0.0",
"django-anymail[sendgrid]>=10.0,<11.0",
"mistune==3.0.0rc5",
]
[project.urls]
Homepage = "https://fediview.com"
Repository = "https://github.com/adamghill/fediview"
Funding = "https://github.com/sponsors/adamghill"
[tool.uv]
dev-dependencies = [
"pytest >=7 ",
"ruff >=0 ",
"pywatchman >= 1",
"mypy >= 0.930",
"coverage[toml] >= 6",
"pytest-cov >= 3",
"pytest-django >= 4",
"time-machine >= 2.13.0,<3.0.0",
]
[tool.pytest.ini_options]
addopts = "--quiet --failed-first --reuse-db --nomigrations -p no:warnings -m 'not integration'"
testpaths = [
"tests"
]
markers = [
"integration: marks tests as integration",
]
[tool.ruff]
exclude = ["**/migrations/*"]
target-version = "py39"
line-length = 120
select = [
"A",
"ARG",
"B",
"C",
"DTZ",
"E",
"EM",
"F",
"FBT",
"I",
"ICN",
"ISC",
"N",
"PLC",
"PLE",
"PLR",
"PLW",
"Q",
"RUF",
"S",
"T",
"TID",
"UP",
"W",
"YTT",
]
ignore = [
# Allow non-abstract empty methods in abstract base classes
"B027",
# Allow boolean positional values in function calls, like `dict.get(... True)`
"FBT003",
# Ignore checks for possible passwords
"S105", "S106", "S107",
# Ignore complexity
"C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
# Ignore unused variables
"F841",
# Ignore exception strings
"EM101", "EM102",
]
unfixable = [
# Don't touch unused imports
"F401",
]
[tool.ruff.pydocstyle]
convention = "google" # Accepts: "google", "numpy", or "pep257".
[tool.ruff.isort]
known-first-party = ["django_unicorn", "example"]
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.per-file-ignores]
# Tests can use magic values, assertions, and relative imports
"tests/**/*" = ["PLR2004", "S101", "TID252"]
[tool.coverage.run]
branch = true
parallel = true
[tool.coverage.report]
show_missing = true
skip_covered = true
skip_empty = true
[tool.poe]
envfile = ".env"
[tool.poe.tasks]
r = { cmd = "./manage.py runserver 0:8777", help = "Start dev server" }
mm = { cmd = "./manage.py makemigrations", help = "Make migrations" }
mi = { cmd = "./manage.py migrate", help = "Migrate the database" }
md = ["mm", "mi"]
m = { cmd = "./manage.py", help = "manage.py" }
t = { cmd = "pytest", help = "Run tests" }
tc = { cmd = "pytest --cov=.", help = "Run tests with coverage" }
c = { cmd = "coverage report", help = "Show coverage report" }
my = { cmd = "mypy .", help = "Run mypy" }
b = { cmd = "black . --check --quiet", help = "Run black" }
i = { cmd = "isort . --check --quiet", help = "Run isort" }
tm = ["b", "i", "t", "my"]
w = { cmd = "./manage.py qcluster", help = "Run worker" }
mo = { cmd = "modal deploy modal_runner/text_embeddings.py", help = "Deploy to modal" }
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"