1- .PHONY : contrib  quality style test
1+ .PHONY : quality style test
22
33
4- check_dirs  := contrib  src tests utils setup.py
4+ check_dirs  := src tests utils setup.py
55
66
77quality :
88	ruff check $(check_dirs )   #  linter
99	ruff format --check $(check_dirs )  #  formatter
1010	python utils/check_inference_input_params.py
11- 	python utils/check_contrib_list.py
1211	python utils/check_static_imports.py
1312	python utils/check_all_variable.py
1413	python utils/generate_async_inference_client.py
@@ -18,7 +17,6 @@ quality:
1817style :
1918	ruff format $(check_dirs )  #  formatter
2019	ruff check --fix $(check_dirs )  #  linter
21- 	python utils/check_contrib_list.py --update
2220	python utils/check_static_imports.py --update
2321	python utils/check_all_variable.py --update
2422	python utils/generate_async_inference_client.py --update
@@ -38,42 +36,3 @@ repocard:
3836
3937test :
4038	pytest ./tests/
41- 
42- #  Taken from https://stackoverflow.com/a/12110773
43- #  Commands:
44- # 	make contrib_setup_timm : setup tests for timm
45- # 	make contrib_test_timm  : run tests for timm
46- # 	make contrib_timm       : setup and run tests for timm
47- # 	make contrib_clear_timm : delete timm virtual env
48- # 
49- # 	make contrib_setup      : setup ALL tests
50- # 	make contrib_test       : run ALL tests
51- # 	make contrib            : setup and run ALL tests
52- # 	make contrib_clear      : delete all virtual envs
53- #  Use -j4 flag to run jobs in parallel.
54- CONTRIB_LIBS  := sentence_transformers spacy timm
55- CONTRIB_JOBS  := $(addprefix  contrib_,${CONTRIB_LIBS}) 
56- CONTRIB_CLEAR_JOBS  := $(addprefix  contrib_clear_,${CONTRIB_LIBS}) 
57- CONTRIB_SETUP_JOBS  := $(addprefix  contrib_setup_,${CONTRIB_LIBS}) 
58- CONTRIB_TEST_JOBS  := $(addprefix  contrib_test_,${CONTRIB_LIBS}) 
59- 
60- contrib_clear_%  :
61- 	rm -rf contrib/$* /.venv
62- 
63- contrib_setup_%  :
64- 	python3 -m venv contrib/$* /.venv
65- 	./contrib/$* /.venv/bin/pip install -r contrib/$* /requirements.txt
66- 	./contrib/$* /.venv/bin/pip uninstall -y huggingface_hub
67- 	./contrib/$* /.venv/bin/pip install -e .[testing]
68- 
69- contrib_test_%  :
70- 	./contrib/$* /.venv/bin/python -m pytest contrib/$* 
71- 
72- contrib_%  :
73- 	make contrib_setup_$* 
74- 	make contrib_test_$* 
75- 
76- contrib : ${CONTRIB_JOBS};
77- contrib_clear : ${CONTRIB_CLEAR_JOBS}; echo "Successful contrib tests."
78- contrib_setup : ${CONTRIB_SETUP_JOBS}; echo "Successful contrib setup."
79- contrib_test : ${CONTRIB_TEST_JOBS}; echo "Successful contrib tests."
0 commit comments