Skip to content

Commit 3af8041

Browse files
committed
Invoke uv via Makefile
1 parent 8f22d94 commit 3af8041

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

Makefile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# test, coverage and lint
33
###
44

5+
PRE_CMD = uv run --
6+
57
PYTEST_JUNIT_ARGS = --junitxml=tests_xml/tests.xml
68

79
PYTEST_COV_ARGS = \
@@ -16,32 +18,32 @@ help: ## Use one of the following instructions:
1618

1719
.PHONY : lint
1820
lint : ## Static code analysis with Pylint
19-
pylint -ry climada > pylint.log || true
21+
$(PRE_CMD) pylint -ry climada > pylint.log || true
2022

2123
.PHONY : unit_test
2224
unit_test : ## Unit tests execution with coverage and xml reports
23-
pytest $(PYTEST_ARGS) --ignore=climada/test climada/
25+
$(PRE_CMD) pytest $(PYTEST_ARGS) --ignore=climada/test climada/
2426

2527
.PHONY : install_test
2628
install_test : ## Test installation was successful
27-
pytest $(PYTEST_JUNIT_ARGS) --pyargs climada.engine.test.test_cost_benefit \
29+
$(PRE_CMD) pytest $(PYTEST_JUNIT_ARGS) --pyargs climada.engine.test.test_cost_benefit \
2830
climada.engine.test.test_impact
2931

3032
.PHONY : data_test
3133
data_test : ## Test data APIs
32-
pytest $(PYTEST_JUNIT_ARGS) script/jenkins/test_data_api.py
34+
$(PRE_CMD) pytest $(PYTEST_JUNIT_ARGS) script/jenkins/test_data_api.py
3335

3436
.PHONY : notebook_test
3537
notebook_test : ## Test notebooks in doc/tutorial
36-
pytest $(PYTEST_JUNIT_ARGS) script/jenkins/test_notebooks.py
38+
$(PRE_CMD) pytest $(PYTEST_JUNIT_ARGS) script/jenkins/test_notebooks.py
3739

3840
.PHONY : integ_test
3941
integ_test : ## Integration tests execution with xml reports
40-
pytest $(PYTEST_ARGS) climada/test/
42+
$(PRE_CMD) pytest $(PYTEST_ARGS) climada/test/
4143

4244
.PHONY : test
4345
test : ## Unit and integration tests execution with coverage and xml reports
44-
pytest $(PYTEST_ARGS) climada/
46+
$(PRE_CMD) pytest $(PYTEST_ARGS) climada/
4547

4648
.PHONY : ci-clean
4749
ci-clean :

0 commit comments

Comments
 (0)