{"action":"created","comment":{"url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls/comments/239440803","pull_request_review_id":182223201,"id":239440803,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTQ0MDgwMw==","diff_hunk":"@@ -13,6 +13,4 @@ pathlib2 = \"*\"\n [dev-packages]\n pytest = \"*\"\n pytest-cov = \"*\"\n-coverage = \"*\"\n-pep8 = \"*\"","path":"Pipfile","position":null,"original_position":5,"commit_id":"203f077a0a820de47e51199ff9e481ffef27b93d","original_commit_id":"203f077a0a820de47e51199ff9e481ffef27b93d","user":{"login":"bitdivision","id":205209,"node_id":"MDQ6VXNlcjIwNTIwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/205209?v=4","gravatar_id":"","url":"https://api.github.com/users/bitdivision","html_url":"https://github.com/bitdivision","followers_url":"https://api.github.com/users/bitdivision/followers","following_url":"https://api.github.com/users/bitdivision/following{/other_user}","gists_url":"https://api.github.com/users/bitdivision/gists{/gist_id}","starred_url":"https://api.github.com/users/bitdivision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitdivision/subscriptions","organizations_url":"https://api.github.com/users/bitdivision/orgs","repos_url":"https://api.github.com/users/bitdivision/repos","events_url":"https://api.github.com/users/bitdivision/events{/privacy}","received_events_url":"https://api.github.com/users/bitdivision/received_events","type":"User","site_admin":false},"body":"Not a blocking issue though\r\n","created_at":"2018-12-06T12:52:05Z","updated_at":"2018-12-06T12:52:06Z","html_url":"https://github.com/ONSdigital/sdc-cryptography/pull/27#discussion_r239440803","pull_request_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls/27","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls/comments/239440803"},"html":{"href":"https://github.com/ONSdigital/sdc-cryptography/pull/27#discussion_r239440803"},"pull_request":{"href":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls/27"}},"in_reply_to_id":239440755},"pull_request":{"url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls/27","id":234994288,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0OTk0Mjg4","html_url":"https://github.com/ONSdigital/sdc-cryptography/pull/27","diff_url":"https://github.com/ONSdigital/sdc-cryptography/pull/27.diff","patch_url":"https://github.com/ONSdigital/sdc-cryptography/pull/27.patch","issue_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/issues/27","number":27,"state":"open","locked":false,"title":"Use pipenv, improve unit test coverage and unpin dependencies","user":{"login":"insacuri","id":3965382,"node_id":"MDQ6VXNlcjM5NjUzODI=","avatar_url":"https://avatars2.githubusercontent.com/u/3965382?v=4","gravatar_id":"","url":"https://api.github.com/users/insacuri","html_url":"https://github.com/insacuri","followers_url":"https://api.github.com/users/insacuri/followers","following_url":"https://api.github.com/users/insacuri/following{/other_user}","gists_url":"https://api.github.com/users/insacuri/gists{/gist_id}","starred_url":"https://api.github.com/users/insacuri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/insacuri/subscriptions","organizations_url":"https://api.github.com/users/insacuri/orgs","repos_url":"https://api.github.com/users/insacuri/repos","events_url":"https://api.github.com/users/insacuri/events{/privacy}","received_events_url":"https://api.github.com/users/insacuri/received_events","type":"User","site_admin":false},"body":"## What? and Why?\r\nhttps://trello.com/c/YdQbbZdp/2551-spring-clean-on-sdc-cryptography\r\n\r\nThis PR increases the unit test coverage, unpins the dependency versions and uses Pipenv for package management whilst developing.\r\n\r\nIn setup.py, it used to get its install_requires field from the requirements file.  Now that we have a pipfile instead, I wasn't sure of the best way to do this.  Hard coding the 3 dependencies works, but I doubt it's the best way of doing it but I couldn't find a decent solution.\r\n\r\nThe unit test coverage was vastly improved, but testing the encrypt function was difficult as the same input gave a different output each time.  I couldn't figure out how to get around that.\r\n\r\n## How to test\r\n- Check out this repo and `pipenv run make sdist`\r\n- `cd sdx-decrypt` (wherever it is on your machine)\r\n- After sorting out the virtual environment, `make build` then `pip install <path to sdc_cryptography>/sdc-cryptography-0.3.0.tar.gz` to install the new version you just created.\r\n- Spin up a standalone sdx-decrypt`export PORT=5000; python server.py` \r\n- Spin up sdx-compose.\r\n- Stop the sdx-gateway service. `docker ps` then `docker stop <gateway container id>`\r\n- Submit a submission via sdx-console.  It should now be on the rabbit queue, waiting to be consumed.\r\n- Go to localhost:15672 for the management console.  Get the message you just submitted, then POST it to the decrypt service you have running locally (I used Postman).  It should decrypt and give you the expected payload that you submitted via console.\r\n\r\n## Checklist\r\n  - [x] CHANGELOG.md updated? (if required)\r\n","created_at":"2018-11-30T13:52:01Z","updated_at":"2018-12-06T12:52:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9a6875b982ad073286b9ca166eb6799383c6025","assignee":null,"assignees":[],"requested_reviewers":[{"login":"davidmort","id":1504284,"node_id":"MDQ6VXNlcjE1MDQyODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1504284?v=4","gravatar_id":"","url":"https://api.github.com/users/davidmort","html_url":"https://github.com/davidmort","followers_url":"https://api.github.com/users/davidmort/followers","following_url":"https://api.github.com/users/davidmort/following{/other_user}","gists_url":"https://api.github.com/users/davidmort/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmort/subscriptions","organizations_url":"https://api.github.com/users/davidmort/orgs","repos_url":"https://api.github.com/users/davidmort/repos","events_url":"https://api.github.com/users/davidmort/events{/privacy}","received_events_url":"https://api.github.com/users/davidmort/received_events","type":"User","site_admin":false},{"login":"necrophonic","id":1521281,"node_id":"MDQ6VXNlcjE1MjEyODE=","avatar_url":"https://avatars3.githubusercontent.com/u/1521281?v=4","gravatar_id":"","url":"https://api.github.com/users/necrophonic","html_url":"https://github.com/necrophonic","followers_url":"https://api.github.com/users/necrophonic/followers","following_url":"https://api.github.com/users/necrophonic/following{/other_user}","gists_url":"https://api.github.com/users/necrophonic/gists{/gist_id}","starred_url":"https://api.github.com/users/necrophonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/necrophonic/subscriptions","organizations_url":"https://api.github.com/users/necrophonic/orgs","repos_url":"https://api.github.com/users/necrophonic/repos","events_url":"https://api.github.com/users/necrophonic/events{/privacy}","received_events_url":"https://api.github.com/users/necrophonic/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls/27/commits","review_comments_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls/27/comments","review_comment_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/issues/27/comments","statuses_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/statuses/203f077a0a820de47e51199ff9e481ffef27b93d","head":{"label":"ONSdigital:spring-clean-on-sdc-cryptography","ref":"spring-clean-on-sdc-cryptography","sha":"203f077a0a820de47e51199ff9e481ffef27b93d","user":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":98206020,"node_id":"MDEwOlJlcG9zaXRvcnk5ODIwNjAyMA==","name":"sdc-cryptography","full_name":"ONSdigital/sdc-cryptography","private":false,"owner":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ONSdigital/sdc-cryptography","description":"Common code for SDC services that use JWE ","fork":false,"url":"https://api.github.com/repos/ONSdigital/sdc-cryptography","forks_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/forks","keys_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/teams","hooks_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/events","assignees_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/tags","blobs_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/subscription","commits_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/merges","archive_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/downloads","issues_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/deployments","created_at":"2017-07-24T15:29:08Z","updated_at":"2018-11-29T19:21:20Z","pushed_at":"2018-12-06T11:08:48Z","git_url":"git://github.com/ONSdigital/sdc-cryptography.git","ssh_url":"git@github.com:ONSdigital/sdc-cryptography.git","clone_url":"https://github.com/ONSdigital/sdc-cryptography.git","svn_url":"https://github.com/ONSdigital/sdc-cryptography","homepage":null,"size":124,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":8,"watchers":2,"default_branch":"master"}},"base":{"label":"ONSdigital:master","ref":"master","sha":"e824b8c3e60cabe3330ff4e186d5cd662eabaef2","user":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"repo":{"id":98206020,"node_id":"MDEwOlJlcG9zaXRvcnk5ODIwNjAyMA==","name":"sdc-cryptography","full_name":"ONSdigital/sdc-cryptography","private":false,"owner":{"login":"ONSdigital","id":6865137,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NjUxMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/6865137?v=4","gravatar_id":"","url":"https://api.github.com/users/ONSdigital","html_url":"https://github.com/ONSdigital","followers_url":"https://api.github.com/users/ONSdigital/followers","following_url":"https://api.github.com/users/ONSdigital/following{/other_user}","gists_url":"https://api.github.com/users/ONSdigital/gists{/gist_id}","starred_url":"https://api.github.com/users/ONSdigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ONSdigital/subscriptions","organizations_url":"https://api.github.com/users/ONSdigital/orgs","repos_url":"https://api.github.com/users/ONSdigital/repos","events_url":"https://api.github.com/users/ONSdigital/events{/privacy}","received_events_url":"https://api.github.com/users/ONSdigital/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ONSdigital/sdc-cryptography","description":"Common code for SDC services that use JWE ","fork":false,"url":"https://api.github.com/repos/ONSdigital/sdc-cryptography","forks_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/forks","keys_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/teams","hooks_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/hooks","issue_events_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/issues/events{/number}","events_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/events","assignees_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/assignees{/user}","branches_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/branches{/branch}","tags_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/tags","blobs_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/git/refs{/sha}","trees_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/statuses/{sha}","languages_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/languages","stargazers_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/stargazers","contributors_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/contributors","subscribers_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/subscribers","subscription_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/subscription","commits_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/commits{/sha}","git_commits_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/git/commits{/sha}","comments_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/comments{/number}","issue_comment_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/issues/comments{/number}","contents_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/contents/{+path}","compare_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/merges","archive_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/downloads","issues_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/issues{/number}","pulls_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls{/number}","milestones_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/milestones{/number}","notifications_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/labels{/name}","releases_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/releases{/id}","deployments_url":"https://api.github.com/repos/ONSdigital/sdc-cryptography/deployments","created_at":"2017-07-24T15:29:08Z","updated_at":"2018-11-29T19:21:20Z","pushed_at":"2018-12-06T11:08:48Z","git_url":"git://github.com/ONSdigital/sdc-cryptography.git","ssh_url":"git@github.com:ONSdigital/sdc-cryptography.git","clone_url":"https://github.com/ONSdigital/sdc-cryptography.git","svn_url":"https://github.com/ONSdigital/sdc-cryptography","homepage":null,"size":124,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls/27"},"html":{"href":"https://github.com/ONSdigital/sdc-cryptography/pull/27"},"issue":{"href":"https://api.github.com/repos/ONSdigital/sdc-cryptography/issues/27"},"comments":{"href":"https://api.github.com/repos/ONSdigital/sdc-cryptography/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ONSdigital/sdc-cryptography/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/ONSdigital/sdc-cryptography/statuses/203f077a0a820de47e51199ff9e481ffef27b93d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bitdivision"}}