Run ruff format changes and finalize indentation and lint fixes.

This commit is contained in:
William Valentin
2025-08-09 12:10:16 -07:00
parent 9cec07e9f6
commit 9a5a2f0022
68 changed files with 1272 additions and 4301 deletions

View File

@@ -108,25 +108,25 @@ stop: ## Stop the application
docker-compose down
test: ## Run the tests
@echo "Running the tests..."
.venv/bin/python -m pytest tests/ -v --cov=src --cov-report=term-missing --cov-report=html:htmlcov
$(PYTHON) -m pytest -q
test-unit: ## Run unit tests only
@echo "Running unit tests..."
.venv/bin/python -m pytest tests/ -v --tb=short
$(PYTHON) -m pytest tests/ -v --tb=short
test-coverage: ## Run tests with detailed coverage report
@echo "Running tests with coverage..."
.venv/bin/python -m pytest tests/ --cov=src --cov-report=html:htmlcov --cov-report=xml --cov-report=term-missing
env PYTHONPATH=src $(PYTHON) -m pytest tests/ --cov=thechart --cov-report=term-missing --cov-report=html:htmlcov --cov-report=xml
test-watch: ## Run tests in watch mode
@echo "Running tests in watch mode..."
.venv/bin/python -m pytest-watch tests/ -- -v --cov=src
env PYTHONPATH=src $(PYTHON) -m pytest_watch tests/ -- -v --cov=thechart
test-debug: ## Run tests with debug output
@echo "Running tests with debug output..."
.venv/bin/python -m pytest tests/ -v -s --tb=long --cov=src
env PYTHONPATH=src $(PYTHON) -m pytest tests/ -v -s --tb=long --cov=thechart
lint: ## Run the linter
@echo "Running the linter..."
docker-compose exec ${TARGET} pipenv run pre-commit run --all-files
uv run ruff check .
format: ## Format the code
@echo "Formatting the code..."
docker-compose exec ${TARGET} pipenv run pre-commit run --all-files --show-diff
uv run ruff format .
attach: ## Open a shell in the container
@echo "Opening a shell in the container..."
docker-compose exec -it ${TARGET} /bin/bash
@@ -135,7 +135,11 @@ shell: ## Open a shell in the local environment
source .venv/bin/activate.${SHELL}; /bin/${SHELL}
requirements: ## Export the requirements to a file
@echo "Exporting requirements to requirements.txt..."
poetry export --without-hashes -f requirements.txt -o requirements.txt
uv pip compile requirements.in -o requirements.txt
@if [ -f requirements-dev.in ]; then \
echo "Exporting dev requirements to requirements-dev.txt..."; \
uv pip compile requirements-dev.in -o requirements-dev.txt; \
fi
update-version: ## Update version in pyproject.toml from .env file and sync uv.lock
@echo "Updating version in pyproject.toml from .env..."