-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* style(makefile): 🎨 create dynamically generated help target and move phony to top of each target This aids in clear target expectations and keeping track of missing descriptions as Clear target was missing from help. * style(lint): 🧱 configure black and isort in pyproject.toml This allows running black/isort in pre-commit or locally to use the same settings and user have the same experience. * style(markdown): 🚨 add alt text to resolve updated markdownlint img rule * style(black): 🚨 black format via version 24.2.0
- Loading branch information
1 parent
b90ae1a
commit d4639f9
Showing
33 changed files
with
93 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,51 @@ | ||
.PHONY: help lint test build docs-serve install-dev publish clean | ||
.DEFAULT_GOAL := help | ||
|
||
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: | ||
.PHONY: install-dev | ||
install-dev: ## Install development dependencies. | ||
@echo "Installing development dependencies..." | ||
@python -m pip install ".[dev]" | ||
@python -m pre-commit install | ||
@pre-commit install | ||
|
||
lint: | ||
.PHONY: lint | ||
lint: ## Check code with linters using pre-commit. | ||
@echo "Running linters..." | ||
@pre-commit run --all-files | ||
|
||
test: | ||
.PHONY: test | ||
test: ## Run unit tests using pytest. | ||
@echo "Running tests..." | ||
@pytest --exitfirst --verbose --failed-first --cov=. | ||
|
||
build: | ||
.PHONY: build | ||
build: ## Build the package for PyPI. | ||
@echo "Building for PyPI..." | ||
@python -m pip install --upgrade build | ||
@python -m build | ||
|
||
publish: | ||
.PHONY: publish | ||
publish: ## Publish to PyPI. | ||
@echo "Publishing to PyPI..." | ||
@python -m pip install --upgrade twine | ||
@python -m twine upload --repository llm-guard dist/* | ||
|
||
docs-serve: | ||
.PHONY: docs-serve | ||
docs-serve: ## Serve documentation using mkdocs. | ||
@echo "Serving documentation..." | ||
@mkdocs serve -a localhost:8085 | ||
|
||
clean: | ||
.PHONY: clean | ||
clean: ## Clean and Remove build files and pytest cache. | ||
@echo "Cleaning up..." | ||
@rm -rf build dist .pytest_cache .egg-info llm_guard.egg-info | ||
|
||
.PHONY: help | ||
help: ## List all targets and help information. | ||
@echo "Available commands:" | ||
@grep --no-filename -E '^([a-z.A-Z_%-/]+:.*?)##' $(MAKEFILE_LIST) | sort | \ | ||
awk 'BEGIN {FS = ":.*?(## ?)"}; { \ | ||
if (length($$1) > 0) { \ | ||
printf " \033[36m%-30s\033[0m %s\n", $$1, $$2; \ | ||
} else { \ | ||
printf "%s\n", $$2; \ | ||
} \ | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
"""LLM Guard package""" | ||
|
||
from .evaluate import scan_output, scan_prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
llm_guard/input_scanners/secrets_plugins/atlassian_api_token.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
llm_guard/input_scanners/secrets_plugins/authress_access_key.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
llm_guard/input_scanners/secrets_plugins/codecov_access_token.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
llm_guard/input_scanners/secrets_plugins/coinbase_access_token.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
llm_guard/input_scanners/secrets_plugins/contentful_api_token.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
llm_guard/input_scanners/secrets_plugins/databricks_api_token.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
llm_guard/input_scanners/secrets_plugins/datadog_access_token.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
llm_guard/input_scanners/secrets_plugins/defined_networking_api_token.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.