forked from Archives/langchain
[Makefile] add help and more idiomatic makefile
- Add `help` directive - Add `clean` and `all` directives - Rename `tests` to `test`
This commit is contained in:
parent
6a31a59400
commit
8d03214cb1
24
Makefile
24
Makefile
@ -1,17 +1,22 @@
|
|||||||
.PHONY: format lint tests tests_watch integration_tests
|
.PHONY: all clean format lint test test_watch integration_tests help
|
||||||
|
|
||||||
|
all: help
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
poetry run pytest --cov \
|
poetry run pytest --cov \
|
||||||
--cov-config=.coveragerc \
|
--cov-config=.coveragerc \
|
||||||
--cov-report xml \
|
--cov-report xml \
|
||||||
--cov-report term-missing:skip-covered
|
--cov-report term-missing:skip-covered
|
||||||
|
|
||||||
|
clean: docs_clean
|
||||||
|
|
||||||
docs_build:
|
docs_build:
|
||||||
cd docs && poetry run make html
|
cd docs && poetry run make html
|
||||||
|
|
||||||
docs_clean:
|
docs_clean:
|
||||||
cd docs && poetry run make clean
|
cd docs && poetry run make clean
|
||||||
|
|
||||||
|
|
||||||
docs_linkcheck:
|
docs_linkcheck:
|
||||||
poetry run linkchecker docs/_build/html/index.html
|
poetry run linkchecker docs/_build/html/index.html
|
||||||
|
|
||||||
@ -25,11 +30,24 @@ lint:
|
|||||||
poetry run isort . --check
|
poetry run isort . --check
|
||||||
poetry run flake8 .
|
poetry run flake8 .
|
||||||
|
|
||||||
tests:
|
|
||||||
|
test:
|
||||||
poetry run pytest tests/unit_tests
|
poetry run pytest tests/unit_tests
|
||||||
|
|
||||||
tests_watch:
|
test_watch:
|
||||||
poetry run ptw --now . -- tests/unit_tests
|
poetry run ptw --now . -- tests/unit_tests
|
||||||
|
|
||||||
integration_tests:
|
integration_tests:
|
||||||
poetry run pytest tests/integration_tests
|
poetry run pytest tests/integration_tests
|
||||||
|
|
||||||
|
help:
|
||||||
|
@echo '----'
|
||||||
|
@echo 'coverage - run unit tests and generate coverage report'
|
||||||
|
@echo 'docs_build - build the documentation'
|
||||||
|
@echo 'docs_clean - clean the documentation build artifacts'
|
||||||
|
@echo 'docs_linkcheck - run linkchecker on the documentation'
|
||||||
|
@echo 'format - run code formatters'
|
||||||
|
@echo 'lint - run linters'
|
||||||
|
@echo 'tests - run unit tests'
|
||||||
|
@echo 'tests_watch - run unit tests in watch mode'
|
||||||
|
@echo 'integration_tests - run integration tests'
|
||||||
|
Loading…
Reference in New Issue
Block a user