1- [build-system ]
2- requires = [" hatchling" , " hatch-vcs" ]
3- build-backend = " hatchling.build"
4-
51[project ]
62name = " mpremote-path"
73description = " Pathlib compatible interface to files on a MicroPython device"
4+ readme = " README.md"
85authors = [{
name =
" glenn20" ,
email =
" [email protected] " }]
96urls = {Homepage = " https://github.com/glenn20/mpremote-path" }
10- readme = " README.md"
117license = {text = " MIT" }
128classifiers = [
139 " License :: OSI Approved :: MIT License" ,
1410 " Intended Audience :: Developers" ,
1511 " Operating System :: OS Independent" ,
1612 " Programming Language :: Python :: 3" ,
17- " Programming Language :: Python :: 3 :: Only" ,
18- " Programming Language :: Python :: 3.8" ,
19- " Programming Language :: Python :: 3.9" ,
20- " Programming Language :: Python :: 3.10" ,
21- " Programming Language :: Python :: 3.11" ,
22- " Programming Language :: Python :: 3.12" ,
23- " Programming Language :: Python :: 3.13" ,
2413 " Topic :: Software Development :: Embedded Systems" ,
2514 " Topic :: Software Development :: Libraries" ,
2615 " Typing :: Typed" ,
2716]
2817requires-python = " >=3.9"
18+ dynamic = [" version" ]
2919dependencies = [
30- " mpremote >= 1.20.0, != 1.24.0"
20+ " mpremote >= 1.20.0, != 1.24.0" ,
3121]
32- dynamic = [" version" ]
3322
3423[project .scripts ]
3524mpfs = " mpremote_path.util.mpfs:main"
3625
26+ [dependency-groups ]
27+ typing = [" mypy>=0.910" , " types-pyserial>=3.5" , " types-pyyaml>=6.0.0" ]
28+ test = [
29+ {include-group = " typing" },
30+ " ruff>=0.6.7" , " pytest>=8.3.2" , " pytest-cov>=3.0.0" ,
31+ " pyyaml>=6.0.0" , " tox>=4.22" , " tox-uv>=1.13" ,
32+ ]
33+ dev = [
34+ {include-group = " test" },
35+ " hatch>=1.12.0" , " hatch-vcs>=0.3.0" , # For building and updating _version.py
36+ " pre-commit>=2.9.2" , " pre-commit-uv>=4.0" , " pip>=23.0.1" , # pre-commit hooks
37+ ]
38+
39+ [build-system ]
40+ requires = [" hatchling" , " hatch-vcs" ]
41+ build-backend = " hatchling.build"
42+
3743[tool .hatch ]
38- # version.path = "src/mpremote_path/__init__.py"
39- version.source = " vcs" # Get the version from git, eg: 0.0.6.dev0+g1234567
40- build.hooks.vcs.version-file = " src/mpremote_path/_version.py"
4144build.targets.wheel.packages = [" src/mpremote_path" ]
45+ build.hooks.vcs.version-file = " src/mpremote_path/_version.py"
46+ version.source = " vcs" # Get the version from git, eg: 0.0.6.dev0+g1234567
4247# Drop the local version part (eg: +g1234567) or pypi will reject package
4348version.raw-options.local_scheme = " no-local-version"
4449# A manually triggered github release workflow may generate a new tag
@@ -52,28 +57,6 @@ version.raw-options.git_describe_command = [
5257 " --match" , " v*.[0-9][0-9][0-9]" ,
5358]
5459
55- [tool .uv ]
56- dev-dependencies = [
57- # For development environment, including type checking
58- " types-pyserial>=3.5" , # For type checking pyserial (needed by mpremote)
59- # For running tests: pytest, pyyaml, requests, tox, mypy, ruff
60- " pyyaml>=6.0.0" , # For logging configuration in tests/
61- " types-pyyaml>=6.0.0" ,
62- " pytest>=8.3.2" ,
63- " pytest-cov>=3.0.0" ,
64- " mypy>=0.910" , # For code type checks: uv run mypy --no-sources mypy src
65- " ruff>=0.6.7" , # For linting: uv run --no-sources ruff format --check src
66- " tox>=4.0.0" ,
67- " tox-uv>=0.3.0" , # uv support for tox
68- " keyring>=25" , # For uv publish --keyring-provider=subprocess
69- # Used by .git/hooks/post-{commit,checkout} to update _version.py:
70- # uv run --frozen hatch build --hooks-only
71- " hatch>=1.12.0" ,
72- " hatch-vcs>=0.3.0" , # For building and updating _version.py
73- " pre-commit>=2.9.2" , # For running ruff and mypy on Python files
74- " pre-commit-uv>=4.0" ,
75- ]
76-
7760[tool .mypy ]
7861files = [" src" , " tests" ]
7962exclude = " (^tests/_data.*$|^tests/unix-micropython/.*$)"
@@ -84,14 +67,9 @@ warn_return_any = true
8467warn_unused_ignores = false
8568
8669[tool .ruff ]
87- include = [" src/**/*.py" ]
88- exclude = [" _version.py" ]
70+ exclude = [" _version.py" , " tests/_data" , " tests/unix-micropython" ]
8971lint.extend-select = [" I" ] # Enable ruffs isort rules (for compat with vscode ruff)
9072
91- [tool .pytest .ini_options ]
92- minversion = " 6.0"
93- addopts = [" --cov" , " --color=yes" ]
94-
9573[tool .coverage ]
9674run.source = [" src" ]
9775run.omit = [" _version.py" ]
@@ -101,20 +79,17 @@ append = true
10179# https://tox.wiki/en/latest/config.html#pyproject-toml-native
10280[tool .tox ] #
10381env_list = [
104- " clean" , " mypy " , " lint" , " format" ,
82+ " clean" , " typing " , " lint" , " format" ,
10583 " 3.9" , " 3.10" , " 3.11" , " 3.12" , " 3.13"
10684]
107- requires = [" tox>=4.19" , " tox-uv>=1.13" ]
85+ labels = { static = [" clean" , " typing" , " lint" , " format" ], test = [" 3.13" ] }
86+ dependency_groups = [" test" ]
10887env.clean.commands = [[" coverage" , " erase" ]] # Cleanup coverage data
109- env.clean.deps = [" coverage" ]
11088env.clean.skip_install = true
111- env.mypy.commands = [[" mypy" ]]
112- env.mypy.deps = [" mypy" , " types-pyserial" , " types-pyyaml" ]
89+ env.typing.commands = [[" mypy" ]]
11390env.lint.commands = [[" ruff" , " check" ]]
114- env.lint.deps = [" ruff" ]
11591env.format.commands = [[" ruff" , " format" , " --check" ]]
116- env.format.deps = [" ruff " ]
92+ env.3.13.commands = [[ " pytest " , " --cov " , { replace = " posargs " , extend = true }] ]
11793env_run_base.commands = [[" pytest" , {replace = " posargs" , extend = true }]]
118- env_run_base.deps = [" pytest" , " pytest-cov" , " pyyaml" ]
11994env_run_base.package = " editable"
12095env_run_base.runner = " uv-venv-runner"
0 commit comments