11[build-system ]
2- requires = [" setuptools>=42 " , " wheel " ]
3- build-backend = " setuptools.build_meta "
2+ requires = [" hatchling " ]
3+ build-backend = " hatchling.build "
44
55[project ]
66name = " mistapi"
77version = " 0.55.14"
8- authors = [{name = " Thomas Munzer" , email = " tmunzer@juniper.net" }]
8+ authors = [{ name = " Thomas Munzer" , email = " tmunzer@juniper.net" }]
99description = " Python package to simplify the Mist System APIs usage"
1010keywords = [" Mist" , " Juniper" , " API" ]
1111license = { text = " MIT License" }
@@ -21,22 +21,53 @@ classifiers = [
2121 " Development Status :: 4 - Beta" ,
2222]
2323dependencies = [
24- ' python-dotenv' ,
25- ' requests > 2.24 ' ,
26- ' tabulate > 0.8.5 ' ,
27- ' deprecation > 2.0.0 ' ,
24+ " python-dotenv>=1.1.0 " ,
25+ " requests>=2.32.3 " ,
26+ " tabulate>=0.9.0 " ,
27+ " deprecation>=2.1.0 " ,
2828]
2929
3030[project .urls ]
3131"Source" = " https://github.com/tmunzer/mistapi_python"
3232"Bug Tracker" = " https://github.com/tmunzer/mistapi_python/issues"
3333
34+ # UV-specific configuration
35+ [tool .uv ]
36+ dev-dependencies = [
37+ # Testing dependencies
38+ " pytest>=8.4.0" ,
39+ " pytest-cov>=6.1.1" ,
40+ " responses>=0.25.7" ,
41+ " factory-boy>=3.3.3" ,
42+ # "pytest-mock>=3.14.1",
43+ # "pytest-httpx>=0.35.0",
44+ # "faker>=37.3.0",
45+ # "httpx>=0.28.1",
3446
47+ # Code quality
48+ " ruff>=0.11.13" ,
49+
50+ # Development dependencies
51+ " twine>=6.1.0" ,
52+ " build>=1.2.2.post1" ,
53+ " pyyaml>=6.0.2" ,
54+ " urllib3>=2.4.0" ,
55+ ]
56+
57+ # Hatchling configuration (replaces setup.cfg)
58+ [tool .hatchling .build .targets .wheel ]
59+ packages = [" src/mistapi" ]
60+
61+ [tool .hatchling .build .targets .sdist ]
62+ include = [" /src" , " /tests" , " /README.md" , " /pyproject.toml" ]
63+
64+ # Test configuration
3565[tool .pytest .ini_options ]
3666testpaths = [" tests" ]
3767python_files = [" test_*.py" ]
3868python_classes = [" Test*" ]
3969python_functions = [" test_*" ]
70+ markers = [" unit: Unit tests" , " integration: Integration tests" ]
4071
4172# Exclude API files that happen to start with "test"
4273norecursedirs = [" src/mistapi/api/*/utils" ]
@@ -54,36 +85,27 @@ addopts = [
5485 " --cov=src/mistapi" ,
5586 " --cov-report=html" ,
5687 " --cov-report=term-missing" ,
57- " --cov-fail-under=50" ,
58- # Exclude autogenerated API code from coverage
88+ " --cov-fail-under=30" ,
5989 " --cov-config=pyproject.toml" ,
6090]
6191
6292[tool .coverage .run ]
63- # Only measure coverage on core library code, not autogenerated API
6493source = [" src/mistapi" ]
6594omit = [
66- " src/mistapi/api/v1/*" , # Exclude all autogenerated API code
67- " src/mistapi/cli.py" , # CLI can be tested separately if needed
95+ " src/mistapi/api/v1/*" ,
96+ " src/mistapi/cli.py" ,
6897 " */test_*.py" ,
6998 " */__pycache__/*" ,
7099]
71100
72101[tool .coverage .report ]
73- # Don't fail on missing coverage for autogenerated code
74102exclude_lines = [
75103 " pragma: no cover" ,
76104 " def __repr__" ,
77105 " raise AssertionError" ,
78106 " raise NotImplementedError" ,
79107]
80108
81- markers = [
82- " unit: Unit tests" ,
83- " integration: Integration tests" ,
84- " slow: Slow running tests" ,
85- " auth: Authentication related tests" ,
86- " api: API endpoint tests" ,
87- " mock: Tests using mocks" ,
88- " real: Tests requiring real API calls (use sparingly)" ,
89- ]
109+ # Ruff configuration - exclude autogenerated API code
110+ [tool .ruff ]
111+ exclude = [" src/mistapi/api/**/*.py" ]
0 commit comments