Files
dienakdz 87f2845483 Refactor code for improved readability and consistency
- Cleaned up whitespace and formatting in various files including http.py, language.py, logger.py, safe_exec.py, and SQL migration scripts.
- Consolidated import statements and removed unnecessary blank lines.
- Updated logging configuration for better clarity.
- Enhanced the safe execution code with improved error handling and logging.
- Removed commented-out code and unnecessary variables in backfill_zero_trades.py and other scripts.
- Added a pyproject.toml for Ruff and Vulture configuration.
- Introduced requirements-dev.txt for development dependencies.
- Removed commented-out stock entries in init.sql for cleaner migration scripts.
2026-04-09 14:30:51 +07:00

48 lines
1.5 KiB
Makefile

.PHONY: install-backend-dev lint-backend format-backend check-backend check-backend-docker fix-backend fix-backend-docker install-frontend lint-frontend format-frontend check-frontend check-code format-code install-git-hooks run-pre-commit run-pre-commit-all
install-backend-dev:
cd backend_api_python && python3 -m pip install -r requirements-dev.txt
lint-backend:
cd backend_api_python && ruff check .
format-backend:
cd backend_api_python && ruff format .
check-backend:
cd backend_api_python && ruff format --check . && ruff check . && vulture app scripts run.py gunicorn_config.py
check-backend-docker:
docker run --rm -v "$(PWD)/backend_api_python:/app" -w /app python:3.12-slim-bookworm sh -lc "pip install -q ruff vulture && ruff format --check . && ruff check . && vulture app scripts run.py gunicorn_config.py"
fix-backend:
cd backend_api_python && ruff check . --fix && ruff format .
fix-backend-docker:
docker run --rm -v "$(PWD)/backend_api_python:/app" -w /app python:3.12-slim-bookworm sh -lc "pip install -q ruff && ruff check . --fix && ruff format ."
install-frontend:
cd frontend_vue && yarn install
lint-frontend:
cd frontend_vue && yarn lint:check
format-frontend:
cd frontend_vue && yarn format
check-frontend:
cd frontend_vue && yarn format:check && yarn lint:check
check-code: check-backend check-frontend
format-code: format-backend format-frontend
install-git-hooks:
pre-commit install
run-pre-commit:
pre-commit run
run-pre-commit-all:
pre-commit run -a