Skip to content

Commit a7edf46

Browse files
authored
docs: 📝 code quality duplication removal and improvement in current (roboflow#318)
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
1 parent cd6a7fd commit a7edf46

1 file changed

Lines changed: 18 additions & 14 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ We welcome contributions to:
1414
4. Submit a request for a new feature.
1515
5. Improve our test coverage.
1616

17-
### Contributing Features
17+
### Contributing Features ✨
1818

1919
Supervision is designed to provide generic utilities to solve problems. Thus, we focus on contributions that can have an impact on a wide range of projects.
2020

@@ -48,8 +48,14 @@ git commit -m "Your commit message"
4848
git push -u origin main
4949
```
5050

51+
## 🎨 Code quality
52+
53+
### Pre-commit tool
54+
5155
This project utilizes the [pre-commit](https://pre-commit.com/) tool to maintain code quality and consistency. Before submitting a pull request or making any commits, it is important to run the pre-commit tool to ensure that your changes meet the project's guidelines.
5256

57+
Furthermore, we have integrated a pre-commit GitHub Action into our workflow. This means that with every pull request opened, the pre-commit checks will be automatically enforced, streamlining the code review process and ensuring that all contributions adhere to our quality standards.
58+
5359
To run the pre-commit tool, follow these steps:
5460

5561
1. Install pre-commit by running the following command: `poetry install`. It will not only install pre-commit but also install all the deps and dev-deps of project
@@ -60,6 +66,17 @@ To run the pre-commit tool, follow these steps:
6066

6167
4. You can also install pre-commit as a git hook by execute `pre-commit install`. Every time you made `git commit` pre-commit run automatically for you.
6268

69+
### Docstrings
70+
71+
All new functions and classes in `supervision` should include docstrings. This is a prerequisite for any new functions and classes to be added to the library.
72+
73+
`supervision` adheres to the [Google Python docstring style](https://google.github.io/styleguide/pyguide.html#383-functions-and-methods). Please refer to the style guide while writing docstrings for your contribution.
74+
75+
### Type checking
76+
77+
So far, **there is no type checking with mypy**. See [issue](https://github.com/roboflow-ai/template-python/issues/4).
78+
79+
6380
Then, go back to your fork of the `supervision` repository, click "Pull Requests", and click "New Pull Request".
6481

6582
![Opening a pull request](https://media.roboflow.com/open_pr.png)
@@ -96,19 +113,6 @@ To run the documentation, install the project requirements with `poetry install
96113

97114
You can learn more about mkdocs on the [mkdocs website](https://www.mkdocs.org/).
98115

99-
## 🧹 code quality
100-
101-
We provide two handy commands inside the `Makefile`, namely:
102-
103-
- `make style` to format the code
104-
- `make check_code_quality` to check code quality (PEP8 basically)
105-
106-
So far, **there is no type checking with mypy**. See [issue](https://github.com/roboflow-ai/template-python/issues/4).
107-
108-
All new functions and classes in `supervision` should include docstrings. This is a prerequisite for any new functions and classes to be added to the library.
109-
110-
`supervision` adheres to the [Google Python docstring style](https://google.github.io/styleguide/pyguide.html#383-functions-and-methods). Please refer to the style guide while writing docstrings for your contribution.
111-
112116
## 🧪 tests
113117

114118
[`pytests`](https://docs.pytest.org/en/7.1.x/) is used to run our tests.

0 commit comments

Comments
 (0)