Implement dose tracking functionality and enhance CSV migration
- Added a new migration script to introduce dose tracking columns in the CSV. - Updated DataManager to handle new dose tracking columns and methods for adding doses. - Enhanced MedTrackerApp to support dose entry and display for each medicine. - Modified UIManager to create a scrollable input frame with dose tracking elements. - Implemented tests for delete functionality, dose tracking, edit functionality, and scrollable input. - Updated existing tests to ensure compatibility with the new CSV format and dose tracking features.
This commit is contained in:
28
Makefile
28
Makefile
@@ -3,6 +3,12 @@ VERSION=1.0.0
|
||||
ROOT=/home/will
|
||||
ICON=chart-671.png
|
||||
SHELL=fish
|
||||
|
||||
# Virtual environment variables
|
||||
VENV_DIR=.venv
|
||||
VENV_ACTIVATE=$(VENV_DIR)/bin/activate
|
||||
PYTHON=$(VENV_DIR)/bin/python
|
||||
|
||||
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}'
|
||||
install: ## Set up the development environment
|
||||
@@ -24,9 +30,9 @@ deploy: ## Deploy the application as a standalone executable
|
||||
cp -f ./dist/${TARGET} ${ROOT}/Applications/
|
||||
cp -f ./deploy/${TARGET}.desktop ${ROOT}/.local/share/applications/
|
||||
desktop-file-validate ${ROOT}/.local/share/applications/${TARGET}.desktop
|
||||
run: ## Run the application
|
||||
run: $(VENV_ACTIVATE) ## Run the application
|
||||
@echo "Running the application..."
|
||||
python src/main.py
|
||||
$(PYTHON) src/main.py
|
||||
start: ## Start the application
|
||||
@echo "Starting the application..."
|
||||
docker-compose up -d --build
|
||||
@@ -48,6 +54,22 @@ test-watch: ## Run tests in watch mode
|
||||
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
|
||||
test-dose-tracking: ## Test the dose tracking functionality
|
||||
@echo "Testing dose tracking functionality..."
|
||||
.venv/bin/python scripts/test_dose_tracking.py
|
||||
test-scrollable-input: ## Test the scrollable input frame UI
|
||||
@echo "Testing scrollable input frame..."
|
||||
.venv/bin/python scripts/test_scrollable_input.py
|
||||
test-edit-functionality: ## Test the enhanced edit functionality
|
||||
@echo "Testing edit functionality..."
|
||||
.venv/bin/python scripts/test_edit_functionality.py
|
||||
test-edit-window: $(VENV_ACTIVATE) ## Test edit window functionality (save and delete)
|
||||
@echo "Running edit window functionality test..."
|
||||
$(PYTHON) scripts/test_edit_window_functionality.py
|
||||
|
||||
migrate-csv: $(VENV_ACTIVATE) ## Migrate CSV to new format with dose tracking
|
||||
@echo "Migrating CSV to new format..."
|
||||
.venv/bin/python migrate_csv.py
|
||||
lint: ## Run the linter
|
||||
@echo "Running the linter..."
|
||||
docker-compose exec ${TARGET} pipenv run pre-commit run --all-files
|
||||
@@ -69,4 +91,4 @@ commit-emergency: ## Emergency commit (bypasses pre-commit hooks) - USE SPARINGL
|
||||
@read -p "Enter commit message: " msg; \
|
||||
git add . && git commit --no-verify -m "$$msg"
|
||||
@echo "✅ Emergency commit completed. Please run tests manually when possible."
|
||||
.PHONY: install build attach deploy run start stop test lint format shell requirements commit-emergency help
|
||||
.PHONY: install build attach deploy run start stop test lint format shell requirements commit-emergency test-dose-tracking test-scrollable-input test-edit-functionality test-edit-window migrate-csv help
|
||||
|
||||
Reference in New Issue
Block a user