Skip to content

Commit 7517308

Browse files
committed
chore: wip upgrade to poetry
1 parent 02e7ff4 commit 7517308

File tree

5 files changed

+527
-34
lines changed

5 files changed

+527
-34
lines changed

.github/workflows/ci.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Github CI
22

33
on:
44
push:
5-
branches: ['main']
5+
branches: ['main', 'poetry']
66
pull_request:
77

88
jobs:
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
python-version: ['3.8']
14+
python-version: ['3.10']
1515

1616
steps:
1717
- uses: actions/checkout@v4
@@ -24,15 +24,15 @@ jobs:
2424
- name: Install Pipenv
2525
run: |
2626
python -m pip install --upgrade pip
27-
python -m pip install pipenv
27+
python -m pip install poetry
2828
2929
- name: Install dependencies
3030
run: |
31-
pipenv install --dev
31+
poetry install
3232
3333
- name: Run tests with coverage
3434
run: |
35-
pipenv run coverage-xml
35+
poetry run pytest --cov=src/ --cov-report=xml --no-cov-on-fail
3636
3737
- name: Send coverage to CodeCov
3838
uses: codecov/codecov-action@v3
@@ -49,7 +49,7 @@ jobs:
4949
- name: Set up Python
5050
uses: actions/setup-python@v5
5151
with:
52-
python-version: '3.8'
52+
python-version: '3.10'
5353

5454
- name: Install lint dependencies
5555
run: pip install flake8 mypy isort

CONTRIBUTING.md

+46-25
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,64 @@
1-
# How to Contribute
1+
# Contributing Guide
22

3-
## Install Development Dependencies (Using Pipenv)
3+
Thank you for your interest in contributing to the **commitlint** project!
4+
Your contributions will help improve and enhance this tool.
5+
Please take a moment to review the following guidelines before getting started.
46

5-
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).
7+
## Prerequisites
68

7-
Once Pipenv is installed, you can install the development dependencies by running the following command:
9+
Before contributing, ensure that you have the following:
810

9-
```bash
10-
pipenv install --dev
11-
```
11+
- **Python 3.10 or higher** installed. Download it from the [official Python website](https://www.python.org/downloads/).
12+
- **Poetry** installed for dependency management. Follow the [Poetry installation guide](https://python-poetry.org/docs/#installation).
13+
14+
## Getting Started
15+
16+
To set up the project on your local machine, follow these steps:
17+
18+
1. **Fork** the repository on GitHub.
19+
2. **Clone** the forked repository to your local machine:
20+
21+
```bash
22+
git clone https://github.com/<your-username>/commitlint.git
23+
cd commitlint
24+
```
25+
26+
3. **Install dependencies**:
27+
28+
```bash
29+
poetry install
30+
```
1231

13-
## Install pre-commit hooks
32+
4. **Verify your setup**:
1433

15-
To install pre-commit and commit-msg hook for this project, run the following command:
34+
```bash
35+
poetry run commitlint --version
36+
```
37+
38+
## Tests
39+
40+
Run tests
1641

1742
```bash
18-
pipenv run install-hooks
43+
poetry run pytest
1944
```
2045

21-
## Run tests
22-
23-
Run the tests using the below command:
46+
Run tests with coverage
2447

2548
```bash
26-
pipenv run test
49+
poetry run pytest --cov=src
2750
```
2851

29-
## Before submitting
52+
Generate html coverage
3053

31-
Before submitting your Pull Request, please do the following steps:
54+
```bash
55+
poetry run pytest --cov=src/ --cov-report=html
56+
```
3257

33-
1. Add any changes you want.
34-
1. Add tests for the new changes.
35-
1. Edit documentation (`README.md`) if you have changed something significant.
36-
1. Commit your changes using [semantic commit message](https://seesparkbox.com/foundry/semantic_commit_messages).
37-
Examples: `"fix: Fixed foobar bug"`, `"feat(accounts): Added foobar feature on accounts"`.
58+
## Use pre-commit hook
3859

39-
## Other help
60+
Install pre-commit hook using the command below.
4061

41-
You can contribute by spreading a word about this library.
42-
It would also be a huge contribution to write a short article on how you are using this project.
43-
You can also share your best practices with us.
62+
```bash
63+
poetry run pre-commit install --hook-type pre-commit --hook-type commit-msg
64+
```

action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ runs:
3333
- name: Install Python
3434
uses: actions/[email protected]
3535
with:
36-
python-version: '3.8'
36+
python-version: '3.10'
3737

3838
- name: Commitlint Action
3939
id: commitlint

0 commit comments

Comments
 (0)