Contributing
This document outlines the guidelines and best practices for contributing to the `qodo-cover` repository.
Loading actions...
Skill content
Main instructions and any bundled files for this skill.
Contributing
This document outlines the guidelines and best practices for contributing to the qodo-cover repository.
Thanks for taking the time to contribute!
When contributing to this repository, please first discuss the change you wish to make via an issue, email, or any other communication method with the repository maintainers before proceeding. Some issues may already be in progress, so make sure the issue you want to work on is not already assigned or being handled.
If you're new, we encourage you to take a look at issues tagged with "good first issue".
Table of Contents
- Start With the Repository
- Start With an Issue
- Pull Request
- Versioning
- Running Tests
- Running the App Locally From Source
Start With the Repository
-
Create a personal fork of the
qodo-coverproject using the GitHub UI. -
Execute these steps with the forked code:
# Clone your fork to your local file system
git clone [email protected]:<your_github_login>/qodo-cover.git
# Add the original `qodo-cover` repository as the upstream remote
git remote add upstream [email protected]:qodo-ai/qodo-cover.git
# Check out the `main` branch
git checkout main
# Fetch the latest changes from upstream
git fetch upstream
# Reset your local `main` branch to match the upstream `main`
git reset --hard upstream/main
Start With an Issue
- Create a new branch based on the
mainbranch. Use the GitHub issue number and a short name in the branch name:
git checkout -b feature/XXX-github-issue-name
- Stage your changes for commit using one of these commands:
# Stage all modified and new files
git add .
# Stage specific files
git add path/to/file1 path/to/file2
# Interactive staging
git add -p
- Commit your changes with a clear and concise message explaining what was done:
git commit -m "Brief explanation of what was done"
- Push the branch to your fork:
git push origin feature/XXX-github-issue-name
- If another branch was recently merged into
mainand you need those changes, fetch the latest code and rebase your branch:
git fetch upstream
git rebase upstream/main
- If there are merge conflicts, resolve them, stage the changes, and continue the rebase:
git add <conflicted_files>
git rebase --continue
- Create a pull request in the GitHub UI. The title should include the feature number and a brief description — for example:
"Feature-331: Add CONTRIBUTING.md file to the project". Then, request a review from the appropriate reviewers.
Pull Request
For a better code review experience, provide a full description of what was done, including technical details and any relevant context. Pull requests should be merged as a single commit. Use the “Squash and merge” option in the GitHub UI to do this.
Versioning
Before merging to main make sure to manually increment the version number in cover_agent/version.txt at the root of the repository.
Running Tests
Set up your development environment by running the poetry install command as you did above.
Note: for older versions of Poetry you may need to include the --dev option to install Dev dependencies.
After setting up your environment run the following command:
poetry run pytest --junitxml=testLog.xml --cov=templated_tests --cov=cover_agent --cov-report=xml --cov-report=term --log-cli-level=INFO
This will also generate all logs and output reports that are generated in .github/workflows/ci_pipeline.yml.
Running the App Locally From Source
Prerequisites
- Python 3.x
- Poetry
Steps
- If not already done, install the dependencies
poetry install
- Let Poetry manage / create the environment
poetry shell
- Run the app
poetry run cover-agent \
--source-file-path <path_to_source_file> \
[other_options...]
Notice that you're prepending poetry run to your cover-agent command. Replace <path_to_your_source_file> with the
actual path to your source file. Add any other necessary options as described in
the Running the Code section.
Building the binary locally
You can build the binary locally simply by invoking the make installer command. This will run PyInstaller locally on your machine. Ensure that you have set up the poetry project first (i.e. running poetry install).
Related Skills
Frontend Typescript Linting.mdc
TypeScript and ESLint rules that MUST be followed when creating, modifying, or reviewing any file under apps/frontend/, including .ts, .tsx, .js, and .jsx files. Also apply when discussing frontend li...
2. Apply Deepthink Protocol (reason about dependencies
risks