@@ -60,10 +60,6 @@ venv: check ## create virtualenv in PANDORA_VENV directory if not exists
60
60
@${PANDORA_VENV} /bin/python -m pip install --upgrade pip meson-python meson ninja setuptools_scm setuptools wheel pybind11 # no check to upgrade each time
61
61
@touch ${PANDORA_VENV} /bin/activate
62
62
63
- .PHONY : cpp_deps
64
- cpp_deps : # # retrieve cpp dependencies
65
- @${PANDORA_VENV} /bin/meson wrap update-db
66
-
67
63
.PHONY : install
68
64
install : venv # # install pandora without plugins
69
65
@test -f ${PANDORA_VENV} /bin/pandora || . ${PANDORA_VENV} /bin/activate; ${PANDORA_VENV} /bin/pip install --no-build-isolation --editable .[dev,docs,notebook] --config-settings=setup-args=-Dbuild_cpp_tests=enabled
@@ -72,16 +68,38 @@ install: venv ## install pandora without plugins
72
68
@echo " PANDORA installed in dev mode in virtualenv ${PANDORA_VENV} "
73
69
@echo " PANDORA venv usage : source ${PANDORA_VENV} /bin/activate; pandora -h"
74
70
71
+ .PHONY : install-sgm
72
+ install-sgm : venv install# # install pandora with sgm
73
+ @test -f ${PANDORA_VENV} /lib/python3.10/site-packages/pandora_plugin_libsgm || . ${PANDORA_VENV} /bin/activate; ${PANDORA_VENV} /bin/pip install --no-build-isolation --editable .[sgm] --config-settings=setup-args=-Dbuild_cpp_tests=enabled
74
+ @test -f .git/hooks/pre-commit || echo " Install pre-commit hook"
75
+ @test -f .git/hooks/pre-commit || ${PANDORA_VENV} /bin/pre-commit install
76
+ @echo " PANDORA installed in dev mode in virtualenv ${PANDORA_VENV} with sgm"
77
+ @echo " PANDORA venv usage : source ${PANDORA_VENV} /bin/activate; pandora -h"
78
+
75
79
# # Test section
76
80
77
81
.PHONY : test
78
82
test : install # # run all tests (except notebooks) + coverage (source venv before)
79
83
@${PANDORA_VENV} /bin/pytest -m " not notebook_tests" --junitxml=pytest-report.xml --cov-config=.coveragerc --cov-report xml --cov
80
84
85
+ .PHONY : test-unit-cpp
86
+ test-unit-cpp : install # # run unit cpp tests only for dev
87
+ @echo " Run unit cpp tests"
88
+ . ${PANDORA_VENV} /bin/activate; meson test -C build/$(shell ls build) / -v
89
+
90
+ .PHONY : test-functional
91
+ test-functional : install-sgm # # run functional tests only (for wheel validation temporary)
92
+ @echo " Run functional tests"
93
+ @${PANDORA_VENV} /bin/pytest -m " functional_tests"
94
+
81
95
.PHONY : test-notebook
82
96
test-notebook : install # # run notebook tests only
83
97
@${PANDORA_VENV} /bin/pytest -m " notebook_pandora"
84
98
99
+ .PHONY : test-notebook-sgm
100
+ test-notebook-sgm : install-sgm # # run notebook tests with sgm as dependency
101
+ @${PANDORA_VENV} /bin/pytest -m " notebook_with_sgm"
102
+
85
103
# # Code quality, linting section
86
104
87
105
# ## Format with black
@@ -211,8 +229,3 @@ clean-docker: ## clean docker image
211
229
@@[ " ${CHECK_DOCKER} " ] || ( echo " >> docker not found" ; exit 1 )
212
230
@echo " Clean Docker image cnes/pandora dev"
213
231
@docker image rm cnes/pandora:dev
214
-
215
- .PHONY : test-unit-cpp
216
- test-unit-cpp : install # # run unit cpp tests only for dev
217
- @echo " Run unit cpp tests"
218
- . ${PANDORA_VENV} /bin/activate; meson test -C build/$(shell ls build) / -v
0 commit comments