forked from protectai/llm-guard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (33 loc) · 1.19 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
.PHONY: help lint test build docs-serve install-dev publish clean
help:
@echo "Available commands:"
@echo "make lint - Check code with linters using pre-commit."
@echo "make test - Run unit tests using pytest."
@echo "make build - Build the package for PyPI."
@echo "make docs-serve - Serve documentation using mkdocs."
@echo "make install-dev - Install development dependencies."
@echo "make publish - Publish to PyPI."
install-dev:
@echo "Installing development dependencies..."
@python -m pip install ".[dev]"
@python -m pre-commit install
lint:
@echo "Running linters..."
@pre-commit run --all-files
test:
@echo "Running tests..."
@pytest --exitfirst --verbose --failed-first --cov=.
build:
@echo "Building for PyPI..."
@python -m pip install --upgrade build
@python -m build
publish:
@echo "Publishing to PyPI..."
@python -m pip install --upgrade twine
@python -m twine upload --repository llm-guard dist/*
docs-serve:
@echo "Serving documentation..."
@mkdocs serve -a localhost:8085
clean:
@echo "Cleaning up..."
@rm -rf build dist .pytest_cache .egg-info llm_guard.egg-info