Skip to content

Commit 52ede18

Browse files
add contributing section to documentation
1 parent 512ee8a commit 52ede18

File tree

6 files changed

+372
-3
lines changed

6 files changed

+372
-3
lines changed

CONTRIBUTING.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# How to contribute to pylambdarest
2+
3+
Thank you for considering contributing to pylambdarest!
4+
5+
## First time setup
6+
7+
- Make sure you have a [GitHub account](https://github.com/join).
8+
9+
- Fork pylambdarest to your GitHub account by clicking the [Fork](https://github.com/MarwanDebbiche/pylambdarest/fork) button.
10+
11+
- Install [poetry](https://python-poetry.org/).
12+
13+
- Install dependecies using poetry:
14+
15+
```shell
16+
poetry install
17+
```
18+
19+
- Install the pre-commit hooks:
20+
21+
```shell
22+
poetry run pre-commit install --install-hooks
23+
```
24+
25+
- Run the tests to make sure you are all set:
26+
27+
```shell
28+
poetry run coverage run -m --source=pylambdarest pytest tests && poetry run coverage report -m
29+
```
30+
31+
## Building the docs
32+
33+
Build the docs in the docs directory using Sphinx:
34+
35+
```shell
36+
cd docs
37+
poetry run make html
38+
```
39+
40+
Open `build/html/index.html` in your browser to view the docs.
41+
42+
Read more about [Sphinx](https://www.sphinx-doc.org/en/master/).
43+
44+
## Submitting patches
45+
46+
Include the following in your patch:
47+
48+
- Use Black to format your code. This and other tools will run automatically if you install pre-commit using the instructions above.
49+
- Include tests if your patch adds or changes code. Make sure the test fails without your patch.
50+
- Update the documentation accordingly if needed.

docs/source/conf.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import os
1414
import sys
1515

16-
1716
PROJECT_ROOT_DIR = os.path.dirname(os.path.dirname((os.path.abspath("."))))
1817
sys.path.insert(0, PROJECT_ROOT_DIR)
1918

@@ -31,7 +30,7 @@
3130
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3231
# ones.
3332
extensions = [
34-
"m2r2",
33+
"m2r",
3534
"sphinx.ext.autodoc",
3635
"sphinx.ext.napoleon",
3736
"sphinx_rtd_theme",

docs/source/contributing.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. mdinclude:: ../../CONTRIBUTING.md

docs/source/index.rst

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
:hidden:
44

55
api_reference
6+
contributing
7+
68

79
.. mdinclude:: ../../README.md
810

0 commit comments

Comments
 (0)