This directory contains scripts to streamline the development and testing of the eInk Layout Manager.
This script pulls the latest multi-arch development Docker image and starts a container for local testing.
- Docker: Must be installed and running.
- Bash: Required to run the script.
Run the script from the project root directory:
./scripts/run_dev.sh- Pulls the Image: Fetches
ghcr.io/stuart-c/addon-eink:devfrom the GitHub Container Registry. - Cleanup: Automatically stops and removes any previously running
eink-devcontainer. - Starts Container:
- Port: Maps host port
8099to container port8099. - Persistence: Maps
./.datain the project root to/datain the container. Any database records or images created will be saved here.
- Port: Maps host port
- Browser: Automatically attempts to open
http://localhost:8099in your default browser. - Logs: Starts following the container logs in your terminal. Press
Ctrl+Cto stop the logs and shut down the container.
This script runs the full local test suite (Python lints, Python unit tests, and Frontend unit tests). Running this script is mandatory before submitting any code changes.
./scripts/run_tests.shIf the Python virtual environment (.venv) is not found, the script will automatically run ./scripts/make_venv.sh to provision it for you.
This script runs the end-to-end integration tests using Playwright. Running this script is mandatory for changes affecting the core application logic or API.
./scripts/run_e2e.shWarning
Parallel Run Warning: Running this script directly defaults to port 8099 and the ./eink/e2e/test_data_e2e directory. Running multiple instances without overrides will cause test failures and data corruption.
System Load: E2E tests are resource-intensive. Check your system load average (e.g., using uptime or top) before starting parallel runs to ensure your machine can handle the extra processes.
Like run_tests.sh, this script will automatically provision the virtual environment and ensure Playwright browsers are installed if they are missing.
This is a comprehensive wrapper script that executes the full development pipeline in an isolated environment. It is recommended to run this script before pushing any significant changes.
./scripts/verify_all.sh- Isolation: Generates a random free port and a unique temporary data directory (
.data_verify_XXXXXX) to ensure the verification process does not interfere with your local development data or other running services. - Frontend Build: Runs
./scripts/build_frontend.sh. - Unit Tests: Runs
./scripts/run_tests.sh(Python lints, unit tests, and Frontend unit tests). - Backend Startup: Starts the backend application in the background using the generated port and temporary directory.
- E2E Tests: Runs
./scripts/run_e2e.shagainst the freshly started background application. - Cleanup: Automatically terminates the background backend process and removes the temporary data directory upon completion or if the script is interrupted.
A helper script used by the testing tools to create a Python virtual environment and initialise nodeenv with the correct Node.js version.
./scripts/make_venv.shThis script builds the frontend assets.
./scripts/build_frontend.shIf the Python virtual environment is not found, it will automatically run ./scripts/make_venv.sh.
This script runs the backend application locally within the virtual environment.
./scripts/run_app.shIf the Python virtual environment is not found, it will automatically run ./scripts/make_venv.sh.
This script runs the application with the DATA_DIR environment variable set to ./.data in the project root. This is where the SQLite database and image assets will be stored during local execution.
If an E2E test or the application is interrupted, it may leave a background Python process running on its allocated port.
You can check if a process is still occupying a port:
lsof -i :8099To kill an orphaned backend process running on port 8099:
fuser -k 8099/tcpOr use ps to find the app.main process and kill it manually.