gpchelkin/scdlbot

View on GitHub
pyproject.toml

Summary

Maintainability
Test Coverage
[build-system]
requires = ["poetry-core>=1.4.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "scdlbot"
description = "Telegram Bot for downloading MP3 rips of tracks/sets from SoundCloud, Bandcamp, YouTube with tags and artwork"
version = "0.15.0"
license = "MIT"

authors = ["George Pchelkin <george@pchelk.in>"]

readme = "README.rst"

homepage = "https://github.com/gpchelkin/scdlbot"
documentation = "https://scdlbot.readthedocs.io"
repository = "https://github.com/gpchelkin/scdlbot"

keywords = ["scdlbot", "telegram", "bot", "soundcloud", "bandcamp", "youtube", "mixcloud", "yandex", "audio", "music", "download"]

classifiers = [
  "Development Status :: 4 - Beta",
  "Intended Audience :: Developers",
  "Intended Audience :: System Administrators",
  "Topic :: Multimedia :: Sound/Audio",
  "Topic :: Internet",
  "Operating System :: OS Independent",
  "Natural Language :: English",
]

include = ["AUTHORS.rst", "CONTRIBUTING.md", "CHANGELOG.rst", "LICENSE", "README.rst", "tests/*", "docs/*.rst", "docs/conf.py", "docs/Makefile", "docs/*.jpg", "docs/*.png", "docs/*.gif", "scdlbot/texts/*"]

[tool.poetry.urls]
# https://github.com/python-poetry/poetry/blob/master/docs/pyproject.md#urls
"Issues" = "https://github.com/gpchelkin/scdlbot/issues"
"CI" = "https://github.com/gpchelkin/scdlbot/actions"
"Changelog" = "https://github.com/gpchelkin/scdlbot/releases"
#"Changelog" = "https://github.com/gpchelkin/scdlbot/blob/master/CHANGELOG.rst"

[tool.poetry.scripts]
scdlbot = "scdlbot.__main__:main"

[tool.poetry.dependencies]
python = "^3.9"
python-telegram-bot = { version = "21.1.1", extras = ["webhooks", "job-queue", "http2"] }
#ptbcontrib = { git = "https://github.com/python-telegram-bot/ptbcontrib.git", branch = "main", extras = ["postgres-persistence"] }
# https://python-poetry.org/docs/dependency-specification#path-dependencies
#ptbcontrib = { path = "../ptbcontrib/", develop = false }
requests = { version = "^2.31.0", extras = ["socks"] }
boltons = "^24.0.0"
mutagen = "^1.47.0"
plumbum = "^1.8.2"
ffmpeg-python = "0.2.0"
prometheus_client = "^0.20.0"
sdnotify = "^0.3.2"
fake-useragent = "^1.5.1"
#python-telegram-handler = "^2.2.1"
#patool = "1.12"
#pyshorteners = "1.0.1"
#transliterate = "1.10.2"

### For publishing to PyPI at release:
# https://github.com/yt-dlp/yt-dlp/wiki/Forks
#yt-dlp = "2024.3.10"
##youtube_dl = "2021.12.17"
##youtube-dlc = "2020.11.11.post3"
#scdl = "2.7.4"
#bandcamp-downloader = "0.0.13"

### For making it work better using latest git revision:
yt-dlp = { git = "https://github.com/yt-dlp/yt-dlp.git", branch = "master" }
##yt-dlp = { git = "https://github.com/pritam20ps05/yt-dlp.git", branch = "instagram_fix" }
##ytdl-patched = { git = "https://github.com/ytdl-patched/ytdl-patched.git", branch = "ytdlp" }
##youtube_dl = { git = "https://github.com/l1ving/youtube-dl.git" }
##youtube_dl = { git = "https://github.com/gilou/youtube-dl.git", branch = "bandcamp_update" }
##youtube_dl = { git = "https://github.com/gpchelkin/youtube-dl.git", branch = "bandcamp_update" }
##youtube-dlc = { git = "https://github.com/blackjack4494/yt-dlc.git", branch = "master" }
scdl = { git = "https://github.com/flyingrub/scdl.git", branch = "master" }
##scdl = { git = "https://github.com/gpchelkin/scdl.git", branch = "add_permalink_url_to_filename" }
##scdl = { git = "https://github.com/def-hash/scdl.git", branch = "user-agent-fix" }
##scdl = { git = "https://github.com/7x11x13/scdl.git", branch = "master" }
bandcamp-downloader = { git = "https://github.com/iheanyi/bandcamp-dl.git", branch = "master" }
##bandcamp-downloader = { git = "https://github.com/gpchelkin/bandcamp-dl.git", branch = "demjson3" }
#fake-useragent = { git = "https://github.com/fake-useragent/fake-useragent.git", tag = "1.1.2" }

[tool.poetry.group.dev]
# must be false if tox-poetry is used (it doesn't support groups):
optional = true

[tool.poetry.group.dev.dependencies]
# make additional external tools: poetry, tox, (tox-poetry)
# make format:
isort = "^5.12"
black = "^24.4.0"
# make lint:
wemake-python-styleguide = "^0.19.2"
doc8 = "^1.1"
nitpick = "^0.35"
safety = "^3.1"
#flakeheaven = "^3.3"

[tool.poetry.group.docs]
optional = true

[tool.poetry.group.docs.dependencies]
sphinx = "^7.3"
sphinx-autodoc-typehints = "^2.1.0"
m2r2 = "^0.3"
tomli = "^2.0"
recommonmark = "^0.7"
typing-extensions = "^4.9"


[tool.isort]
# isort configuration:
# https://pycqa.github.io/isort/docs/configuration/options.html
# https://pycqa.github.io/isort/docs/configuration/profiles.html
# https://pycqa.github.io/isort/docs/configuration/multi_line_output_modes.html#3-vertical-hanging-indent
multi_line_output = 3
include_trailing_comma = true
use_parentheses = true
# match flake8 max-line-length:
line_length = 180

[tool.black]
# match flake8 max-line-length:
line-length = 180

[tool.nitpick]
style = "https://raw.githubusercontent.com/wemake-services/wemake-python-styleguide/master/styles/nitpick-style-wemake.toml"

[tool.flakeheaven]
# TODO flakeheaven
# https://github.com/flakeheaven/flakeheaven
# https://wemake-python-styleguide.readthedocs.io/en/latest/pages/usage/integrations/flakehell.html
# https://github.com/wemake-services/wemake-python-styleguide/blob/master/styles/flakehell.toml
format = "grouped"
show_source = true
statistics = false
doctests = true
enable_extensions = "G"
accept_encodings = "utf-8"
max_complexity = 6
max_line_length = 180
ignore = "D100, D104, D401, W504, RST303, RST304, DAR103, DAR203"
# poetry run flakeheaven baseline > .flakeheaven_baseline
baseline = ".flakeheaven_baseline"
[tool.flakeheaven.plugins]
"flake8-*" = ["+*"]
mccabe = ["+*"]
nitpick = ["+*"]
"pep8-naming" = ["+*"]
pycodestyle = ["+*"]
pyflakes = ["+*"]
"wemake-python-styleguide" = ["+*"]

[tool.tox]
# TODO https://github.com/python-poetry/poetry/blob/master/docs/faq.md#is-tox-supported
legacy_tox_ini = """
[tox]
skipsdist = true
envlist = py39, py310, py311

[gh-actions]
#tox-gh-actions: run tox only on envs which match github actions workflow python version (one env per job)
python =
    3.9: py39
    3.10: py310
    3.11: py311

[testenv]
allowlist_externals =
    make
    poetry
# either use command 'poetry install',
# or use tox-poetry - it will install main and dev deps to venv with poetry
commands =
    poetry install --with main,dev --verbose
    make test
"""