typed-format-version 0.2.2

Load format.version.{major,minor} from a structured file.
Documentation
# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net>
# SPDX-License-Identifier: BSD-2-Clause

[tox]
minversion = 4.1
envlist =
  ruff
  format
  mypy
  reuse
  unit-tests
isolated_build = True

[defs]
pyfiles =
  python/src/typed_format_version \
  python/tests/unit

[testenv:ruff]
skip_install = True
tags =
  check
  quick
deps =
  -r python/requirements/ruff.txt
commands =
  ruff check -- {[defs]pyfiles}

[testenv:format]
skip_install = True
tags =
  check
  quick
deps =
  -r python/requirements/ruff.txt
commands =
  ruff check --config ruff-base.toml --select=D,I --diff -- {[defs]pyfiles}
  ruff format --check --config ruff-base.toml --diff -- {[defs]pyfiles}

[testenv:reformat]
skip_install = True
tags =
  format
  manual
deps =
  -r python/requirements/ruff.txt
commands =
  ruff check --config ruff-base.toml --select=D,I --fix -- {[defs]pyfiles}
  ruff format --config ruff-base.toml -- {[defs]pyfiles}

[testenv:mypy]
skip_install = True
tags =
  check
deps =
  -r python/requirements/test-unit.txt
  mypy >= 1, < 2
setenv =
  MYPY_CACHE_DIR = {toxworkdir}/.mypy_cache
commands =
  mypy {[defs]pyfiles}

[testenv:unit-tests]
tags =
  tests
deps =
  -r python/requirements/test-unit.txt
commands =
  pytest {posargs} python/tests/unit

[testenv:reuse]
skip_install = True
tags =
  check
  quick
deps =
  reuse >= 2, < 3
commands =
  reuse lint

[testenv:docs]
skip_install = True
tags =
  docs
  manual
deps =
  -r python/requirements/docs.txt
commands =
  mkdocs build

[testenv:pyupgrade]
skip_install = True
tags =
  upgrade
  manual
deps =
  pyupgrade >= 3, < 4
allowlist_externals =
  sh
commands =
  sh -c 'pyupgrade --py38-plus python/src/typed_format_version/*.py python/tests/unit/*.py'