-
Notifications
You must be signed in to change notification settings - Fork 0
Update dependencies, increase test coverage, and fix code issues #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
73cc842
961a287
14bdbb2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # Pre-commit configuration for bash.d | ||
| # Install: pip install pre-commit && pre-commit install | ||
|
|
||
| repos: | ||
| # Python code formatting | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.8.0 | ||
| hooks: | ||
| - id: ruff | ||
| args: [--fix, --exit-non-zero-on-fix] | ||
| types_or: [python, pyi] | ||
| - id: ruff-format | ||
| types_or: [python, pyi] | ||
|
|
||
| # General file checks | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v5.0.0 | ||
| hooks: | ||
| - id: trailing-whitespace | ||
| exclude: '\.md$' | ||
| - id: end-of-file-fixer | ||
| exclude: '\.md$' | ||
| - id: check-yaml | ||
| args: [--unsafe] | ||
| - id: check-json | ||
| - id: check-toml | ||
| - id: check-added-large-files | ||
| args: ['--maxkb=500'] | ||
| - id: check-merge-conflict | ||
| - id: detect-private-key | ||
| - id: check-executables-have-shebangs | ||
| - id: check-shebang-scripts-are-executable | ||
|
|
||
| # Shell script linting | ||
| - repo: https://github.com/shellcheck-py/shellcheck-py | ||
| rev: v0.10.0.1 | ||
| hooks: | ||
| - id: shellcheck | ||
| args: [--severity=warning] | ||
| types: [shell] | ||
| exclude: '(bash_history\.d|bash_secrets\.d)' | ||
|
|
||
| # Python type checking (optional, may be slow) | ||
| # - repo: https://github.com/pre-commit/mirrors-mypy | ||
| # rev: v1.13.0 | ||
| # hooks: | ||
| # - id: mypy | ||
| # args: [--ignore-missing-imports] | ||
| # additional_dependencies: [pydantic>=2.0] | ||
|
|
||
| # Commit message formatting | ||
| - repo: https://github.com/commitizen-tools/commitizen | ||
| rev: v4.1.0 | ||
| hooks: | ||
| - id: commitizen | ||
| stages: [commit-msg] | ||
|
|
||
| # CI configuration | ||
| ci: | ||
| autofix_commit_msg: 'style: auto-fixes from pre-commit hooks' | ||
| autofix_prs: true | ||
| autoupdate_schedule: monthly |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,247 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # bash.d - Makefile for project automation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Usage: make [target] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .PHONY: help install install-dev test test-cov lint format clean docs \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| check health agents-list agents-validate setup-hooks \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| build docker-build docker-run index update-deps | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Default target | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| .DEFAULT_GOAL := help | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Colors for terminal output | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| BLUE := \033[34m | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GREEN := \033[32m | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| YELLOW := \033[33m | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RED := \033[31m | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RESET := \033[0m | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Project paths | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| BASHD_HOME := $(shell pwd) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PYTHON := python3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PIP := pip3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PYTEST := $(PYTHON) -m pytest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Help | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| help: ## Show this help message | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)bash.d - Modular Bash Configuration Framework$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)Usage:$(RESET) make [target]" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(YELLOW)Targets:$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| awk 'BEGIN {FS = ":.*?## "}; {printf " $(GREEN)%-20s$(RESET) %s\n", $$1, $$2}' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Installation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| install: ## Install bash.d to ~/.bash.d | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Installing bash.d...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ./install.sh | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Installation complete$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| install-dev: ## Install development dependencies | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Installing development dependencies...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $(PIP) install -r requirements.txt | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $(PIP) install pre-commit | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Development dependencies installed$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| install-all: install install-dev setup-hooks ## Full installation with dev tools and hooks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Testing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| test: ## Run all tests | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Running tests...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $(PYTEST) tests/ -v | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Tests complete$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| test-cov: ## Run tests with coverage report | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Running tests with coverage...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $(PYTEST) tests/ -v --cov=agents --cov=tools --cov-report=term-missing --cov-report=html | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Coverage report generated in htmlcov/$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| test-quick: ## Run tests quickly (no verbose) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(PYTEST) tests/ -q | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| test-watch: ## Run tests in watch mode (requires pytest-watch) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $(PYTHON) -m pytest_watch tests/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Code Quality | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| lint: ## Run linting checks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Running linters...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(PYTHON) -m ruff check agents/ tools/ tests/ --fix || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Linting complete$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| format: ## Format code with ruff | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Formatting code...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(PYTHON) -m ruff format agents/ tools/ tests/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Formatting complete$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| typecheck: ## Run type checking with mypy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Running type checks...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(PYTHON) -m mypy agents/ tools/ --ignore-missing-imports || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Type checking complete$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+74
to
+87
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Silencing linter/type-checker failures masks real issues. The Either remove π§ Proposed fix lint: ## Run linting checks
`@echo` "$(BLUE)Running linters...$(RESET)"
- @$(PYTHON) -m ruff check agents/ tools/ tests/ --fix || true
+ @$(PYTHON) -m ruff check agents/ tools/ tests/ --fix
`@echo` "$(GREEN)β Linting complete$(RESET)"
...
typecheck: ## Run type checking with mypy
`@echo` "$(BLUE)Running type checks...$(RESET)"
- @$(PYTHON) -m mypy agents/ tools/ --ignore-missing-imports || true
+ @$(PYTHON) -m mypy agents/ tools/ --ignore-missing-imports
`@echo` "$(GREEN)β Type checking complete$(RESET)"π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| check: lint typecheck test ## Run all checks (lint, typecheck, test) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Project Health | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| health: ## Check project health and status | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Checking project health...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(PYTHON) scripts/project_health.py 2>/dev/null || $(PYTHON) -c "\ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import os, glob, json; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print('π Project Statistics:'); \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| py_files = glob.glob('**/*.py', recursive=True); \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sh_files = glob.glob('**/*.sh', recursive=True); \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(f' Python files: {len(py_files)}'); \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(f' Shell scripts: {len(sh_files)}'); \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(f' Agent modules: {len(glob.glob(\"agents/**/*.py\", recursive=True))}'); \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(f' Test files: {len(glob.glob(\"tests/*.py\"))}'); \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| print(f' Documentation: {len(glob.glob(\"**/*.md\", recursive=True))}'); \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| " | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Health check complete$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+94
to
+107
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π§Ή Nitpick | π΅ Trivial Inline Python fallback is functional but consider maintainability. The health target's inline Python fallback works, but multi-line Python embedded in Makefiles is fragileβescaping and quoting issues can be subtle. The primary path ( The π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| outdated: ## Check for outdated dependencies | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Checking for outdated packages...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(PIP) list --outdated 2>/dev/null | head -20 || echo "Unable to check" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| validate: ## Validate all configurations | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Validating configurations...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(PYTHON) -c "from agents import BaseAgent, AgentType; print('β Agent imports OK')" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(PYTHON) -c "from tools import ToolRegistry; print('β Tool imports OK')" 2>/dev/null || echo "β Tool registry not found" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @bash -n bashrc && echo "β bashrc syntax OK" || echo "β bashrc syntax error" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Validation complete$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Agents | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| agents-list: ## List all available agents | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Available Agents:$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @find agents -name "*_agent.py" -type f | sed 's/agents\// /' | sed 's/_agent.py//' | sort | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| agents-validate: ## Validate all agent definitions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Validating agents...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(PYTHON) validate_master_agent.py 2>/dev/null || echo "Validation script not configured" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| agents-demo: ## Run agent demo | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Running agent demo...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(PYTHON) -m agents.demo_multiagent 2>/dev/null || echo "Demo not available" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Documentation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docs: ## Generate documentation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Generating documentation...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(PYTHON) scripts/generate_docs.py 2>/dev/null || \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Documentation generator not found. Creating basic index..." | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(MAKE) docs-index | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Documentation generated$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docs-index: ## Generate documentation index | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Generating docs index...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @find docs -name "*.md" -type f | sort | \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| awk '{print "- ["$$0"]("$$0")"}' > docs/INDEX.md 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Index created at docs/INDEX.md$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docs-serve: ## Serve documentation locally (requires mkdocs) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @mkdocs serve 2>/dev/null || echo "mkdocs not installed. Run: pip install mkdocs" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Index & Search | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| index: ## Build search index | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Building search index...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @bash -c 'source bashrc 2>/dev/null && bashd_index_build' 2>/dev/null || \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bash lib/indexer.sh build 2>/dev/null || \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Indexer not available" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Index built$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| index-stats: ## Show index statistics | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @bash -c 'source bashrc 2>/dev/null && bashd_index_stats' 2>/dev/null || \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "Index stats not available" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Cleanup | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| clean: ## Clean generated files and caches | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Cleaning...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @find . -type d -name ".mypy_cache" -exec rm -rf {} + 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @find . -type d -name ".ruff_cache" -exec rm -rf {} + 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @find . -type d -name "htmlcov" -exec rm -rf {} + 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @find . -type f -name "*.pyc" -delete 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @find . -type f -name ".coverage" -delete 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Cleaned$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| clean-all: clean ## Deep clean including index and logs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @rm -rf .bashd_index.json .bashd_cache 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @find . -type d -name "logs_*" -exec rm -rf {} + 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Deep clean complete$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Docker | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docker-build: ## Build Docker image | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Building Docker image...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docker build -t bashd:latest . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Docker image built$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docker-run: ## Run Docker container | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docker run -it --rm bashd:latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docker-compose-up: ## Start all services with docker-compose | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docker-compose up -d | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docker-compose-down: ## Stop all services | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| docker-compose down | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Git Hooks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| setup-hooks: ## Setup pre-commit hooks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Setting up git hooks...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @if command -v pre-commit >/dev/null 2>&1; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pre-commit install; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "$(GREEN)β Pre-commit hooks installed$(RESET)"; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| else \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| echo "$(YELLOW)β pre-commit not found. Installing...$(RESET)"; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $(PIP) install pre-commit && pre-commit install; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Updates | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| update-deps: ## Update all dependencies to latest versions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Updating dependencies...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $(PIP) install --upgrade -r requirements.txt | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Dependencies updated$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| update-repo: ## Pull latest changes and update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Updating repository...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| git pull origin main | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| $(MAKE) install-dev | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Repository updated$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+225
to
+229
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π§Ή Nitpick | π΅ Trivial Hardcoded Line 227 hardcodes π§ Proposed fix update-repo: ## Pull latest changes and update
`@echo` "$(BLUE)Updating repository...$(RESET)"
- git pull origin main
+ git pull origin $$(git rev-parse --abbrev-ref HEAD)
$(MAKE) install-dev
`@echo` "$(GREEN)β Repository updated$(RESET)"π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Development Shortcuts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dev: ## Start development environment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Starting development environment...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(MAKE) validate | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(MAKE) test-quick | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Development environment ready$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ci: clean lint test ## Run CI pipeline locally | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β CI pipeline passed$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| release: check ## Prepare for release | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(BLUE)Preparing release...$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(MAKE) clean | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @$(MAKE) docs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| @echo "$(GREEN)β Ready for release$(RESET)" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add
checkto.PHONYdeclaration.The
checktarget on line 89 is not declared as.PHONY. If a file namedcheckever exists in the repo root, Make will skip executing this target. Add it to the PHONY list for correctness.π§ Proposed fix
Also applies to: 89-89
π§° Tools
πͺ checkmake (0.2.2)
[warning] 4-4: Missing required phony target "all"
(minphony)
π€ Prompt for AI Agents