Skip to content

Commit 7f0fbd7

Browse files
Added contributing.md and test to run on PR
1 parent b60c92e commit 7f0fbd7

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

.github/workflows/pr-test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: PR test
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
python-version: [3.8, 3.9]
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install pytest
25+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
26+
- name: Test with pytest
27+
run: |
28+
pytest -v

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# How to contribute
2+
3+
We'd love to accept your patches and contributions to this project. There are
4+
just a few small guidelines you need to follow.
5+
6+
First, read these guidelines.
7+
8+
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
9+
10+
Before you begin making changes, state your intent to do so in an Issue.
11+
Then, fork the project and create a new branch. Make changes in your copy of the repository.
12+
Then open a pull request once your changes are ready.
13+
14+
## Code style
15+
16+
The project follows a convention of:
17+
18+
- Maximum line length: 120 characters
19+
- Use reorder-python-imports
20+
- Use autopep8, flake8
21+
- Strict PEP8 conventions.
22+
- Completely type hinted and verified using mypy
23+
- No type comments
24+
- Three double quotes around docstrings.
25+
26+
All theses can be done using pre-commit. To use pre-commit on this project run the following commands after forking the repo.
27+
28+
```commandline
29+
pip install -r requirements-dev.txt
30+
```
31+
32+
```commandline
33+
pre-commit install
34+
```
35+
36+
This will enforce all the code styling before you commit.
37+
38+
## Testing
39+
40+
When a new addition is made to the source code, test should be written to prove that you changes work and does not break the existing code

0 commit comments

Comments
 (0)