Refactor Makefile for clarity and consistency; update environment setup to use poetry and improve deployment process. Update pyproject.toml to correct project description and remove unnecessary dependencies.
This commit is contained in:
18
Makefile
18
Makefile
@@ -4,20 +4,19 @@ ROOT=/home/will
|
||||
ICON=chart-671.png
|
||||
help: ## Show this help
|
||||
@grep -E -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
||||
setup-env: ## Set up the development environment
|
||||
install: ## Set up the development environment
|
||||
@echo "Setting up the development environment..."
|
||||
pip install poetry
|
||||
poetry env use 3.13
|
||||
# poetry env use 3.13
|
||||
eval (poetry env activate)
|
||||
poetry install
|
||||
poetry lock
|
||||
poetry run pre-commit install --install-hooks --overwrite
|
||||
poetry run pre-commit autoupdate
|
||||
poetry run pre-commit run --all-files
|
||||
build: ## Build the Docker image
|
||||
@echo "Building the Docker image..."
|
||||
docker buildx build --platform linux/amd64,linux/arm64 -t ${IMAGE} --push .
|
||||
install: ## Install the application
|
||||
@echo "Installing the application..."
|
||||
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
|
||||
cp -f ./thechart_data.csv ${ROOT}/Documents/
|
||||
cp -f ./dist/${TARGET} ${ROOT}/Applications/
|
||||
@@ -41,10 +40,13 @@ lint: ## Run the linter
|
||||
format: ## Format the code
|
||||
@echo "Formatting the code..."
|
||||
docker-compose exec ${TARGET} pipenv run pre-commit run --all-files --show-diff
|
||||
shell: ## Open a shell in the container
|
||||
attach: ## Open a shell in the container
|
||||
@echo "Opening 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)
|
||||
requirements: ## Export the requirements to a file
|
||||
@echo "Exporting requirements to requirements.txt..."
|
||||
poetry export --without-hashes -f requirements.txt -o requirements.txt
|
||||
.PHONY: setup-env build install run start stop test lint format shell requirements help
|
||||
.PHONY: install build attach deploy run start stop test lint format shell requirements help
|
||||
|
||||
Reference in New Issue
Block a user