Skip to content

Commit 34b9baa

Browse files
committed
CONTRIBUTING.rst converted to CONTRIBUTING.md, rst lint hook removed
1 parent 606879e commit 34b9baa

File tree

4 files changed

+140
-153
lines changed

4 files changed

+140
-153
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020
- '.github/**'
2121
- CHANGELOG.md
2222
- README.md
23-
- CONTRIBUTING.rst
23+
- CONTRIBUTING.md
2424

2525
env:
2626
VERSION_FILE: setup.py

.pre-commit-config.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,20 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v3.4.0
5+
rev: v5.0.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- id: check-yaml
1010
- id: check-added-large-files
1111
- repo: https://github.com/PyCQA/pydocstyle
12-
rev: 6.0.0
12+
rev: 6.3.0
1313
hooks:
1414
- id: pydocstyle
1515
exclude: |
1616
(?x)^(
1717
tests/.*
1818
)
19-
- repo: https://github.com/Lucas-C/pre-commit-hooks-markup
20-
rev: v1.0.1
21-
hooks:
22-
- id: rst-linter
2319
- repo: https://github.com/pycqa/isort
2420
rev: 5.13.2
2521
hooks:
@@ -31,6 +27,6 @@ repos:
3127
- id: black
3228
args: ['reportportal_client', 'tests']
3329
- repo: https://github.com/pycqa/flake8
34-
rev: 5.0.4
30+
rev: 7.1.1
3531
hooks:
3632
- id: flake8

CONTRIBUTING.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Contribution
2+
3+
Contributions are highly welcomed and appreciated.
4+
5+
## Contents
6+
7+
- [Feature requests](#feature-requests)
8+
- [Bug reports](#bug-reports)
9+
- [Bug fixes](#bug-fixes)
10+
- [Implement features](#implement-features)
11+
- [Preparing Pull Requests](#preparing-pull-requests)
12+
13+
## Feature requests
14+
15+
We'd also like to hear about your thoughts and suggestions. Feel free to [submit them as issues](https://github.com/reportportal/client-Python/issues) and:
16+
17+
* Explain in detail how they should work.
18+
* Keep the scope as narrow as possible. It will make it easier to implement.
19+
20+
## Bug reports
21+
22+
Report bugs for the client in the [issue tracker](https://github.com/reportportal/client-Python/issues).
23+
24+
If you are reporting a new bug, please include:
25+
26+
* Your operating system name and version.
27+
* Python interpreter version, installed libraries, and reportportal-client version.
28+
* Detailed steps to reproduce the bug.
29+
30+
## Bug fixes
31+
32+
Look through the [GitHub issues for bugs](https://github.com/reportportal/client-Python/labels/bug).
33+
34+
If you are going to fix any of the existing bugs, assign that bug to yourself and specify preliminary milestones. Talk to [contributors](https://github.com/reportportal/client-Python/graphs/contributors) in case you need consultancy regarding implementation.
35+
36+
## Implement features
37+
38+
Look through the [GitHub issues for enhancements](https://github.com/reportportal/client-Python/labels/enhancement).
39+
40+
Talk to [contributors](https://github.com/reportportal/client-Python/graphs/contributors) in case you need consultancy regarding implementation.
41+
42+
## Preparing Pull Requests
43+
44+
What is a "pull request"? It informs the project's core developers about the changes you want to review and merge. Pull requests are stored on [GitHub servers](https://github.com/reportportal/client-Python/pulls). Once you send a pull request, we can discuss its potential modifications and even add more commits to it later on. There's an excellent tutorial on how Pull Requests work in the [GitHub Help Center](https://help.github.com/articles/using-pull-requests/).
45+
46+
Here is a simple overview below:
47+
48+
1. Fork the [reportportal-client GitHub repository](https://github.com/reportportal/client-Python).
49+
50+
2. Clone your fork locally using [git](https://git-scm.com/) and create a branch:
51+
52+
```sh
53+
$ git clone [email protected]:YOUR_GITHUB_USERNAME/client-Python.git
54+
$ cd client-Python
55+
# now, create your own branch off the "master":
56+
$ git checkout -b your-bugfix-branch-name
57+
```
58+
59+
If you need some help with Git, follow this quick start guide: [https://git.wiki.kernel.org/index.php/QuickStart](https://git.wiki.kernel.org/index.php/QuickStart)
60+
61+
3. Install [pre-commit](https://pre-commit.com) and its hook on the client-Python repo:
62+
63+
**Note: pre-commit must be installed as admin, as it will not function otherwise**:
64+
65+
```sh
66+
$ pip install --user pre-commit
67+
$ pre-commit install
68+
```
69+
70+
Afterwards `pre-commit` will run whenever you commit.
71+
72+
[https://pre-commit.com/](https://pre-commit.com/) is a framework for managing and maintaining multi-language pre-commit hooks to ensure code-style and code formatting is consistent.
73+
74+
4. Install tox
75+
76+
Tox is used to run all the tests and will automatically setup virtualenvs to run the tests in. (will implicitly use [http://www.virtualenv.org/en/latest/](http://www.virtualenv.org/en/latest/)):
77+
78+
```sh
79+
$ pip install tox
80+
```
81+
82+
5. Run all the tests
83+
84+
You need to have Python 3.10 available in your system. Now running tests is as simple as issuing this command:
85+
86+
```sh
87+
$ tox -e pep,py310
88+
```
89+
90+
This command will run tests via the "tox" tool against Python 3.10 and also perform code style checks.
91+
92+
6. You can now edit your local working copy and run the tests again as necessary. Please follow PEP-8 recommendations.
93+
94+
You can pass different options to `tox`. For example, to run tests on Python 3.10 and pass options to pytest (e.g. enter pdb on failure) to pytest you can do:
95+
96+
```sh
97+
$ tox -e py310 -- --pdb
98+
```
99+
100+
Or to only run tests in a particular test module on Python 3.10:
101+
102+
```sh
103+
$ tox -e py310 -- tests/test_service.py
104+
```
105+
106+
When committing, `pre-commit` will re-format the files if necessary.
107+
108+
7. If instead of using `tox` you prefer to run the tests directly, then we suggest to create a virtual environment and use an editable install with the `testing` extra:
109+
110+
```sh
111+
$ python3 -m venv .venv
112+
$ source .venv/bin/activate # Linux
113+
$ .venv/Scripts/activate.bat # Windows
114+
$ pip install -e ".[testing]"
115+
```
116+
117+
Afterwards, you can edit the files and run pytest normally:
118+
119+
```sh
120+
$ pytest tests/test_service.py
121+
```
122+
123+
8. Commit and push once your tests pass and you are happy with your change(s):
124+
125+
```sh
126+
$ git commit -m "<commit message>"
127+
$ git push -u
128+
```
129+
130+
9. Finally, submit a pull request through the GitHub website using this data:
131+
132+
head-fork: YOUR_GITHUB_USERNAME/client-Python
133+
compare: your-branch-name
134+
135+
base-fork: reportportal/client-Python
136+
base: master

CONTRIBUTING.rst

Lines changed: 0 additions & 145 deletions
This file was deleted.

0 commit comments

Comments
 (0)