[build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "wikiget" dynamic = ["version"] description = "CLI tool for downloading files from MediaWiki sites" readme = "README.md" authors = [ {name = "Cody Logan", email = "cody@lokken.dev"} ] requires-python = ">=3.7" license = {text = "GPL-3.0-or-later"} keywords = ["commons", "mediawiki", "wikimedia", "wikipedia"] classifiers = [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: System :: Networking", "Topic :: Utilities", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] dependencies = [ "mwclient>=0.10.0", "requests", "tqdm", ] [project.urls] Repository = "https://github.com/clpo13/wikiget" "Bug Reports" = "https://github.com/clpo13/wikiget/issues" [project.scripts] wikiget = "wikiget.wikiget:cli" [tool.hatch.version] path = "src/wikiget/version.py" [tool.pytest.ini_options] addopts = [ "--import-mode=importlib", ] testpaths = ["tests"] [tool.hatch.build.targets.sdist] exclude = [ "/.github", ] [tool.hatch.build.targets.wheel.shared-data] "docs/wikiget.1" = "share/man/man1/wikiget.1" "README.md" = "share/doc/wikiget/README.md" "LICENSE" = "share/doc/wikiget/LICENSE" [tool.hatch.envs.default] dependencies = [ "coverage[toml]>=6.5", "pytest", "requests_mock", ] [tool.hatch.envs.default.scripts] test = "python -m pytest {args}" test-cov = "coverage run -m pytest {args}" cov-report = [ "- coverage combine", "coverage report", ] htmlcov = "coverage html" xmlcov = "coverage xml" cov = [ "test-cov", "cov-report", "htmlcov", "xmlcov", ] [[tool.hatch.envs.all.matrix]] python = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] [tool.hatch.envs.lint] detached = true dependencies = [ "black", "mypy", "ruff", ] [tool.hatch.envs.lint.scripts] typing = "mypy --install-types --non-interactive {args:src/wikiget tests}" style = [ "ruff {args:.}", "black --check --diff {args:.}", ] fmt = [ "black {args:.}", "ruff --fix {args:.}", "style", ] all = [ "style", "typing", ] [tool.black] target-version = ["py37"] line-length = 88 [tool.ruff] target-version = "py37" line-length = 88 select = [ "A", "ARG", "B", "C", "DTZ", "E", "EM", "F", "FA", "FBT", "G", "I", "ICN", "ISC", "N", "PLC", "PLE", "PLR", "PLW", "PT", "Q", "RUF", "S", "T", "TCH", "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", ] unfixable = [ # Don't touch unused imports "F401", ] [tool.ruff.isort] known-first-party = ["wikiget"] [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] source_pkgs = ["wikiget"] branch = true parallel = true [tool.coverage.paths] wikiget = ["wikiget"] tests = ["tests"] [tool.coverage.report] exclude_lines = [ "no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:", ] [tool.mypy] python_version = "3.7" warn_unused_configs = true warn_redundant_casts = true warn_unused_ignores = true strict_equality = true check_untyped_defs = true extra_checks = true disallow_untyped_defs = true [[tool.mypy.overrides]] module = [ "mwclient", "mwclient.image", "pytest", "requests_mock", ] ignore_missing_imports = true