2022-06-22 12:48:18 +02:00
|
|
|
[build-system]
|
2024-02-01 13:59:45 +01:00
|
|
|
requires = ["hatchling>=1.18", "hatch-regex-commit>=0.0.3"]
|
2022-06-22 12:48:18 +02:00
|
|
|
build-backend = "hatchling.build"
|
|
|
|
|
2022-06-21 12:52:09 +02:00
|
|
|
[project]
|
|
|
|
name = "manga-dlp"
|
|
|
|
description = "A cli manga downloader"
|
|
|
|
readme = "README.md"
|
|
|
|
license = "MIT"
|
|
|
|
requires-python = ">=3.8"
|
2023-02-18 12:23:50 +01:00
|
|
|
authors = [{ name = "Ivan Schaller", email = "ivan@schaller.sh" }]
|
|
|
|
keywords = ["manga", "downloader", "mangadex"]
|
2022-06-21 12:52:09 +02:00
|
|
|
classifiers = [
|
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
"Natural Language :: English",
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
"Programming Language :: Python :: 3.8",
|
|
|
|
"Programming Language :: Python :: 3.9",
|
|
|
|
"Programming Language :: Python :: 3.10",
|
2024-02-01 13:59:45 +01:00
|
|
|
"Programming Language :: Python :: 3.11",
|
2022-06-21 12:52:09 +02:00
|
|
|
]
|
|
|
|
dependencies = [
|
2022-12-29 18:13:19 +01:00
|
|
|
"requests>=2.28.0",
|
|
|
|
"loguru>=0.6.0",
|
|
|
|
"click>=8.1.3",
|
|
|
|
"click-option-group>=0.5.5",
|
2023-02-18 12:23:50 +01:00
|
|
|
"xmltodict>=0.13.0",
|
2024-02-01 13:59:45 +01:00
|
|
|
"img2pdf>=0.4.4",
|
|
|
|
"pytz==2022.1",
|
2022-06-21 12:52:09 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
[project.urls]
|
|
|
|
Homepage = "https://github.com/olofvndrhr/manga-dlp"
|
2024-02-01 13:59:45 +01:00
|
|
|
History = "https://github.com/olofvndrhr/manga-dlp/commits/master"
|
|
|
|
Tracker = "https://github.com/olofvndrhr/manga-dlp/issues"
|
|
|
|
Source = "https://github.com/olofvndrhr/manga-dlp"
|
2022-06-21 12:52:09 +02:00
|
|
|
|
|
|
|
[project.scripts]
|
2024-02-01 13:59:45 +01:00
|
|
|
mangadlp = "mangadlp.cli:main"
|
2022-12-29 18:13:19 +01:00
|
|
|
manga-dlp = "mangadlp.cli:main"
|
2022-06-21 12:52:09 +02:00
|
|
|
|
2022-07-23 00:30:28 +02:00
|
|
|
[tool.hatch.version]
|
2024-02-01 13:59:45 +01:00
|
|
|
source = "regex_commit"
|
|
|
|
path = "src/mangadlp/__about__.py"
|
|
|
|
tag_sign = false
|
2022-07-23 00:30:28 +02:00
|
|
|
|
2022-06-25 14:29:09 +02:00
|
|
|
[tool.hatch.build]
|
|
|
|
ignore-vcs = true
|
|
|
|
|
|
|
|
[tool.hatch.build.targets.sdist]
|
2024-02-01 13:59:45 +01:00
|
|
|
packages = ["src/mangadlp"]
|
2022-06-25 14:29:09 +02:00
|
|
|
|
|
|
|
[tool.hatch.build.targets.wheel]
|
2024-02-01 13:59:45 +01:00
|
|
|
packages = ["src/mangadlp"]
|
|
|
|
|
|
|
|
### envs
|
2022-06-25 14:29:09 +02:00
|
|
|
|
2022-08-15 14:44:31 +02:00
|
|
|
[tool.hatch.envs.default]
|
|
|
|
dependencies = [
|
2024-02-01 13:59:45 +01:00
|
|
|
"pytest==7.4.3",
|
|
|
|
"coverage==7.3.2",
|
2022-08-15 14:44:31 +02:00
|
|
|
]
|
|
|
|
|
2024-02-01 13:59:45 +01:00
|
|
|
[tool.hatch.envs.default.scripts]
|
|
|
|
test = "pytest {args:tests}"
|
|
|
|
test-cov = ["coverage erase", "coverage run -m pytest {args:tests}"]
|
|
|
|
cov-report = ["- coverage combine", "coverage report", "coverage xml"]
|
|
|
|
cov = ["test-cov", "cov-report"]
|
2023-07-02 16:40:09 +02:00
|
|
|
|
2024-02-01 13:59:45 +01:00
|
|
|
[[tool.hatch.envs.lint.matrix]]
|
|
|
|
python = ["3.8", "3.9", "3.10", "3.11"]
|
2023-07-02 16:40:09 +02:00
|
|
|
|
2024-02-01 13:59:45 +01:00
|
|
|
[tool.hatch.envs.lint]
|
|
|
|
detached = true
|
|
|
|
dependencies = [
|
|
|
|
"mypy==1.7.1",
|
|
|
|
"ruff==0.1.7",
|
|
|
|
]
|
2023-02-18 16:21:03 +01:00
|
|
|
|
2024-02-01 13:59:45 +01:00
|
|
|
[tool.hatch.envs.lint.scripts]
|
|
|
|
typing = "mypy --non-interactive --install-types {args:src/mangadlp}"
|
|
|
|
style = ["ruff check --diff {args:src/mangadlp}", "ruff format --check --diff {args:src/mangadlp}"]
|
|
|
|
fmt = ["ruff format {args:src/mangadlp}", "ruff check --fix {args:src/mangadlp}", "style"]
|
|
|
|
all = ["style", "typing"]
|
2023-02-18 16:21:03 +01:00
|
|
|
|
2024-02-01 13:59:45 +01:00
|
|
|
### ruff
|
2023-02-18 12:23:50 +01:00
|
|
|
|
|
|
|
[tool.ruff]
|
2024-02-01 13:59:45 +01:00
|
|
|
target-version = "py38"
|
2023-07-02 16:40:09 +02:00
|
|
|
line-length = 100
|
2024-02-01 13:59:45 +01:00
|
|
|
indent-width = 4
|
2023-02-18 12:23:50 +01:00
|
|
|
fix = true
|
2023-02-18 16:21:03 +01:00
|
|
|
show-fixes = true
|
2023-02-18 12:23:50 +01:00
|
|
|
ignore-init-module-imports = true
|
|
|
|
respect-gitignore = true
|
2024-02-01 13:59:45 +01:00
|
|
|
src = ["src", "tests"]
|
2023-02-18 12:23:50 +01:00
|
|
|
exclude = [
|
|
|
|
".direnv",
|
|
|
|
".git",
|
|
|
|
".mypy_cache",
|
|
|
|
".ruff_cache",
|
|
|
|
".svn",
|
2024-02-01 13:59:45 +01:00
|
|
|
".tox",
|
|
|
|
".nox",
|
2023-02-18 12:23:50 +01:00
|
|
|
".venv",
|
|
|
|
"venv",
|
|
|
|
"__pypackages__",
|
|
|
|
"build",
|
|
|
|
"dist",
|
2024-02-01 13:59:45 +01:00
|
|
|
"node_modules",
|
2023-02-18 12:23:50 +01:00
|
|
|
"venv",
|
|
|
|
]
|
|
|
|
|
2024-02-01 13:59:45 +01:00
|
|
|
[tool.ruff.lint]
|
|
|
|
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 = ["E501", "D103", "D100", "D102", "PLR2004", "D403", "ISC001", "FBT001", "FBT002", "FBT003", "W505"]
|
|
|
|
unfixable = ["F401"]
|
|
|
|
|
|
|
|
[tool.ruff.format]
|
|
|
|
quote-style = "double"
|
|
|
|
indent-style = "space"
|
|
|
|
skip-magic-trailing-comma = false
|
|
|
|
line-ending = "lf"
|
|
|
|
|
2023-02-18 12:23:50 +01:00
|
|
|
[tool.ruff.per-file-ignores]
|
2024-02-01 13:59:45 +01:00
|
|
|
"__init__.py" = ["D104"]
|
2023-07-02 16:40:09 +02:00
|
|
|
"__about__.py" = ["D104", "F841"]
|
2024-02-01 13:59:45 +01:00
|
|
|
"tests/**/*" = ["PLR2004", "S101", "TID252"]
|
|
|
|
|
|
|
|
[tool.ruff.pyupgrade]
|
|
|
|
keep-runtime-typing = true
|
|
|
|
|
|
|
|
[tool.ruff.isort]
|
|
|
|
lines-after-imports = 2
|
|
|
|
known-first-party = ["mangadlp"]
|
|
|
|
|
|
|
|
[tool.ruff.flake8-tidy-imports]
|
|
|
|
ban-relative-imports = "all"
|
2023-02-18 12:23:50 +01:00
|
|
|
|
|
|
|
[tool.ruff.pylint]
|
2024-02-01 13:59:45 +01:00
|
|
|
max-branches = 24
|
|
|
|
max-returns = 12
|
|
|
|
max-statements = 100
|
|
|
|
max-args = 15
|
|
|
|
allow-magic-value-types = ["str", "bytes", "complex", "float", "int"]
|
2023-02-18 12:23:50 +01:00
|
|
|
|
|
|
|
[tool.ruff.mccabe]
|
2024-02-01 13:59:45 +01:00
|
|
|
max-complexity = 15
|
2023-02-18 12:23:50 +01:00
|
|
|
|
|
|
|
[tool.ruff.pydocstyle]
|
|
|
|
convention = "google"
|
|
|
|
|
|
|
|
[tool.ruff.pycodestyle]
|
2023-07-02 16:40:09 +02:00
|
|
|
max-doc-length = 100
|
2023-02-18 12:23:50 +01:00
|
|
|
|
2024-02-01 13:59:45 +01:00
|
|
|
### mypy
|
|
|
|
|
|
|
|
[tool.mypy]
|
|
|
|
#plugins = ["pydantic.mypy"]
|
|
|
|
follow_imports = "silent"
|
|
|
|
warn_redundant_casts = true
|
|
|
|
warn_unused_ignores = true
|
|
|
|
disallow_any_generics = true
|
|
|
|
check_untyped_defs = true
|
|
|
|
no_implicit_reexport = true
|
|
|
|
ignore_missing_imports = true
|
|
|
|
warn_return_any = true
|
|
|
|
pretty = true
|
|
|
|
show_column_numbers = true
|
|
|
|
show_error_codes = true
|
|
|
|
show_error_context = true
|
|
|
|
|
|
|
|
#[tool.pydantic-mypy]
|
|
|
|
#init_forbid_extra = true
|
|
|
|
#init_typed = true
|
|
|
|
#warn_required_dynamic_aliases = true
|
|
|
|
|
|
|
|
### pytest
|
2023-02-18 12:23:50 +01:00
|
|
|
[tool.pytest.ini_options]
|
2024-02-01 13:59:45 +01:00
|
|
|
pythonpath = ["src"]
|
|
|
|
addopts = "--color=yes --exitfirst --verbose -ra"
|
|
|
|
#addopts = "--color=yes --exitfirst --verbose -ra --capture=tee-sys"
|
|
|
|
filterwarnings = [
|
|
|
|
'ignore:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning',
|
|
|
|
]
|
2023-02-18 12:23:50 +01:00
|
|
|
|
2024-02-01 13:59:45 +01:00
|
|
|
### coverage
|
2022-06-25 14:29:09 +02:00
|
|
|
|
2022-06-21 12:52:09 +02:00
|
|
|
[tool.coverage.run]
|
2024-02-01 13:59:45 +01:00
|
|
|
source_pkgs = ["mangadlp", "tests"]
|
|
|
|
branch = true
|
|
|
|
parallel = true
|
|
|
|
omit = ["src/mangadlp/__about__.py"]
|
|
|
|
|
|
|
|
[tool.coverage.paths]
|
|
|
|
testproj = ["src/mangadlp", "*/mangadlp/src/mangadlp"]
|
|
|
|
tests = ["tests", "*/mangadlp/tests"]
|
2022-06-21 12:52:09 +02:00
|
|
|
|
|
|
|
[tool.coverage.report]
|
|
|
|
# Regexes for lines to exclude from consideration
|
|
|
|
exclude_lines = [
|
|
|
|
# Have to re-enable the standard pragma
|
|
|
|
"pragma: no cover",
|
|
|
|
# Don't complain about missing debug-only code:
|
|
|
|
"def __repr__",
|
|
|
|
"if self.debug",
|
|
|
|
# Don't complain if tests don't hit defensive assertion code:
|
|
|
|
"raise AssertionError",
|
|
|
|
"raise NotImplementedError",
|
|
|
|
# Don't complain if non-runnable code isn't run:
|
|
|
|
"if 0:",
|
|
|
|
"if __name__ == .__main__.:",
|
|
|
|
# Don't complain about abstract methods, they aren't run:
|
|
|
|
"@(abc.)?abstractmethod",
|
2024-02-01 13:59:45 +01:00
|
|
|
"no cov",
|
|
|
|
"if TYPE_CHECKING:",
|
2022-06-21 12:52:09 +02:00
|
|
|
]
|
2024-02-01 13:59:45 +01:00
|
|
|
# ignore_errors = true
|