llm/Justfile

40 lines
712 B
Makefile
Raw Normal View History

2023-06-26 14:50:06 +00:00
# Run tests and linters
@default: test lint
# Install dependencies and test dependencies
@init:
pipenv run pip install -e '.[test]'
2023-06-26 14:50:06 +00:00
# Run pytest with supplied options
@test *options:
pipenv run pytest {{options}}
# Run linters
@lint:
2023-07-15 17:00:04 +00:00
echo "Linters..."
echo " Black"
2023-06-26 14:50:06 +00:00
pipenv run black . --check
2023-07-15 17:00:04 +00:00
echo " cog"
2023-06-26 14:50:06 +00:00
pipenv run cog --check README.md docs/*.md
2023-07-15 17:00:04 +00:00
echo " mypy"
pipenv run mypy llm
2023-07-15 17:00:04 +00:00
echo " ruff"
2023-07-02 19:41:40 +00:00
pipenv run ruff .
2023-06-26 14:50:06 +00:00
# Rebuild docs with cog
@cog:
pipenv run cog -r docs/*.md
# Serve live docs on localhost:8000
@docs: cog
cd docs && pipenv run make livehtml
# Apply Black
@black:
pipenv run black .
2023-07-03 00:40:45 +00:00
# Run automatic fixes
@fix: cog
2023-07-03 00:40:45 +00:00
pipenv run ruff . --fix
pipenv run black .