From c45eb2d3d8e3b7fc58e96f7e4843df1bd3209aba Mon Sep 17 00:00:00 2001 From: Marisol Date: Wed, 4 Mar 2026 10:37:42 +0000 Subject: [PATCH] docs: Update MARISOL.md and README --- MARISOL.md | 36 ++++++++++++++++++++++++++++++++++++ README.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 MARISOL.md diff --git a/MARISOL.md b/MARISOL.md new file mode 100644 index 0000000..b89050b --- /dev/null +++ b/MARISOL.md @@ -0,0 +1,36 @@ +# MARISOL.md — Pipeline Context + +## Project Overview +piDSLM is a Raspberry Pi DSLR-like camera interface project that provides GUI controls for photo/video capture using the HQ Camera, with Dropbox upload integration. The project uses Python with guizero for the GUI, RPi.GPIO for hardware control, and picamera/picamera2 for camera operations. It's designed for Raspberry Pi 2/3 with MHS35-TFT display. + +## Build & Run +- **Language**: Python 3.x +- **Framework**: guizero (GUI framework) +- **Docker image**: python:3.12-slim +- **Install deps**: `pip install -r requirements.txt` +- **Run**: `python3 pidslm.py` (requires Raspberry Pi hardware with HQ Camera and MHS35-TFT display) + +## Testing +- **Test framework**: pytest +- **Test command**: `python -m pytest tests/ -v` +- **Hardware mocks needed**: yes — RPi.GPIO, guizero, picamera, picamera2, gpiozero, spidev, and other hardware modules are pre-mocked in tests/conftest.py +- **Known test issues**: The main application (pidslm.py) contains while-True loops that prevent normal execution in headless environments; conftest.py strips these loops via AST parsing for testing + +## Pipeline History +- Initial pipeline run: Project structure analyzed, dependencies verified +- Test setup verified: conftest.py provides 15+ RPi hardware module mocks +- Source loading: source_module fixture loads pidslm.py and dropbox_upload.py with hardware mocks active + +## Known Issues +- **Hardware dependency**: Project requires actual Raspberry Pi hardware (HQ Camera, MHS35-TFT display) for full functionality +- **while-True loops**: Main application has infinite loops that must be stripped for testing +- **OAuth2 token**: Dropbox integration requires manual token setup (TOKEN = 'YOUR_ACCESS_TOKEN' in dropbox_upload.py) +- **INSTALL.sh**: Requires sudo privileges and Raspberry Pi environment + +## Notes +- **Key files**: pidslm.py (main GUI application), dropbox_upload.py (Dropbox integration), INSTALL.sh (installation script) +- **Dependencies**: Pillow, guizero, dropbox, guizero[images] +- **Test infrastructure**: tests/conftest.py provides comprehensive hardware mocking for RPi modules +- **Architecture**: Uses guizero App class for GUI, RPi.GPIO for camera control, picamera/picamera2 for camera operations +- **Dropbox integration**: Uses OAuth2 API v2, requires manual token configuration +- **GUI controls**: Provides buttons for photo capture, video recording, and Dropbox upload diff --git a/README.md b/README.md index ff81653..eeeb553 100644 --- a/README.md +++ b/README.md @@ -50,5 +50,39 @@ Finally, run the INSTALL.sh script using the following command sudo ./INSTALL.sh ``` +# Usage +The main application provides a GUI interface for camera control: +1. Launch the application: `python3 pidslm.py` +2. Use the on-screen buttons to: + - Take photos + - Record videos + - View captured media in gallery + - Upload footage to Dropbox + +The interface is designed for the MHS35-TFT display on Raspberry Pi. + +# Testing + +Run the test suite using pytest: + +```bash +python -m pytest tests/ -v +``` + +The tests use hardware mocks provided in `tests/conftest.py` for RPi.GPIO, guizero, and other hardware modules. + +# Contributing + +This project is inspired by the MerlinPi project. Feel free to: + +- Submit bug reports and feature requests +- Contribute camera grip designs for the enclosure +- Share improvements to the codebase + +For design contributions, reach out to the author for inclusion. + +# License + +This project is based on the MerlinPi project by Martin Manders. Please respect the original license and contributors.