@@ -131,17 +131,62 @@ norecursedirs = ["dist", "build", ".tox"]
131131testpaths = [" tests" ]
132132markers = {ledger_hardware = " marks tests as requiring ledger hardware" }
133133
134- [tool .devpi .upload ]
135- no-vcs = 1
136- formats = [" bdist_wheel" ]
137-
138134[tool .flake8 ]
139135exclude = [" .tox" , " build" , " dist" , " .eggs" , " docs/conf.py" ]
140136ignore = [" E501" , " W291" , " W503" , " E203" , " E704" ]
141137
142138[tool .isort ]
143139profile = " black"
144140
141+ [tool .hatch .envs .testing ]
142+ dependencies = [
143+ " pytest==8.0.1" ,
144+ " pytest-cov==4.1.0" ,
145+ " pytest-mock==3.12.0" ,
146+ " pytest-asyncio==0.23.5" ,
147+ ]
148+ [tool .hatch .envs .testing .scripts ]
149+ test = " pytest {args:tests}"
150+ test-cov = " pytest --cov {args:tests}"
151+ cov-report = [
152+ " - coverage combine" ,
153+ " coverage report" ,
154+ ]
155+ cov = [
156+ " test-cov" ,
157+ " cov-report" ,
158+ ]
159+
160+ [[tool .hatch .envs .all .matrix ]]
161+ python = [" 3.9" , " 3.10" , " 3.11" , " 3.12" ]
162+
163+ [tool .hatch .envs .lint ]
164+ detached = true
165+ dependencies = [
166+ " black==24.1.1" ,
167+ " mypy==1.8.0" ,
168+ " mypy-extensions==0.4.3" ,
169+ " ruff==0.1.15" ,
170+ " isort==5.13.2" ,
171+ ]
172+ [tool .hatch .envs .lint .scripts ]
173+ typing = " mypy {args:src/aleph/vm/ tests/ examples/example_fastapi runtimes/aleph-debian-12-python}"
174+ style = [
175+ # "ruff {args:.}",
176+ " black --check --diff {args:.}" ,
177+ " isort --check-only --profile black {args:.}" ,
178+ ]
179+ fmt = [
180+ " black {args:.}" ,
181+ # "ruff --fix {args:.}",
182+ " isort --profile black {args:.}" ,
183+ " style" ,
184+ ]
185+ all = [
186+ " style" ,
187+ " typing" ,
188+ ]
189+
145190[tool .mypy ]
146191python_version = 3.8
147192mypy_path = " src"
0 commit comments