Skip to content

Commit

Permalink
Add CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Majsvaffla committed Apr 16, 2024
1 parent 0938ecd commit aa4d46c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
27 changes: 27 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# PyBankID

Pull requests are welcome! They should target the [develop](https://github.com/hbldh/pybankid/tree/develop) branch.

## Development

Dependencies needed for development can be installed through pip:

```bash
pip install -r requirements-dev.txt
```

## Testing

The PyBankID solution can be tested with [pytest](https://pytest.org/):

```bash
pytest
```

## Type checking

PyBankID is annotated with types and [mypy](https://www.mypy-lang.org/) is used as type-checker. All contributions should include type annotations.

```bash
mypy
```
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ PyBankID provides both a synchronous and an asynchronous client for communicatio
```python
from bankid import BankIDClient
client = BankIDClient(certificates=(
'path/to/certificate.pem',
'path/to/key.pem',
'path/to/certificate.pem',
'path/to/key.pem',
))
```

Expand Down Expand Up @@ -125,12 +125,12 @@ client.collect(order_ref="a9b791c3-459f-492b-bf61-23027876140b")
}
```

Please note that the `collect` method should be used sparingly: in the [BankID Integration Guide](https://www.bankid.com/en/utvecklare/guider/teknisk-integrationsguide) it is specified that *"collect should be called every two seconds and must not be called more frequent than once per second"*.
Please note that the `collect` method should be used sparingly: in the [BankID Integration Guide](https://www.bankid.com/en/utvecklare/guider/teknisk-integrationsguide) it is specified that _"collect should be called every two seconds and must not be called more frequent than once per second"_.

PyBankID also implements the `phone/auth` and `phone/sign` methods, for performing authentication and signing with
users that are contacted through phone. For documentation on this, see [PyBankID's Read the Docs page](https://pybankid.readthedocs.io/en/latest/).

### Asynchronous client
### Asynchronous client

The asynchronous client is used in the same way as the synchronous client, with the difference that all request are performed asynchronously.

Expand Down Expand Up @@ -182,11 +182,3 @@ print(cert_and_key)
client = bankid.BankIDClient(
certificates=cert_and_key, test_server=True)
```

## Testing

The PyBankID solution can be tested with [pytest](https://pytest.org/):

```bash
pytest tests/
```

0 comments on commit aa4d46c

Please sign in to comment.