Development
Contributing to Dj Signals Panel or setting up for local development.
Prerequisites
- Python 3.9+
- Git
- Docker (recommended)
Setup
1. Clone Repository
2. Choose Development Environment
Option A: Docker (Recommended)
Option B: Local Environment
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install package and dependencies
make install
# or
pip install -e .
pip install -r requirements.txt
3. Set Up Example Project
4. Run Development Server
Visit: http://127.0.0.1:8000/admin/
Testing
Run All Tests
Run Specific Tests
pytest tests/test_admin.py -v
pytest tests/test_search_views.py -v
pytest tests/test_detail_view.py -v
With Coverage
Project Structure
dj-signals-panel/
├── dj_signals_panel/ # Main package
│ ├── admin.py # Admin integration (registers the panel)
│ ├── apps.py # AppConfig
│ ├── conf.py # Settings and defaults
│ ├── data.py # Data-fetching logic
│ ├── interfaces.py # Typed data structures
│ ├── models.py # Placeholder model (no migrations)
│ ├── panel.py # Admin panel class
│ ├── urls.py # URL patterns
│ ├── utils.py # Utility helpers
│ ├── views.py # Django views
│ ├── static/ # CSS and vendor assets
│ ├── templates/ # HTML templates
│ └── templatetags/ # Custom template tags
├── tests/ # Test suite
│ ├── base.py # Test base class
│ ├── conftest.py # Pytest configuration
│ ├── test_admin.py # Admin integration tests
│ ├── test_search_views.py # Signal list/search view tests
│ └── test_detail_view.py # Signal detail view tests
├── example_project/ # Example Django project
├── docs/ # Documentation
└── Makefile # Development commands
Code Style
- Follow PEP 8
- Use type hints where helpful
- Write docstrings for public methods
- Keep functions focused and small
Makefile Commands
make install # Install dependencies
make test_local # Run tests locally
make test_docker # Run tests in Docker
make docker_up # Start Docker services
make docker_down # Stop Docker services
make docker_shell # Open shell in container
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Run test suite
- Submit pull request