Thank you for your interest in contributing to CloudProxy! This document outlines the branch workflow and guidelines for contributing to this project.
We use a specific branch workflow to ensure code quality and stability:
- Feature Branches: All development work must be done on feature branches.
- Dev Branch: Feature branches are merged into the
devbranch via Pull Requests. - Main Branch: The
devbranch is merged intomainfor releases.
feature-branch → dev → main
Always create a new branch from the latest dev branch:
# Make sure you have the latest dev branch
git checkout dev
git pull origin dev
# Create and checkout a new feature branch
git checkout -b feature/your-feature-nameDevelop and test your changes on your feature branch:
# Make changes to files
# ...
# Run tests to ensure your changes don't break anything
pytest
# Commit your changes
git add .
git commit -m "Description of your changes"
# Push your branch to GitHub
git push origin feature/your-feature-nameWhen your feature is complete:
- Go to the GitHub repository
- Click "Pull requests" and then "New pull request"
- Set the base branch to
devand the compare branch to your feature branch - Click "Create pull request"
- Add a descriptive title and description
- Submit the PR
- Your PR will trigger automated tests
- All tests must pass before the PR can be merged
- Other developers can review your code and suggest changes
- Once approved and tests pass, your PR will be merged into the
devbranch
When the dev branch is ready for release:
- Create a PR from
devtomain - This PR will be reviewed for release readiness
- After approval and merge, the code will be automatically:
- Tagged with a new version
- Built and released as a Docker image
- Published as a GitHub release
This workflow is enforced by GitHub actions that:
- Prevent direct pushes to
mainanddevbranches - Run tests on all PRs and pushes to
developandmainbranches using thepython-app-testing.ymlworkflow - Automatically create releases and build Docker images when changes are merged to
mainusing themain.ymlworkflow
Please follow these guidelines for testing:
- Write tests for any new features or bug fixes
- Run the test suite locally before submitting PRs:
pytest - All tests MUST pass before a PR can be merged - this is enforced by branch protection rules
- For complex changes, consider adding new test cases to cover your changes
To run tests locally:
# Install test dependencies
pip install pytest pytest-mock pytest-cov
# Run all tests
pytest
# Run tests with coverage report
pytest --cov=./ --cov-report=termThank you for following these guidelines and helping make CloudProxy better!