Skip to content

Commit 9892f9a

Browse files
committed
docs: move contribution guidelines to doc
1 parent c766008 commit 9892f9a

File tree

2 files changed

+125
-67
lines changed

2 files changed

+125
-67
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1 @@
1-
# Contributing Guidelines
2-
3-
First off, thanks for considering to contribute to this project!
4-
5-
These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
6-
7-
## Git hooks
8-
9-
We use git hooks through [pre-commit](https://pre-commit.com/) to enforce and automatically check some "rules". Please install it before to push any commit.
10-
11-
See the relevant configuration file: `.pre-commit-config.yaml`.
12-
13-
## Code Style
14-
15-
Make sure your code *roughly* follows [PEP-8](https://www.python.org/dev/peps/pep-0008/) and keeps things consistent with the rest of the code:
16-
17-
- docstrings: [sphinx-style](https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html#the-sphinx-docstring-format) is used to write technical documentation.
18-
- formatting: [black](https://black.readthedocs.io/) is used to automatically format the code without debate.
19-
- sorted imports: [isort](https://pycqa.github.io/isort/) is used to sort imports
20-
- static analysis: [flake8](https://flake8.pycqa.org/en/latest/) is used to catch some dizziness and keep the source code healthy.
21-
22-
## Pulls requests
23-
24-
Pull requests are really welcome since you take the time to push or modify tests related to the code you edit or create.
25-
26-
----
27-
28-
## IDE
29-
30-
Feel free to use the IDE you love. Here come configurations for some popular IDEs to fit those guidelines.
31-
32-
### Visual Studio Code
33-
34-
```jsonc
35-
{
36-
// Editor
37-
"files.associations": {
38-
"./requirements/*.txt": "pip-requirements"
39-
},
40-
// Python
41-
"[python]": {
42-
"editor.codeActionsOnSave": {
43-
"source.organizeImports": true
44-
},
45-
"editor.defaultFormatter": "ms-python.black-formatter",
46-
"editor.formatOnSave": true,
47-
"editor.guides.bracketPairs": "active",
48-
"editor.rulers": [
49-
88
50-
],
51-
"editor.wordWrapColumn": 88,
52-
},
53-
"flake8.args": [
54-
"--config=setup.cfg",
55-
"--verbose"
56-
],
57-
"isort.args": [
58-
"--profile",
59-
"black"
60-
],
61-
"isort.check": true,
62-
// extensions
63-
"autoDocstring.guessTypes": true,
64-
"autoDocstring.docstringFormat": "google",
65-
"autoDocstring.generateDocstringOnEnter": false,
66-
}
67-
```
1+
Contributing guidelines are now published on [the online documentation](https://guts.github.io/mkdocs-rss-plugin/changelog/).

docs/contributing.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
icon: material/code-block-tags
3+
title: Contribution guide
4+
tags:
5+
- contribution
6+
- development
7+
---
8+
9+
First off, thanks for considering to contribute to this project!
10+
11+
These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
12+
13+
## Development
14+
15+
Clone the repository:
16+
17+
```sh
18+
# install development dependencies
19+
python -m pip install -U -r requirements/development.txt
20+
# alternatively: pip install -e .[dev]
21+
22+
# install project as editable
23+
python -m pip install -e .
24+
25+
# install git hooks
26+
pre-commit install
27+
```
28+
29+
Then follow the [contribution guidelines](#guidelines).
30+
31+
### Run the tests
32+
33+
```sh
34+
# install development dependencies
35+
python -m pip install -U -r requirements/testing.txt
36+
# alternatively: pip install -e .[test]
37+
38+
# run tests
39+
pytest
40+
```
41+
42+
### Build the documentation
43+
44+
```sh
45+
# install dependencies for documentation
46+
python -m pip install -U -r requirements/documentation.txt
47+
# alternatively: pip install -e .[doc]
48+
49+
# build the documentation
50+
mkdocs build
51+
```
52+
53+
### Release workflow
54+
55+
1. Fill the `CHANGELOG.md`
56+
1. Change the version number in `__about__.py`
57+
1. Apply a git tag with the relevant version: `git tag -a 0.3.0 {git commit hash} -m "New awesome feature"`
58+
1. Push tag to main branch: `git push origin 0.3.0`
59+
60+
----
61+
62+
## Guidelines
63+
64+
### Git hooks
65+
66+
We use git hooks through [pre-commit](https://pre-commit.com/) to enforce and automatically check some "rules". Please install it before to push any commit.
67+
68+
See the relevant configuration file: `.pre-commit-config.yaml`.
69+
70+
### Code Style
71+
72+
Make sure your code *roughly* follows [PEP-8](https://www.python.org/dev/peps/pep-0008/) and keeps things consistent with the rest of the code:
73+
74+
- docstrings: [sphinx-style](https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html#the-sphinx-docstring-format) is used to write technical documentation.
75+
- formatting: [black](https://black.readthedocs.io/) is used to automatically format the code without debate.
76+
- sorted imports: [isort](https://pycqa.github.io/isort/) is used to sort imports
77+
- static analysis: [flake8](https://flake8.pycqa.org/en/latest/) is used to catch some dizziness and keep the source code healthy.
78+
79+
### Pulls requests
80+
81+
Pull requests are really welcome since you take the time to push or modify tests related to the code you edit or create.
82+
83+
----
84+
85+
## IDE proposed settings
86+
87+
Feel free to use the IDE you love. Here come configurations for some popular IDEs to fit those guidelines.
88+
89+
### Visual Studio Code
90+
91+
```jsonc
92+
{
93+
// Editor
94+
"files.associations": {
95+
"./requirements/*.txt": "pip-requirements"
96+
},
97+
// Python
98+
"[python]": {
99+
"editor.codeActionsOnSave": {
100+
"source.organizeImports": true
101+
},
102+
"editor.defaultFormatter": "ms-python.black-formatter",
103+
"editor.formatOnSave": true,
104+
"editor.guides.bracketPairs": "active",
105+
"editor.rulers": [
106+
88
107+
],
108+
"editor.wordWrapColumn": 88,
109+
},
110+
"flake8.args": [
111+
"--config=setup.cfg",
112+
"--verbose"
113+
],
114+
"isort.args": [
115+
"--profile",
116+
"black"
117+
],
118+
"isort.check": true,
119+
// extensions
120+
"autoDocstring.guessTypes": true,
121+
"autoDocstring.docstringFormat": "google",
122+
"autoDocstring.generateDocstringOnEnter": false,
123+
}
124+
```

0 commit comments

Comments
 (0)