Files
gnwmanager/pyproject.toml
2025-02-21 09:19:46 -05:00

186 lines
3.9 KiB
TOML

[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=0.21.5"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "semver"
[tool.poetry]
name = "gnwmanager"
version = "0.0.0" # Do not change, let poetry-dynamic-versioning handle it.
homepage = "https://github.com/BrianPugh/gnwmanager"
repository = "https://github.com/BrianPugh/gnwmanager"
license = "Apache-2.0"
description = ""
authors = ["Brian Pugh"]
readme = "README.md"
packages = [{include = "gnwmanager"}]
include = [
{path="gnwmanager/firmware.bin", format=["sdist", "wheel"]},
{path="gnwmanager/unlock.bin", format=["sdist", "wheel"]},
{path="gnwmanager/cli/gnw_patch/binaries/mario/*.bin", format=["sdist", "wheel"]},
{path="gnwmanager/cli/gnw_patch/binaries/zelda/*.bin", format=["sdist", "wheel"]},
]
[tool.poetry.scripts]
gnwmanager = "gnwmanager.cli.main:run_app"
[tool.poetry.extras]
pyocd = ["pyocd"]
[tool.poetry.dependencies]
python = "^3.9"
cyclopts = "^3.9.0"
pyocd = { version=">=0.35.1", optional=true }
littlefs-python = ">=0.9.0"
tqdm = "^4.66.6"
pillow = "^10.3.0"
tamp = "^1.6.0"
rich = "^13.9.4"
pyelftools = ">=0.29"
autoregistry = "^1.0.0"
psutil = "^6.1.0"
httpx = "^0.28.1"
colorama = "^0.4.6"
pycryptodome = "^3.21.0"
[tool.poetry.group.docs.dependencies]
sphinx = ">=6.2.1,<7.2.0"
sphinx_rtd_theme = ">=1.2.2,<2.1.0"
gitpython = ">=3.1.31"
sphinx-copybutton = "^0.5.2"
[tool.poetry.group.dev.dependencies]
coverage = {extras = ["toml"], version = ">=5.1"}
pre_commit = ">=2.16.0"
pytest = ">=7.1.2"
pytest-cov = ">=3.0.0"
pytest-mock = ">=3.7.0"
keystone-engine = "^0.9.2"
[tool.poetry.group.debug]
optional = true
[tool.poetry.group.debug.dependencies]
ipdb = ">=0.13.9"
line_profiler = ">=3.5.1"
[tool.coverage.run]
branch = true
omit = [
"tests/*",
]
[tool.coverage.report]
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:",
"if debug:",
"if 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 False:",
"if __name__ == .__main__.:",
]
[tool.pyright]
venvPath = "."
venv = ".venv"
[tool.ruff]
target-version = 'py38'
exclude = [
"migrations",
"__pycache__",
"manage.py",
"settings.py",
"env",
".env",
"venv",
".venv",
]
line-length = 120 # Must agree with Black
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # Error
"F", # pyflakes
"I", # isort
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PGH", # pygrep-hooks
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"SIM", # flake8-simplify
"TRY", # tryceratops
"UP", # pyupgrade
"W", # Warning
"YTT", # flake8-2020
]
ignore = [
"B905", # zip strict=True; remove once python <3.10 support is dropped.
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"D200",
"D401",
"E402",
"E501",
"F401",
"SIM108", # Use ternary operator instead of `if`-`else`-block
"TRY003", # Avoid specifying messages outside exception class; overly strict, especially for ValueError
]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
"chr",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"PGH001", # use of "eval"
]
[tool.ruff.lint.pep8-naming]
staticmethod-decorators = [
"pydantic.validator",
"pydantic.root_validator",
]
[tool.codespell]
skip = 'poetry.lock,'
ignore-words-list = "ptd,hsi"