Skip to content

Commit 9805c40

Browse files
S1M0N38claude
andcommitted
feat(build): add game automation and enhanced testing support
- Add test and test-cov targets to Makefile for pytest execution and coverage - Add start target for automated LiteLLM proxy and Balatro startup workflow - Include pytest-cov dependency for HTML and terminal coverage reports - Update project description to better reflect LLM-powered bot functionality - Integrate test execution into quality and dev check pipelines - Add proper process cleanup and timing for game automation Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6c092b7 commit 9805c40

2 files changed

Lines changed: 24 additions & 4 deletions

File tree

Makefile

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.DEFAULT_GOAL := help
2-
.PHONY: help install install-dev lint lint-fix format typecheck quality clean all dev
2+
.PHONY: help install install-dev lint lint-fix format typecheck test test-cov quality clean start all dev
33

44
# Colors for output
55
YELLOW := \033[33m
@@ -49,7 +49,15 @@ typecheck: ## Run type checker
4949
@echo "$(YELLOW)Running type checker...$(RESET)"
5050
$(TYPECHECK)
5151

52-
quality: lint format typecheck ## Run all code quality checks
52+
test: ## Run tests
53+
@echo "$(YELLOW)Running tests...$(RESET)"
54+
pytest
55+
56+
test-cov: ## Run tests with coverage report
57+
@echo "$(YELLOW)Running tests with coverage...$(RESET)"
58+
pytest --cov=src/balatrollm --cov-report=term-missing --cov-report=html
59+
60+
quality: lint format typecheck test ## Run all code quality checks
5361
@echo "$(GREEN)✓ All quality checks completed$(RESET)"
5462

5563
# Build targets
@@ -62,8 +70,19 @@ clean: ## Clean build artifacts and caches
6270
find . -type f -name "*.pyc" -delete
6371
@echo "$(GREEN)✓ Cleanup completed$(RESET)"
6472

73+
# Game targetmaks
74+
start: ## Kill previous instances and start LiteLLM server + Balatro
75+
@echo "$(YELLOW)Stopping all previous instances...$(RESET)"
76+
@pkill -f litellm 2>/dev/null || true
77+
@./balatro.sh --kill 2>/dev/null || true
78+
@echo "$(YELLOW)Starting LiteLLM proxy server...$(RESET)"
79+
@litellm --config config/litellm.yaml &
80+
@sleep 3
81+
@echo "$(YELLOW)Starting Balatro...$(RESET)"
82+
@./balatro.sh
83+
6584
# Convenience targets
66-
dev: format lint typecheck ## Quick development check
85+
dev: format lint typecheck test ## Quick development check
6786
@echo "$(GREEN)✓ Development checks completed$(RESET)"
6887

6988
all: format lint typecheck ## Complete quality check

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "balatrollm"
33
version = "0.1.0"
4-
description = "Add your description here"
4+
description = "LLM-powered bot that plays Balatro using strategic decision making"
55
readme = "README.md"
66
authors = [{ name = "S1M0N38", email = "bertolottosimone@gmail.com" }]
77
requires-python = ">=3.13"
@@ -54,5 +54,6 @@ dev = [
5454
"basedpyright>=1.31.1",
5555
"pytest>=8.4.1",
5656
"pytest-asyncio>=1.1.0",
57+
"pytest-cov>=6.0.0",
5758
"ruff>=0.12.8",
5859
]

0 commit comments

Comments
 (0)