3.5 KiB
Contributing to Stegasoo
Thank you for your interest in contributing to Stegasoo! This document provides guidelines and information for contributors.
Getting Started
Prerequisites
- Python 3.10 - 3.12
- Git
- Docker (optional, for container testing)
Development Setup
-
Clone the repository
git clone https://github.com/adlee-was-taken/stegasoo.git cd stegasoo -
Create a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install development dependencies
pip install -e ".[dev]" -
Install pre-commit hooks
pre-commit install
Development Workflow
Code Style
We use the following tools to maintain code quality:
- Black - Code formatting (line length: 100)
- Ruff - Linting
- MyPy - Type checking
Run all checks before committing:
black src/ tests/ frontends/
ruff check src/ tests/ frontends/
mypy src/
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=stegasoo --cov-report=term-missing
# Run specific test file
pytest tests/test_stegasoo.py
Type Hints
All new code should include type hints:
def encode_message(
message: str,
carrier_image: bytes,
passphrase: str,
pin: str = "",
) -> EncodeResult:
...
Making Changes
Branch Naming
feature/description- New featuresfix/description- Bug fixesdocs/description- Documentation updatesrefactor/description- Code refactoring
Commit Messages
Write clear, concise commit messages:
Add channel key validation for private messaging
- Implement validate_channel_key() function
- Add tests for valid/invalid key formats
- Update CLI to support --channel-key flag
Pull Request Process
- Create a feature branch from
main - Make your changes with appropriate tests
- Ensure all checks pass (tests, linting, formatting)
- Submit a PR with a clear description
- Address review feedback promptly
PR Checklist
- Tests added/updated for changes
- Documentation updated if needed
- CHANGELOG.md updated for user-facing changes
- All CI checks passing
- No merge conflicts with
main
Project Structure
stegasoo/
├── src/stegasoo/ # Core library
│ ├── crypto.py # Encryption/decryption
│ ├── steganography.py # LSB embedding
│ ├── dct_steganography.py # DCT embedding
│ └── ...
├── frontends/
│ ├── cli/ # Command-line interface
│ ├── web/ # Flask web UI
│ └── api/ # FastAPI REST API
├── tests/ # Test suite
└── examples/ # Usage examples
Reporting Issues
Bug Reports
Please include:
- Python version and OS
- Stegasoo version (
stegasoo --version) - Minimal reproduction steps
- Expected vs actual behavior
- Error messages/tracebacks
Feature Requests
Please include:
- Use case description
- Proposed solution (if any)
- Alternatives considered
Security
If you discover a security vulnerability, please see SECURITY.md for responsible disclosure guidelines. Do not open a public issue for security vulnerabilities.
License
By contributing, you agree that your contributions will be licensed under the MIT License.
Questions?
Feel free to open a discussion or issue if you have questions about contributing.
Thank you for helping make Stegasoo better!