@@ -9,37 +9,45 @@ classifiers = [
99 " License :: OSI Approved :: MIT License" ,
1010 " Programming Language :: Python :: 3" ,
1111 " Operating System :: OS Independent" ,
12+ " Programming Language :: Python :: 3" ,
13+ " Programming Language :: Python :: 3.8" ,
14+ " Programming Language :: Python :: 3.9" ,
15+ " Programming Language :: Python :: 3.10" ,
16+ " Programming Language :: Python :: 3.11" ,
17+ " Programming Language :: Python :: 3.12" ,
18+ " Programming Language :: Python :: 3.13" ,
1219 " Topic :: Software Development :: Embedded Systems" ,
20+ " Topic :: Software Development :: Libraries" ,
21+ " Typing :: Typed" ,
1322]
1423requires-python = " >=3.8"
24+ dynamic = [" version" ]
1525dependencies = [
1626 " esptool>=4.6.2" ,
1727 " rich>=10.12.0" ,
1828 " more-itertools>=8.8.0" ,
1929 " typing-extensions>=4.12" ,
2030]
21- dynamic = [" version" ]
31+ optional-dependencies.littlefs = [
32+ " littlefs-python>=0.12.0" ,
33+ ]
2234
2335[project .scripts ] # The entry points for the command line tools
2436mp-image-tool-esp32 = " mp_image_tool_esp32.main:main"
2537
26- [project .optional-dependencies ]
27- littlefs = [" littlefs-python>=0.12.0" ]
28-
2938[dependency-groups ]
30- typing = [" mypy>=0.910" , " types-requests>=2.32.0.20240914" , " types-pyserial>=3.5" ]
39+ typing = [
40+ " mypy>=0.910" , " types-requests>=2.32" , " types-pyserial>=3.5" , " types-pyyaml>=6.0"
41+ ]
3142test = [
3243 {include-group = " typing" },
33- " ruff>=0.6.7" , " pytest>=8.3.2" , " pytest-cov>=3.0.0" , " requests>=2.32.3 " ,
34- " pyyaml>=6.0.2" , " tox>=4.22.0" , " tox-uv>=0.3.0 " ,
44+ " ruff>=0.6.7" , " pytest>=8.3.2" , " pytest-cov>=3.0.0" , " pytest-sugar>=1.0.0 " ,
45+ " requests>=2.32.3 " , " pyyaml>=6.0.2" , " tox>=4.22.0" , " tox-uv>=1.13 " ,
3546]
3647dev = [
3748 {include-group = " test" },
38- " keyring>=25" , # For uv publish --keyring-provider=subprocess
39- # Used by .git/hooks/post-{commit,checkout} to update _version.py:
40- # uv run --frozen hatch build --hooks-only
41- " hatch>=1.12.0" ,
42- " hatch-vcs>=0.3.0" , # For building and updating _version.py
49+ # For building and updating _version.py
50+ " hatch>=1.12.0" , " hatch-vcs>=0.3.0" , " pip>=25.0.1" ,
4351]
4452
4553[build-system ]
@@ -48,9 +56,8 @@ build-backend = "hatchling.build"
4856
4957# Build python packages and update version number
5058[tool .hatch ]
51- build.targets.wheel.packages = [" src/mp_image_tool_esp32" ]
52- version.source = " vcs" # Get the version from git, eg: 0.0.6.dev0+g1234567
5359build.hooks.vcs.version-file = " src/mp_image_tool_esp32/_version.py"
60+ version.source = " vcs" # Get the version from git, eg: 0.0.6.dev0+g1234567
5461# Drop the local version part (eg: +g1234567) or pypi will reject package
5562version.raw-options.local_scheme = " no-local-version"
5663# A manually triggered github release workflow may generate a new tag
@@ -64,40 +71,40 @@ version.raw-options.git_describe_command = [
6471 " --match" , " v*.[0-9][0-9][0-9]" ,
6572]
6673
67- # https://tox.wiki/en/latest/config.html#pyproject-toml-native
68- [tool .tox ]
69- requires = [" tox>=4.22" , " tox-uv>=1.13" ]
70- env_list = [
71- " clean" , " typing" , " lint" , " format" ,
72- " 3.8" , " 3.9" , " 3.10" , " 3.11" , " 3.12" , " 3.13"
73- ]
74- env.clean.commands = [[" coverage" , " erase" ]] # Cleanup coverage data
75- env.clean.skip_install = true
76- env.typing.commands = [[" mypy" ]]
77- env.lint.commands = [[" ruff" , " check" ]]
78- env.format.commands = [[" ruff" , " format" , " --check" ]]
79- env.3.8.commands = [[" pytest" , " --cov=mp_image_tool_esp32" ]]
80- env.3.13.commands = [[" pytest" , " --cov=mp_image_tool_esp32" ]]
81- env_run_base.commands = [[" pytest" ]]
82- env_run_base.dependency_groups = [" test" ]
83- env_run_base.extras = [" littlefs" ] # Include optional dependencies
84- env_run_base.package = " wheel" # Build package wheel and install into environments
85- env_run_base.wheel_build_env = " .pkg" # Re-use one wheel for each environment
86-
8774[tool .mypy ]
88- files = [" src" ]
75+ files = [" src" , " tests " ]
8976python_version = " 3.9"
77+ mypy_path = " typings"
9078disallow_untyped_defs = true
9179warn_return_any = true
9280warn_unused_ignores = true
93- mypy_path = " typings"
9481
9582[tool .ruff ]
96- include = [" src/**/*.py" ]
97- exclude = [" _version.py" ]
83+ exclude = [" _version.py" , " tests/data" ]
9884lint.extend-select = [" I" ] # Enable ruffs isort rules (for compat with vscode ruff)
9985
10086[tool .coverage ]
87+ run.source = [" src" , " tests" ]
10188run.omit = [" _version.py" ]
10289report.skip_covered = true
10390append = true
91+
92+ # https://tox.wiki/en/latest/config.html#pyproject-toml-native
93+ [tool .tox ]
94+ env_list = [
95+ " clean" , " typing" , " lint" , " format" ,
96+ " 3.8" , " 3.9" , " 3.10" , " 3.11" , " 3.12" , " 3.13"
97+ ]
98+ labels.static = [" clean" , " typing" , " lint" , " format" ]
99+ env.clean.commands = [[" coverage" , " erase" ]] # Cleanup coverage data
100+ env.clean.skip_install = true
101+ env.typing.commands = [[" mypy" ]]
102+ env.lint.commands = [[" ruff" , " check" ]]
103+ env.format.commands = [[" ruff" , " format" , " --check" ]]
104+ env_run_base.commands = [[" pytest" , {replace = " posargs" , extend = true }]]
105+ env_run_base.dependency_groups = [" test" ]
106+ env_run_base.extras = [" littlefs" ] # Include optional dependencies
107+ env_run_base.package = " editable" # Build package wheel and install into environments
108+ env_run_base.runner = " uv-venv-runner" # We love uv
109+ env.3.13.commands = [[" pytest" , " --cov" , {replace = " posargs" , extend = true }]]
110+ env.3.13.labels = [" coverage" , " latest" ]
0 commit comments