Thank you for your interest in contributing to PropManager! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- License
- Getting Started
- Development Workflow
- Coding Standards
- Testing
- Pull Request Process
- Reporting Issues
We are committed to providing a welcoming and inclusive environment. Please be respectful and constructive in all interactions.
PropManager is licensed under AGPL-3.0. By contributing, you agree that your contributions will be licensed under the same terms.
Important: If you are interested in using PropManager under different licensing terms (e.g., for proprietary use), please contact us about dual-licensing options.
- Python 3.11+
- PostgreSQL 14+
- Redis (for Django-Q2 task queue)
- Node.js 18+ (optional, for frontend assets)
-
Clone the repository
git clone https://github.com/yourusername/propmanager.git cd propmanager -
Create a virtual environment
python -m venv venv source venv/bin/activate # Linux/Mac # or venv\Scripts\activate # Windows
-
Install dependencies
pip install -r requirements.txt
-
Configure environment
cp .env.example .env # Edit .env with your local settings -
Set up the database
python manage.py migrate python manage.py seed_dev_data # Optional: load test data -
Create a superuser
python manage.py createsuperuser
-
Run the development server
python manage.py runserver
For detailed setup instructions, see docs/development/getting-started.md.
Use descriptive branch names with prefixes:
feature/- New features (e.g.,feature/tenant-rewards)fix/- Bug fixes (e.g.,fix/invoice-calculation)docs/- Documentation updates (e.g.,docs/api-reference)refactor/- Code refactoring (e.g.,refactor/payment-gateway)test/- Test additions or fixes (e.g.,test/billing-edge-cases)
Write clear, concise commit messages:
<type>: <short description>
<optional longer description>
<optional footer>
Types:
feat- New featurefix- Bug fixdocs- Documentationstyle- Formatting (no code change)refactor- Code restructuringtest- Adding testschore- Maintenance tasks
Examples:
feat: Add automated late fee calculation
Implements PropertyBillingConfig-based late fee calculation
that runs daily via Django-Q2 task.
Closes #123
fix: Correct invoice due date for month-to-month leases
-
Create a feature branch from
mastergit checkout -b feature/your-feature
-
Make your changes with clear, focused commits
-
Write or update tests as needed
-
Ensure all tests pass
python manage.py test -
Run code quality checks
black . isort . flake8
-
Push your branch and create a pull request
- Follow PEP 8 guidelines
- Use Black for code formatting (line length: 88)
- Use isort for import sorting
- Maximum line length: 88 characters
- Models: Define in
models.pywith clear docstrings - Views: Use class-based views where appropriate
- URLs: Keep URL patterns clean and RESTful
- Templates: Use template inheritance, avoid duplication
- Forms: Validate thoroughly, provide clear error messages
- Use
TimeStampedModelfor audit fields (created_at,updated_at) - Use
AuditMixinfor user tracking (created_by,updated_by) - Prefer model managers for complex queries
- Use signals sparingly; prefer explicit method calls
- Keep views thin; put business logic in models or services
- Never commit secrets or credentials
- Use environment variables for configuration
- Validate all user input
- Use Django's built-in CSRF protection
- Follow OWASP security guidelines
# Run all tests
python manage.py test
# Run specific app tests
python manage.py test apps.billing
# Run with coverage
coverage run --source='.' manage.py test
coverage report- Place tests in
tests/directory within each app - Use descriptive test method names
- Test edge cases and error conditions
- Mock external services (payment gateways, APIs)
Example:
class InvoiceModelTest(TestCase):
def test_calculate_total_with_late_fee(self):
"""Invoice total should include late fee when past due date."""
invoice = InvoiceFactory(
amount=Decimal("1000.00"),
due_date=date.today() - timedelta(days=5)
)
invoice.apply_late_fee()
self.assertEqual(invoice.total, Decimal("1050.00"))- Ensure your code follows the coding standards
- Write or update tests for your changes
- Update documentation if needed
- Run the full test suite
- Rebase on latest
masterif needed
- Clear title describing the change
- Description explaining what and why
- Reference related issues
- All tests passing
- Code review approval
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation
- [ ] Refactoring
## Testing
How was this tested?
## Related Issues
Closes #XXX
## Checklist
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] Code follows style guidelines- Submit PR against
masterbranch - Request review from maintainers
- Address feedback and update as needed
- Squash commits if requested
- Maintainer merges when approved
Include:
- Clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Python version, etc.)
- Screenshots if applicable
Include:
- Clear description of the feature
- Use case / problem it solves
- Proposed implementation (optional)
- Willingness to contribute
Do not report security vulnerabilities publicly.
See SECURITY.md for responsible disclosure instructions.
- Open a GitHub Discussion for general questions
- Check existing issues before creating new ones
- Review documentation in the
docs/directory
Thank you for contributing to PropManager!