Skip to content

Commit 942fe42

Browse files
authored
Remove contrib test suite (#3403)
1 parent e9fa836 commit 942fe42

File tree

17 files changed

+5
-494
lines changed

17 files changed

+5
-494
lines changed

.github/workflows/contrib-tests.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/python-quality.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ jobs:
3535
3636
- name: Install dependencies
3737
run: uv pip install "huggingface_hub[dev] @ ."
38-
- run: .venv/bin/ruff check tests src contrib # linter
39-
- run: .venv/bin/ruff format --check tests src contrib # formatter
40-
- run: .venv/bin/python utils/check_contrib_list.py
38+
- run: .venv/bin/ruff check tests src # linter
39+
- run: .venv/bin/ruff format --check tests src # formatter
4140
- run: .venv/bin/python utils/check_inference_input_params.py
4241
- run: .venv/bin/python utils/check_static_imports.py
4342
- run: .venv/bin/python utils/check_all_variable.py
@@ -50,4 +49,4 @@ jobs:
5049
- run: .venv/bin/mypy src/huggingface_hub/__init__.py --follow-imports=silent --show-traceback
5150

5251
# Run mypy on full package
53-
- run: .venv/bin/mypy src
52+
- run: .venv/bin/mypy src

Makefile

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
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

77
quality:
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:
1817
style:
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

3937
test:
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."

contrib/README.md

Lines changed: 0 additions & 70 deletions
This file was deleted.

contrib/__init__.py

Whitespace-only changes.

contrib/conftest.py

Lines changed: 0 additions & 52 deletions
This file was deleted.

contrib/sentence_transformers/__init__.py

Whitespace-only changes.

contrib/sentence_transformers/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

contrib/sentence_transformers/test_sentence_transformers.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

contrib/spacy/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)