The Ethoscope is a platform for high-throughput ethomics: automated behavioral monitoring of small organisms like Drosophila melanogaster. This is the GitHub repository for the software part of the ethoscope platform.
All technical information regarding ethoscope is compiled in our documentation.
Version 2.0 is a major release with significant improvements:
- CI/CD Pipeline: Automated testing, quality checks, and releases via GitHub Actions
- Testing Infrastructure: 80%+ code coverage with comprehensive test suites
- Authentication System: User management and session handling
- Enhanced Notifications: Multi-channel alerts (Email, Slack, Mattermost)
- Improved Backups: Robust MySQL, SQLite, and video backup systems
- Docker Support: Full containerization for development and deployment
- Code Quality: Pre-commit hooks, linting, and security scanning
- Documentation: Comprehensive guides for testing, deployment, and CI/CD
See the release notes for full details.
For device package:
cd src/ethoscope
make installFor node package:
cd src/node
make install-allFor quick testing and development:
cd Docker/node
docker compose up -dSee Docker documentation for details.
Run all tests:
python run_tests.pyRun with coverage:
python run_tests.py --coverageSee TESTING.md for comprehensive testing documentation.
src/ethoscope/- Main Python package for video monitors (devices). Can also be used as a standalone offline tracking tool.src/node/- Software stack for the node server that synchronizes and controls multiple devices.services/- Systemd service files for device and node daemons.accessories/- Utility scripts, database tools, and hardware configurations.Docker/- Docker configurations for node, virtuascope, and development environments.docs/- Comprehensive documentation for features and systems..github/- CI/CD workflows and GitHub Actions configuration.
main- Stable releases only. Protected branch with required CI checks.dev- Development branch used in @gilestrolab for testing and integration.
- Create feature/bugfix branches from
dev - Implement changes with tests
- Submit pull request to
dev - CI runs automated tests and quality checks
- After review and approval, merge to
dev - Deploy to @gilestrolab devices for real-world testing
- After several weeks of stable operation, merge
devtomain - Create release tag for public deployment
Latest stable release: v2.0 (November 2025)
The project uses pre-commit hooks to maintain code quality:
# Install pre-commit hooks
./scripts/setup_pre_commit.sh
# Run hooks manually
pre-commit run --all-filesHooks include:
- Formatting: black, isort/ruff
- Linting: ruff, flake8
- Security: bandit, detect-secrets
- Testing: Integration tests for critical changes
- Real-time Tracking: Adaptive background subtraction for robust animal tracking
- ROI Templates: Built-in templates for common experimental setups (20-tube, 30-tube, arenas)
- Multi-Stimulator: Support for sleep deprivation, optomotor, odor delivery, and custom stimulators
- Video Recording: Synchronized video recording with tracking data
- Hardware Integration: GPIO control, camera support (PiCamera, PiCamera2, USB cameras)
- Device Management: Centralized control of multiple ethoscope devices
- Authentication: User management with role-based access control
- Backup System: Automated MySQL, SQLite, and video backups with integrity checking
- Notifications: Multi-channel alerts (Email, Slack, Mattermost) for device issues
- Web Interface: AngularJS-based frontend for monitoring and control
- Database Management: SQLite and MySQL support with caching and resilience
- CI/CD: Automated testing across Python 3.9-3.12, quality checks, and releases
- Testing: 80%+ code coverage with unit, integration, and functional tests
- Docker: Development environments for node, virtuascope, and sandbox testing
- Pre-commit Hooks: Automated code formatting, linting, and security scanning
The ethoscope platform consists of:
- Ethoscope Devices: Raspberry Pi-based video monitors with camera and optional hardware modules
- Node Server: Central management server that coordinates devices and collects data
- Update System: Git-based software distribution and update management
See CLAUDE.md for detailed architecture documentation.
- Testing Guide - Comprehensive testing documentation
- CI/CD Documentation - GitHub Actions workflows and pipelines
- Backup System - Backup status and management
- Multi-Stimulator - Using multiple stimulators
- Sleep Restriction - Sleep restriction protocols
- Package Structure - Architecture and package organization
We welcome contributions! Please:
- Fork the repository
- Create a feature branch from
dev - Write tests for new functionality
- Ensure all tests pass and code quality checks succeed
- Submit a pull request to
dev
See our CI/CD documentation for details on automated checks.
If you use ethoscope in your research, please cite:
Geissmann Q, Garcia Rodriguez L, Beckwith EJ, Gilestro GF (2019) Ethoscopes: An open platform for high-throughput ethomics PLOS Biology 17(10): e3000461 https://doi.org/10.1371/journal.pbio.3000461
- Documentation: https://lab.gilest.ro/ethoscope-manual
- Issues: https://github.com/gilestrolab/ethoscope/issues
- Lab Website: https://lab.gilest.ro
Ethoscope source code is licensed under GPL-3.0 (see LICENSE).
Maintained by: Gilestro Lab Latest Release: v2.0