-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
57 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ repos: | |
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
exclude: mkdocs.yml |
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Makefile for Project Automation | ||
|
||
.PHONY: install lint type-check test docs serve-docs build all clean | ||
|
||
# Variables | ||
PACKAGE_NAME = brickllm | ||
TEST_DIR = tests | ||
|
||
# Default target | ||
all: lint type-check test docs | ||
|
||
# Install project dependencies | ||
install: | ||
poetry install | ||
|
||
# Linting and Formatting Checks | ||
lint: | ||
poetry run ruff check $(PACKAGE_NAME) $(TEST_DIR) | ||
poetry run black --check $(PACKAGE_NAME) $(TEST_DIR) | ||
poetry run isort --check-only $(PACKAGE_NAME) $(TEST_DIR) | ||
|
||
# Type Checking with MyPy | ||
type-check: | ||
poetry run mypy $(PACKAGE_NAME) $(TEST_DIR) | ||
|
||
# Run Tests with Coverage | ||
test: | ||
poetry run pytest --cov=$(PACKAGE_NAME) --cov-report=xml $(TEST_DIR)/ | ||
|
||
# Build Documentation using MkDocs | ||
docs: | ||
poetry run mkdocs build | ||
|
||
# Serve Documentation Locally | ||
serve-docs: | ||
poetry run mkdocs serve | ||
|
||
# Run Pre-Commit Hooks | ||
pre-commit: | ||
poetry run pre-commit run --all-files | ||
|
||
# Clean Up Generated Files | ||
clean: | ||
rm -rf dist/ | ||
rm -rf build/ | ||
rm -rf *.egg-info | ||
rm -rf htmlcov/ | ||
rm -rf .mypy_cache/ | ||
rm -rf .pytest_cache/ | ||
rm -rf .ruff_cache/ | ||
rm -rf site/ | ||
|
||
# Build the Package | ||
build: | ||
poetry build |
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 |
---|---|---|
|
@@ -16,4 +16,3 @@ cd brickllm-lib | |
# Install dependencies | ||
poetry install | ||
``` | ||
|
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 +1 @@ | ||
# Usage | ||
# Usage |
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