Welcome to PAINT
🌞! We're thrilled that you're interested in contributing to our open-source project 🔥.
By participating, you can help improve the project and make it even better 🙌.
-
Fork the Repository: Click the "Fork" button at the top right corner of this repository's page to create your own copy.
-
Clone Your Fork: Clone your forked repository to your local machine using Git :
git clone https://github.com/ARTIST-Association/PAINT.git
-
Install the Package with Development Options in a separate virtual environment from the main branch of your repo. The commands shown below work on Unix-based systems:
python3 -m venv <insert/path/to/your/venv> source <insert/path/to/your/venv/bin/activate> pip install --upgrade pip pip install -e ."[dev]"
-
Install Pre-Commit Hooks: This will put a number of pre-commit hooks for code linting and formatting with Ruff as well as type checking with MyPy into place, ensuring PEP-8 conformity and overall good code quality consistently. Run the following command in the root of the project to set up the git hook scripts:
pre-commit install
Now
pre-commit
will run automatically ongit commit
! -
Create a Branch: Create a new branch for your contribution. Choose a descriptive name. Depending on what you want to work on, prepend either of the following prefixes,
features
,maintenance
,bugfix
, orhotfix
. Example:git checkout -b features/your-feature-name
-
Make Changes: Make your desired changes to the codebase. Please stick to the following guidelines:
PAINT
uses Black-compatible code style and so should you if you would like to contribute.- Please use type hints in all function definitions.
- Please use American English for all comments and docstrings in the code.
-
Commit Changes: Commit your changes with a clear and concise commit message that describes what you have changed. Example:
git commit -m "DESCRIPTION OF YOUR CHANGES"
-
Push Changes: Push your changes to your fork on GitHub:
git push origin features/your-feature-name
-
Rebase Onto Current Main: Rebase your feature branch onto the current main branch of the original repo. This will include any changes that might have been pushed into the main in the meantime and resolve possible conflicts. To sync your fork with the original upstream repo, check out this page or follow the steps below. Note that before you can sync your fork with an upstream repo, you must configure a remote that points to the upstream repository in Git.
cd <path/to/your/local/project/fork> git fetch upstream git checkout main git merge upstream/main git rebase main features/your-feature-name
Alternatively, you can also merge the main branch into your feature branch.
-
Open a Pull Request: Go to the original repository and click the "New Pull Request" button. Follow the guidelines in the template to submit your pull request.
Please note that we have a Code of Conduct, and we expect all contributors to follow it. Be kind and respectful to one another 💙.
If you have questions or encounter any issues, please create an issue in the Issues section of this repository.
Thank you for your contribution 🙏!