-
Notifications
You must be signed in to change notification settings - Fork 47
/
Makefile
46 lines (37 loc) · 1.17 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.PHONY: test clean docs install-pre-commit install-dependencies setup
# to imitate SLURM set only single node
export SLURM_LOCALID=0
# assume you have installed need packages
export SPHINX_MOCK_REQUIREMENTS=0
setup: install-dependencies install-pre-commit
@echo "==================== Setup Finished ===================="
@echo "All set! Ready to go!"
test: clean
pip install -q -r requirements.txt
pip install -q -r requirements/test.txt
# use this to run tests
python -m coverage run --source litdata -m pytest src -v --flake8
python -m coverage report
docs: clean
pip install . --quiet -r requirements/docs.txt
python -m sphinx -b html -W --keep-going docs/source docs/build
clean:
# clean all temp runs
rm -rf $(shell find . -name "mlruns")
rm -rf .mypy_cache
rm -rf .pytest_cache
rm -rf ./docs/build
rm -rf ./docs/source/**/generated
rm -rf ./docs/source/api
rm -rf ./src/*.egg-info
rm -rf ./build
rm -rf ./dist
install-dependencies:
pip install -r requirements.txt
pip install -r requirements/test.txt
pip install -r requirements/docs.txt
pip install -r requirements/extras.txt
pip install -e .
install-pre-commit:
pip install pre-commit
pre-commit install