Skip to content

Commit 14751a0

Browse files
committed
add a beginner friendly contributing guide
1 parent f95905b commit 14751a0

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Contributing Guide
2+
3+
Its great to see your here!
4+
5+
- You need to first fork and clone the project to start working on it.
6+
Always work on a new branch, and open a PR to the `main` branch.
7+
Keep the `main` branch of your fork in sync with the origin.
8+
If you are a GitHub beginner, and wondering how to do the above stuff,
9+
then please read [GitHub's documentation](https://docs.github.com/en/get-started/quickstart/fork-a-repo).
10+
11+
- This project uses `poetry` for package management.
12+
It is very simple and intuitive to use.
13+
This guide will show you how to setup your project environment.
14+
If you dont have poetry [install it](https://python-poetry.org/docs/#installation).
15+
16+
- Move into your cloned project directory and run the following commands.
17+
18+
```shell
19+
poetry config virtualenvs.in-project true
20+
poetry install
21+
```
22+
23+
- The virtual environment will be created in a `.venv` folder
24+
inside your project directory.
25+
In your code editor set the python interpretor path to `./.venv/bin/python`
26+
27+
- Activate `poetry` shell.
28+
29+
```shell
30+
poetry shell
31+
```
32+
33+
- Setup pre-commit hooks.
34+
35+
```shell
36+
pre-commit install
37+
```
38+
39+
- Common commands that you will be running.
40+
41+
```shell
42+
make fmt # format your code, and sort your imports
43+
make clean # delete python cache and other such stuff
44+
pre-commit run -a # run pre-commit hooks for all files
45+
pre-commit run # run pre-commit hooks only for staged changes
46+
poetry show --tree # see the dependency graph for the project
47+
pytest # run tests and see the code coverage
48+
# after running pytest open htmlcov/index.html to see coverage report
49+
```
50+
51+
To work on this project you must have some knowledge of Selenium.
52+
An idea about different tools such as pre-commit, tox, black etc will be helpful.
53+
To know more about something, just google search and go through the official docs.

0 commit comments

Comments
 (0)