-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
91 lines (76 loc) · 2.07 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
[tool.poetry]
name = "RSS to Jukebox Extended"
version = "1.0.0"
description = "Generates a Minecraft resource pack and JEXT discs.json"
authors = ["Ralph <[email protected]>"]
readme = "README.md"
license = "AGPL-3.0-or-later"
[tool.poetry.dependencies]
python = "^3.11"
python-dotenv = "1.0.0"
requests = "^2.31.0"
rss-parser = "^1.1.1"
python-ffmpeg = "^2.0.4"
pypng = "^0.20220715.0"
mutagen = "^1.47.0"
[tool.poetry.group.dev.dependencies]
black = "^23.9.1"
ruff = "^0.1.0"
pre-commit = "^3.5.0"
mypy = "^1.6.0"
types-requests = "^2.31.0.9"
[tool.poetry.group.optional.dependencies]
poethepoet = "^0.24.1"
[tool.poetry_bumpversion.file."src/__init__.py"]
search = '__version__ = "{current_version}"'
replace = '__version__ = "{new_version}"'
# Ruff ------------------------------------------------------------------------
[tool.ruff]
select = ["B", "D", "E", "F", "I", "N", "S", "W", "UP", "TCH"]
ignore = ["D102", "D103", "D211", "D213", "D400"]
line-length = 88
target-version = "py311"
src = ["src"]
[tool.ruff.format]
line-ending = "lf"
# PoeThePoet ------------------------------------------------------------------
[tool.poe.tasks]
lint.sequence = [
"ruff",
"black"
]
lint.ignore_fail = "return_non_zero"
test.sequence = [
"mypy"
]
test.ignore_fail = "return_non_zero"
test-docker.sequence = [
"clean",
"build-docker-local",
"fix-permissions"
]
[tool.poe.tasks.mypy]
cmd = "mypy src/"
[tool.poe.tasks.ruff]
cmd = "ruff check --verbose src/"
[tool.poe.tasks.black]
cmd = "black --check --verbose src/"
[tool.poe.tasks.clean]
cmd = """
find ./data/tmp -type f \
\\( -iname '*.mp3' -o -iname '*.ogg' \\) \
-exec rm --verbose --interactive=never {} +
"""
[tool.poe.tasks.build-docker-local]
shell = """
docker build . --file Dockerfile --tag rss2jext && \
docker container rm rss2jext; \
docker run \
--env-file ./.env \
--volume './data:/app/data' \
--name rss2jext \
rss2jext
"""
# Running docker with `--volume` will chown any new files in data/ to root:root
[tool.poe.tasks.fix-permissions]
cmd = "sudo chown --verbose -R $USER ./data"