From 3875e0956f5288fee9cfb4246953e07ee830ab8e Mon Sep 17 00:00:00 2001 From: William Valentin Date: Fri, 25 Jul 2025 10:30:38 -0700 Subject: [PATCH] Refactor Makefile to improve environment setup; change poetry install command to use --no-root and fix formatting for consistency. --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 62d2d41..6d22036 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,9 @@ help: ## Show this help install: ## Set up the development environment @echo "Setting up the development environment..." # poetry env use 3.13 +# eval $(poetry env use 3.13) # bash/zsh/csh eval (poetry env activate) - poetry install + poetry install --no-root poetry run pre-commit install --install-hooks --overwrite poetry run pre-commit autoupdate poetry run pre-commit run --all-files @@ -17,7 +18,7 @@ build: ## Build the Docker image docker buildx build --platform linux/amd64,linux/arm64 -t ${IMAGE} --push . deploy: ## Deploy the application as a standalone executable @echo "Deploying the application..." - pyinstaller --name ${TARGET} --optimize 2 --onefile --windowed --hidden-import='PIL._tkinter_finder' --icon='${ICON}' --add-data=".env:." --add-data='./chart-671.png:.' --add-data='./thechart_data.csv:.' src/main.py + pyinstaller --name ${TARGET} --optimize 2 --onefile --windowed --hidden-import='PIL._tkinter_finder' --icon='${ICON}' --add-data="./.env:." --add-data='./chart-671.png:.' --add-data='./thechart_data.csv:.' src/main.py cp -f ./thechart_data.csv ${ROOT}/Documents/ cp -f ./dist/${TARGET} ${ROOT}/Applications/ cp -f ./deploy/${TARGET}.desktop ${ROOT}/.local/share/applications/ @@ -45,7 +46,7 @@ attach: ## Open a shell in the container docker-compose exec -it ${TARGET} /bin/bash shell: ## Open a shell in the local environment @echo "Opening a shell in the local environment..." - poetry eval (poetry env activate) + eval (poetry env activate) requirements: ## Export the requirements to a file @echo "Exporting requirements to requirements.txt..." poetry export --without-hashes -f requirements.txt -o requirements.txt