-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: update build tool to poetry and use ruff for linting
- Loading branch information
Showing
12 changed files
with
572 additions
and
406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Commitlint | |
|
||
on: | ||
push: | ||
branches: ['main'] | ||
branches: ['main', 'poetry'] | ||
pull_request: | ||
|
||
jobs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,64 @@ | ||
# How to Contribute | ||
# Contributing Guide | ||
|
||
## Install Development Dependencies (Using Pipenv) | ||
Thank you for your interest in contributing to the **commitlint** project! | ||
Your contributions will help improve and enhance this tool. | ||
Please take a moment to review the following guidelines before getting started. | ||
|
||
All the dependencies are managed by Pipenv. Please install Pipenv on your system first by following the instructions at [https://pipenv.pypa.io/en/latest/installation.html](https://pipenv.pypa.io/en/latest/installation.html). | ||
## Prerequisites | ||
|
||
Once Pipenv is installed, you can install the development dependencies by running the following command: | ||
Before contributing, ensure that you have the following: | ||
|
||
```bash | ||
pipenv install --dev | ||
``` | ||
- **Python 3.10 or higher** installed. Download it from the [official Python website](https://www.python.org/downloads/). | ||
- **Poetry** installed for dependency management. Follow the [Poetry installation guide](https://python-poetry.org/docs/#installation). | ||
|
||
## Getting Started | ||
|
||
To set up the project on your local machine, follow these steps: | ||
|
||
1. **Fork** the repository on GitHub. | ||
2. **Clone** the forked repository to your local machine: | ||
|
||
```bash | ||
git clone https://github.com/<your-username>/commitlint.git | ||
cd commitlint | ||
``` | ||
|
||
3. **Install dependencies**: | ||
|
||
```bash | ||
poetry install | ||
``` | ||
|
||
## Install pre-commit hooks | ||
4. **Verify your setup**: | ||
|
||
To install pre-commit and commit-msg hook for this project, run the following command: | ||
```bash | ||
poetry run commitlint --version | ||
``` | ||
|
||
## Tests | ||
|
||
Run tests | ||
|
||
```bash | ||
pipenv run install-hooks | ||
poetry run pytest | ||
``` | ||
|
||
## Run tests | ||
|
||
Run the tests using the below command: | ||
Run tests with coverage | ||
|
||
```bash | ||
pipenv run test | ||
poetry run pytest --cov=src | ||
``` | ||
|
||
## Before submitting | ||
Generate html coverage | ||
|
||
Before submitting your Pull Request, please do the following steps: | ||
```bash | ||
poetry run pytest --cov=src/ --cov-report=html | ||
``` | ||
|
||
1. Add any changes you want. | ||
1. Add tests for the new changes. | ||
1. Edit documentation (`README.md`) if you have changed something significant. | ||
1. Commit your changes using [semantic commit message](https://seesparkbox.com/foundry/semantic_commit_messages). | ||
Examples: `"fix: Fixed foobar bug"`, `"feat(accounts): Added foobar feature on accounts"`. | ||
## Use pre-commit hook | ||
|
||
## Other help | ||
Install pre-commit hook using the command below. | ||
|
||
You can contribute by spreading a word about this library. | ||
It would also be a huge contribution to write a short article on how you are using this project. | ||
You can also share your best practices with us. | ||
```bash | ||
poetry run pre-commit install --hook-type pre-commit --hook-type commit-msg | ||
``` |
Oops, something went wrong.