diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..410df34 --- /dev/null +++ b/CONTRIBUTING.md @@ -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 +``` diff --git a/README.md b/README.md index 49430c8..08e6ce5 100644 --- a/README.md +++ b/README.md @@ -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', )) ``` @@ -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. @@ -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/ -```