Thank you for your interest in contributing to Scalpel! This document outlines the process and guidelines for contributing to the project. By following these guidelines, you can help ensure a smooth collaboration process and a consistent codebase.
- Setting Up Your Development Environment
- Building the Project
- Testing
- Commit and Branch Format
- Submitting Changes
- Feedback and Reviews
- Conclusion
-
Fork the Repository: Start by forking the Scalpel repository to your own GitHub account.
-
Clone Your Fork: Once done, clone your repository to your local machine:
git clone https://github.com/YOUR_USERNAME/scalpel.git
-
Set Up the Upstream Remote: Add the original Scalpel repository as an "upstream" remote:
git remote add upstream https://github.com/ORIGINAL_OWNER/scalpel.git
- Navigate to the project root directory.
- Build the project:
./gradlew build
- Upon successful build, the generated JAR file can be found in
./scalpel/build/libs/scalpel-*.jar
.
- Navigate to the docs directory:
cd docs/
- Create a virtual environment and install the requirements from
requirements.txt
:python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt
- Launch the build:
./build.py
- The documentation HTML pages will be generated in
public/
Before submitting any changes, ensure that all tests pass. Run them as follows:
./run_tests.sh
Commit messages should be clear and descriptive. They should follow the format:
<type>(<scope>): <short description>
- type: Describes the nature of the change (e.g.,
fix
,feature
,docs
,refactor
). - scope: The part of the codebase the change affects (e.g.,
editor
,venv
,framework
). - short description: A brief description of the change.
Example:
fix(editor): Resolve null reference issue
Branch names should be descriptive and follow the format:
<type>/<short-description>
- type: Describes the nature of the branch (e.g.,
feature
,fix
,docs
,refactor
). - short description: A brief description of the branch's purpose, using kebab-case.
Example:
feature/hex-editor
-
Create a New Branch: Based on the
main
branch, create a new branch following the branch naming convention mentioned above. -
Make Your Changes: Implement your changes, ensuring code quality and consistency.
-
Commit Your Changes: Commit your changes following the commit message format.
-
Pull from Upstream: Before pushing your changes, pull the latest changes from the
upstream
main branch:git pull upstream main
-
Push to Your Fork: Push your branch to your forked repository.
-
Open a Pull Request: Go to the original Scalpel repository and open a pull request from your branch. Ensure that your PR is descriptive, mentioning the changes made and their purpose.
Once your pull request is submitted, maintainers or contributors might provide feedback. Address any comments, make necessary changes, and push those updates to your branch.
Your contributions are valuable in making Scalpel a robust and efficient tool. By adhering to these guidelines, you ensure a smooth and efficient collaboration process. Thank you for your contribution!