langchain/Makefile
Hunter Gerlach 482611f426
unit test / code coverage improvements (#322)
This PR has two contributions:

1. Add test for when stop token is found in middle of text

2. Add code coverage tooling and instructions
- Add pytest-cov via poetry
- Add necessary config files
- Add new make instruction for `coverage`
- Update README with coverage guidance
- Update minor README formatting/spelling

Co-authored-by: Hunter Gerlach <hunter@huntergerlach.com>
2022-12-13 05:48:53 -08:00

24 lines
432 B
Makefile

.PHONY: format lint tests integration_tests
coverage:
poetry run pytest --cov \
--cov-config=.coveragerc \
--cov-report xml \
--cov-report term-missing:skip-covered
format:
poetry run black .
poetry run isort .
lint:
poetry run mypy .
poetry run black . --check
poetry run isort . --check
poetry run flake8 .
tests:
poetry run pytest tests/unit_tests
integration_tests:
poetry run pytest tests/integration_tests