Skip to content

Commit 06f5278

Browse files
authored
Merge pull request #138 from getyoti/release-2.10.0
Release 2.10.0
2 parents 8a3147e + e2899c9 commit 06f5278

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1009
-93
lines changed

.dependabot/config.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 1
2+
update_configs:
3+
- package_manager: "python"
4+
directory: "/"
5+
update_schedule: "live"
6+
target_branch: "development"
7+
8+
default_reviewers:
9+
- "echarrod"
10+
- "davidgrayston"
11+
- "emmas-yoti"
12+
- "MrBurtyyy"

.pre-commit-config.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
- repo: https://github.com/ambv/black
2-
rev: stable
3-
hooks:
4-
- id: black
5-
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v1.2.3
7-
hooks:
8-
- id: flake8
9-
args:
10-
- --ignore=E501,W5
1+
exclude: protobuf/
2+
repos:
3+
- repo: https://github.com/ambv/black
4+
rev: stable
5+
hooks:
6+
- id: black
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v1.2.3
9+
hooks:
10+
- id: flake8
11+
args:
12+
- --ignore=E501,W5

.pylintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[MASTER]
2-
ignore=yoti_python_sdk/tests/**,examples/**
2+
ignore=tests,protobuf
3+
disable=C0330

.travis.yml

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,50 @@ dist: xenial
55
# Only clone the most recent commit.
66
git:
77
depth: 1
8-
9-
python:
10-
- "2.7"
11-
- "3.4"
12-
- "3.5"
13-
- "3.5-dev"
14-
- "3.6"
15-
- "3.6-dev"
16-
- "3.7"
17-
- "3.7-dev"
18-
- "3.8-dev"
19-
20-
cache: pip
218

22-
before_install:
23-
- pip install -U setuptools
24-
25-
install:
26-
- pip install -r requirements.txt
27-
- python setup.py develop
28-
29-
script:
30-
- py.test -v
9+
jobs:
10+
include:
11+
- &test
12+
stage: Test
13+
python: "2.7"
14+
cache: pip
15+
before_install:
16+
- pip install -U setuptools
17+
install:
18+
- pip install -r requirements.txt
19+
- pip install -e .[dev]
20+
script:
21+
- py.test -v
22+
- <<: *test
23+
python: "3.4"
24+
- <<: *test
25+
python: "3.5"
26+
- <<: *test
27+
python: "3.5-dev"
28+
- <<: *test
29+
python: "3.6"
30+
- <<: *test
31+
python: "3.6-dev"
32+
- <<: *test
33+
python: "3.7"
34+
- <<: *test
35+
python: "3.7-dev"
36+
- <<: *test
37+
python: "3.8-dev"
38+
- <<: *test
39+
python: "3.8"
40+
- <<: *test
41+
stage: Coverage
42+
name: Coveralls
43+
python: "3.7"
44+
install:
45+
- pip install -r requirements.txt
46+
- pip install -e .[dev]
47+
script:
48+
- pytest --cov=yoti_python_sdk yoti_python_sdk/tests
49+
if: type = pull_request OR branch = master
50+
after_success:
51+
- coveralls
3152

3253
matrix:
3354
allow_failures:

CONTRIBUTING.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Contributing
2+
3+
1. Fork the repo, develop and test your code changes.
4+
2. Ensure commit messages clearly define the changes that have been made.
5+
3. Create a pull request.
6+
7+
## Adding Features
8+
9+
Any features added must be fully tested and documented, with examples supplied in the pull request.
10+
The feature must support the lowest Python version that the SDK supports (see [the travis file](.travis.yml) for all supported versions). The feature
11+
must not introduce any unnecessary dependencies (although introducing a new third party library
12+
is open for discussion if absolutely required).
13+
14+
## Pre-commit Hook
15+
16+
* Install the [pre-commit framework](https://pre-commit.com/)
17+
* Run `pre-commit install`
18+
19+
## Testing
20+
21+
After cloning the repository, run the following to install dependencies:
22+
23+
```bash
24+
pip install -r requirements.txt
25+
pip install -e .[dev]
26+
```
27+
28+
Running the tests:
29+
30+
```bash
31+
pytest
32+
```
33+
34+
## Coding Style
35+
36+
* The pre-commit hook uses the `black` formatter to auto-format any code when committing,
37+
along with `flake8` for style guide enforcement.

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Yoti Python SDK #
22

3+
[![Build Status](https://travis-ci.com/getyoti/yoti-python-sdk.svg?branch=master)](https://travis-ci.com/getyoti/yoti-python-sdk)
4+
[![Coverage Status](https://coveralls.io/repos/github/getyoti/yoti-python-sdk/badge.svg?branch=master)](https://coveralls.io/github/getyoti/yoti-python-sdk?branch=master)
5+
36
Welcome to the Yoti Python SDK. This repo contains the tools and step by step instructions you need to quickly integrate your Python back-end with Yoti so that your users can share their identity details with your application in a secure and trusted way.
47

58
## Table of Contents
@@ -128,6 +131,7 @@ full_name = profile.full_name.value
128131
phone_number = profile.phone_number.value
129132
date_of_birth = profile.date_of_birth.value
130133
postal_address = profile.postal_address.value
134+
structured_postal_address = profile.structured_postal_address.value
131135
gender = profile.gender.value
132136
nationality = profile.nationality.value
133137
email_address = profile.email_address.value
@@ -274,7 +278,7 @@ To run the Flask or Django container:
274278
Running the tests is done by the following process, ensuring you are using Python 3.0+:
275279

276280
1. Install dependencies: `pip install -r requirements.txt`
277-
1. Install the SDK: `python setup.py develop`
281+
1. Install the SDK and development dependencies: `pip install .[dev]`
278282
1. Execute in the main project dir: `py.test`
279283

280284
## API Coverage
@@ -293,6 +297,7 @@ Running the tests is done by the following process, ensuring you are using Pytho
293297
* [X] Email Address `email_address`
294298
* [X] Date of Birth `date_of_birth`
295299
* [X] Address `postal_address`
300+
* [X] Structured Postal Address `structured_postal_address`
296301
* [X] Gender `gender`
297302
* [X] Nationality `nationality`
298303
* [X] Application Profile `application_profile`

examples/yoti_example_django/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ ARG YOTI_KEY_FILE_PATH
55
RUN if [ "$YOTI_SCENARIO_ID" = "yourScenarioId" ] ; then echo YOTI_SCENARIO_ID not set; exit 1; else echo YOTI_SCENARIO_ID is $YOTI_SCENARIO_ID ; fi
66
RUN if [ "$YOTI_CLIENT_SDK_ID" = "yourClientSdkId" ] ; then echo YOTI_CLIENT_SDK_ID not set; exit 1; else echo YOTI_CLIENT_SDK_ID is $YOTI_CLIENT_SDK_ID ; fi
77
RUN if [ "$YOTI_KEY_FILE_PATH" = "yourKeyFilePath" ] ; then echo YOTI_KEY_FILE_PATH not set; exit 1; else echo YOTI_KEY_FILE_PATH is $YOTI_KEY_FILE_PATH ; fi
8-
ADD . /code
9-
WORKDIR /code
8+
ADD . /yoti-sdk
9+
WORKDIR /yoti-sdk/examples/yoti_example_django/
10+
RUN pip install --no-cache-dir -r /yoti-sdk/requirements.txt && pip install /yoti-sdk
1011
RUN pip install --no-cache-dir -r requirements.txt
1112
ENV YOTI_SCENARIO_ID $YOTI_SCENARIO_ID
1213
ENV YOTI_CLIENT_SDK_ID $YOTI_CLIENT_SDK_ID
1314
ENV YOTI_KEY_FILE_PATH $YOTI_KEY_FILE_PATH
1415

1516
RUN python manage.py migrate
16-
CMD ["python", "manage.py", "runsslserver", "0.0.0.0:5000"]
17+
CMD ["python", "manage.py", "runsslserver", "0.0.0.0:5000"]

examples/yoti_example_django/docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ version: '3.4'
22
services:
33
web:
44
build:
5-
context: ./
5+
context: ../../
6+
dockerfile: examples/yoti_example_django/Dockerfile
67
args:
78
YOTI_SCENARIO_ID: "${YOTI_SCENARIO_ID}"
89
YOTI_CLIENT_SDK_ID: "${YOTI_CLIENT_SDK_ID}"

examples/yoti_example_django/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cryptography>=2.3
2-
Django==2.2.4
2+
Django==2.2.8
33
django-sslserver>=0.2.0
44
python-dotenv>=0.7.1
55
requests>=2.20.0

examples/yoti_example_django/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ cffi==1.11.5 # via cryptography
1111
chardet==3.0.4 # via requests
1212
cryptography==2.5
1313
django-sslserver==0.20
14-
django==2.2.4
14+
django==2.2.8
1515
future==0.16.0 # via yoti
1616
idna==2.7 # via requests
1717
protobuf==3.6.0 # via yoti

0 commit comments

Comments
 (0)