Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions .github/workflows/contrib-tests.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/python-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ jobs:

- name: Install dependencies
run: uv pip install "huggingface_hub[dev] @ ."
- run: .venv/bin/ruff check tests src contrib # linter
- run: .venv/bin/ruff format --check tests src contrib # formatter
- run: .venv/bin/python utils/check_contrib_list.py
- run: .venv/bin/ruff check tests src # linter
- run: .venv/bin/ruff format --check tests src # formatter
- run: .venv/bin/python utils/check_inference_input_params.py
- run: .venv/bin/python utils/check_static_imports.py
- run: .venv/bin/python utils/check_all_variable.py
Expand All @@ -50,4 +49,4 @@ jobs:
- run: .venv/bin/mypy src/huggingface_hub/__init__.py --follow-imports=silent --show-traceback

# Run mypy on full package
- run: .venv/bin/mypy src
- run: .venv/bin/mypy src
45 changes: 2 additions & 43 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
.PHONY: contrib quality style test
.PHONY: quality style test


check_dirs := contrib src tests utils setup.py
check_dirs := src tests utils setup.py


quality:
ruff check $(check_dirs) # linter
ruff format --check $(check_dirs) # formatter
python utils/check_inference_input_params.py
python utils/check_contrib_list.py
python utils/check_static_imports.py
python utils/check_all_variable.py
python utils/generate_async_inference_client.py
Expand All @@ -18,7 +17,6 @@ quality:
style:
ruff format $(check_dirs) # formatter
ruff check --fix $(check_dirs) # linter
python utils/check_contrib_list.py --update
python utils/check_static_imports.py --update
python utils/check_all_variable.py --update
python utils/generate_async_inference_client.py --update
Expand All @@ -38,42 +36,3 @@ repocard:

test:
pytest ./tests/

# Taken from https://stackoverflow.com/a/12110773
# Commands:
# make contrib_setup_timm : setup tests for timm
# make contrib_test_timm : run tests for timm
# make contrib_timm : setup and run tests for timm
# make contrib_clear_timm : delete timm virtual env
#
# make contrib_setup : setup ALL tests
# make contrib_test : run ALL tests
# make contrib : setup and run ALL tests
# make contrib_clear : delete all virtual envs
# Use -j4 flag to run jobs in parallel.
CONTRIB_LIBS := sentence_transformers spacy timm
CONTRIB_JOBS := $(addprefix contrib_,${CONTRIB_LIBS})
CONTRIB_CLEAR_JOBS := $(addprefix contrib_clear_,${CONTRIB_LIBS})
CONTRIB_SETUP_JOBS := $(addprefix contrib_setup_,${CONTRIB_LIBS})
CONTRIB_TEST_JOBS := $(addprefix contrib_test_,${CONTRIB_LIBS})

contrib_clear_%:
rm -rf contrib/$*/.venv

contrib_setup_%:
python3 -m venv contrib/$*/.venv
./contrib/$*/.venv/bin/pip install -r contrib/$*/requirements.txt
./contrib/$*/.venv/bin/pip uninstall -y huggingface_hub
./contrib/$*/.venv/bin/pip install -e .[testing]

contrib_test_%:
./contrib/$*/.venv/bin/python -m pytest contrib/$*

contrib_%:
make contrib_setup_$*
make contrib_test_$*

contrib: ${CONTRIB_JOBS};
contrib_clear: ${CONTRIB_CLEAR_JOBS}; echo "Successful contrib tests."
contrib_setup: ${CONTRIB_SETUP_JOBS}; echo "Successful contrib setup."
contrib_test: ${CONTRIB_TEST_JOBS}; echo "Successful contrib tests."
70 changes: 0 additions & 70 deletions contrib/README.md

This file was deleted.

Empty file removed contrib/__init__.py
Empty file.
52 changes: 0 additions & 52 deletions contrib/conftest.py

This file was deleted.

Empty file.
1 change: 0 additions & 1 deletion contrib/sentence_transformers/requirements.txt

This file was deleted.

37 changes: 0 additions & 37 deletions contrib/sentence_transformers/test_sentence_transformers.py

This file was deleted.

Empty file removed contrib/spacy/__init__.py
Empty file.
1 change: 0 additions & 1 deletion contrib/spacy/requirements.txt

This file was deleted.

48 changes: 0 additions & 48 deletions contrib/spacy/test_spacy.py

This file was deleted.

Empty file removed contrib/timm/__init__.py
Empty file.
3 changes: 0 additions & 3 deletions contrib/timm/requirements.txt

This file was deleted.

20 changes: 0 additions & 20 deletions contrib/timm/test_timm.py

This file was deleted.

Loading