Skip to content

Commit

Permalink
feat: add makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
PeriniM committed Oct 8, 2024
1 parent 5a17fdd commit 03aa829
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 45 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: mkdocs.yml
55 changes: 55 additions & 0 deletions Makefile
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
1 change: 0 additions & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ cd brickllm-lib
# Install dependencies
poetry install
```

2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Usage
# Usage
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ black = "*"
mypy = "*"
ruff = "*"
isort = "*"
tox = "*"
pre-commit = "*"
types-setuptools = "^75.1.0.20240917"
mkdocs = "^1.5"
Expand Down
42 changes: 0 additions & 42 deletions tox.ini

This file was deleted.

0 comments on commit 03aa829

Please sign in to comment.