[project] name = "Retool" dynamic = ["version"] description = "A better filter tool for Redump and No-Intro DAT files" readme = "readme.md" requires-python = ">=3.10" license = {file = "LICENSE"} keywords = ["filter", "1G1R", "Redump", "No-Intro", "DAT"] authors = [ {name = "unexpectedpanda", email = "fake@example.com"}, ] classifiers = [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", ] dependencies = [ "alive-progress>=3.3.0", "darkdetect>=0.8.0", "lxml>=6.0.2", "psutil>=7.1.3", "PySide6>=6.10.1", "strictyaml>=1.7.3", "validators>=0.35.0", ] [project.urls] Documentation = "https://unexpectedpanda.github.io/retool/" Issues = "https://github.com/unexpectedpanda/retool/issues" Source = "https://github.com/unexpectedpanda/retool" [build-system] requires = [ "hatchling", "hatch-pyinstaller", # requires the hatch-pyinstaller plugin ] build-backend = "hatchling.build" [project.scripts] retool = "retool:main" retoolgui = "retoolgui:main" # Hatch [tool.hatch.version] path = "modules/constants.py" [tool.hatch.build.targets.pyinstaller] # hatch build --target pyinstaller require-runtime-dependencies = true scriptname = "retoolgui.py" flags = ['-iimages/retool.ico', "--upx-dir=c:/upx", "--noconfirm"] collect-submodules = ["grapheme"] log-level = "WARN" zip = false [tool.hatch.build.targets.wheel] packages = ["retool.py", "retoolgui.py", "modules"] [[tool.hatch.envs.all.matrix]] python = ["3.10", "3.11", "3.12", "3.13"] [tool.hatch.envs.default.scripts] all = [ "hatch run style:fix", "hatch run types:check", "hatch run lint:check", "hatch run full:test", ] build = [ "all", "hatch run build:build" ] # Use UV for dependency installation [tool.hatch.envs.default] installer = "uv" # Hatch lint setup and scripts [tool.hatch.envs.lint] detached = true dependencies = [ "codespell", ] [tool.hatch.envs.lint.scripts] spelling = 'codespell retool.py retoolgui.py modules *.* -L ue -S modules/gui/resources_rc.py' check = ["spelling"] # Hatch style setup and scripts [tool.hatch.envs.style] type = "pip-compile" # requires the hatch-pip-compile dependency detached = true dependencies = [ "black", "isort", "ruff", ] [tool.hatch.envs.style.scripts] check = [ "isort --check-only --diff retool.py retoolgui.py modules tests", "black -q --check --diff retool.py retoolgui.py modules tests", "lint", ] lint = [ "ruff check retool.py retoolgui.py modules tests {args}" ] fix = [ "lint --fix", "format", ] format = [ "isort -q retool.py retoolgui.py modules tests", "black -q retool.py retoolgui.py modules tests", ] # Hatch types setup and scripts [tool.hatch.envs.types] dependencies = [ "mypy>=1.8.0", ] [tool.hatch.envs.types.scripts] check = [ "mypy --strict --install-types --non-interactive --python-version=3.10 retoolgui.py tests", ] # Hatch tool configuration [tool.black] line-length = 100 skip-string-normalization = true extend-exclude = "(modules/gui/resources_rc.py|modules/gui/retool_.*.py)" [tool.isort] profile = "black" line_length = 100 extend_skip=["modules/gui/resources_rc.py"] extend_skip_glob=["modules/gui/retool_*.py"] [tool.mypy] warn_unreachable = true no_implicit_optional = true show_error_codes = true [tool.ruff] lint.select = [ "F", "W", "E", "UP", "YTT", "C4", "DTZ", "FA", "ISC", "PIE", "T20", "RSE", "B002", "B003", "B005", "B007", "B009", "B012", "B013", "B014", "B015", "B018", "B020", "B021", "B023", "B026", "B033", "B034", "B905", "COM818", "D200", "D201", "D202", "D204", "D207", "D208", "D209", "D210", "D211", "D213", "D214", "D300", "D301", "D400", "D402", "D403", "D405", "D412", "D414", "D415", "D416", "D417", "D419", "G010", "PERF101", "PGH004", "PGH005", "FLY002", "PLC", "PLE", "PLR0124", "PLR0133", "PLR0206", "PLR0402", "PLR1722", "PLW0120", "PLW0127", "PLW0129", "PLW0131", "PLW0406", "PLW0602", "PLW0603", "PLW0711", "RUF001", "RUF005", "RUF007", "RUF010", "RUF013", "RUF100", "RUF200", "SIM101", "SIM107", "SIM201", "SIM202", "SIM208", "SIM210", "SIM211", "SIM300", "SIM401", "SIM910", ] lint.ignore = ["E501", "E731", "PLC0206", "PLC0415",] extend-exclude = ["modules/gui/resources_rc.py", "modules/gui/retool_*.py"] [tool.ruff.lint.flake8-comprehensions] allow-dict-calls-with-keyword-arguments = true # Hatch integration tests [tool.hatch.envs.quick] [[tool.hatch.envs.quick.matrix]] python = ["3.13"] [tool.hatch.envs.quick.scripts] clone_list_filters = "python -m tests.clone_list_filters" compilations = "python -m tests.compilations" determinism = "python -m tests.determinism" exclusions = "python -m tests.exclusions" label_retroachievements = "python -m tests.label_retroachievements" languages = "python -m tests.languages" list = "python -m tests.list" local_names = "python -m tests.local_names" machine_disk = "python -m tests.machine_disk" machine_tags = "python -m tests.machine_tags" mia = "python -m tests.mia" missing_header_data = "python -m tests.missing_header_data" missing_title_data = "python -m tests.missing_title_data" no_size_hash = "python -m tests.no_size_hash" numbered = "python -m tests.numbered" original_header = "python -m tests.original_header" overrides = "python -m tests.overrides" post_filters = "python -m tests.post_filters" prefer_licensed = "python -m tests.prefer_licensed" prefer_modern_rips = "python -m tests.prefer_modern_rips" prefer_oldest = "python -m tests.prefer_oldest" prefer_regions = "python -m tests.prefer_regions" prefer_retroachievements = "python -m tests.prefer_retroachievements" removes_dat = "python -m tests.removes_dat" report = "python -m tests.report" world_is_usa_europe_japan = "python -m tests.world_is_usa_europe_japan" regions = "python -m tests.regions" unit = "python -m tests.unit" test = [ "clone_list_filters", "compilations", "exclusions", "label_retroachievements", "languages", "list", "local_names", "machine_disk", "machine_tags", "mia", "missing_header_data", "missing_title_data", "numbered", "no_size_hash", "original_header", "overrides", "post_filters", "prefer_licensed", "prefer_modern_rips", "prefer_oldest", "prefer_regions", "prefer_retroachievements", "removes_dat", "report", "world_is_usa_europe_japan", "regions", "unit", ] [tool.hatch.envs.full] [[tool.hatch.envs.full.matrix]] python = ["3.10", "3.11", "3.12", "3.13"] [tool.hatch.envs.full.scripts] clone_list_filters = "python -m tests.clone_list_filters" compilations = "python -m tests.compilations" exclusions = "python -m tests.exclusions" label_retroachievements = "python -m tests.label_retroachievements" languages = "python -m tests.languages" list = "python -m tests.list" local_names = "python -m tests.local_names" machine_disk = "python -m tests.machine_disk" machine_tags = "python -m tests.machine_tags" mia = "python -m tests.mia" missing_header_data = "python -m tests.missing_header_data" missing_title_data = "python -m tests.missing_title_data" no_size_hash = "python -m tests.no_size_hash" numbered = "python -m tests.numbered" original_header = "python -m tests.original_header" overrides = "python -m tests.overrides" post_filters = "python -m tests.post_filters" prefer_licensed = "python -m tests.prefer_licensed" prefer_modern_rips = "python -m tests.prefer_modern_rips" prefer_oldest = "python -m tests.prefer_oldest" prefer_regions = "python -m tests.prefer_regions" prefer_retroachievements = "python -m tests.prefer_retroachievements" removes_dat = "python -m tests.removes_dat" report = "python -m tests.report" world_is_usa_europe_japan = "python -m tests.world_is_usa_europe_japan" determinism = "python -m tests.determinism" regions = "python -m tests.regions" unit = "python -m tests.unit" features = [ "clone_list_filters", "compilations", "exclusions", "label_retroachievements", "languages", "list", "local_names", "machine_disk", "machine_tags", "mia", "missing_header_data", "missing_title_data", "numbered", "no_size_hash", "original_header", "overrides", "post_filters", "prefer_licensed", "prefer_modern_rips", "prefer_oldest", "prefer_regions", "prefer_retroachievements", "removes_dat", "report", "world_is_usa_europe_japan", ] test = [ "features", "determinism", "regions", "unit", ]