payload: {"action":"opened","number":196,"pull_request":{"url":"https://api.github.com/repos/MISS3D/s2p/pulls/196","id":257431731,"node_id":"MDExOlB1bGxSZXF1ZXN0MjU3NDMxNzMx","html_url":"https://github.com/MISS3D/s2p/pull/196","diff_url":"https://github.com/MISS3D/s2p/pull/196.diff","patch_url":"https://github.com/MISS3D/s2p/pull/196.patch","issue_url":"https://api.github.com/repos/MISS3D/s2p/issues/196","number":196,"state":"open","locked":false,"title":"Migrate tests to unittest framework","user":{"login":"jmichel-otb","id":10595679,"node_id":"MDQ6VXNlcjEwNTk1Njc5","avatar_url":"https://avatars3.githubusercontent.com/u/10595679?v=4","gravatar_id":"","url":"https://api.github.com/users/jmichel-otb","html_url":"https://github.com/jmichel-otb","followers_url":"https://api.github.com/users/jmichel-otb/followers","following_url":"https://api.github.com/users/jmichel-otb/following{/other_user}","gists_url":"https://api.github.com/users/jmichel-otb/gists{/gist_id}","starred_url":"https://api.github.com/users/jmichel-otb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmichel-otb/subscriptions","organizations_url":"https://api.github.com/users/jmichel-otb/orgs","repos_url":"https://api.github.com/users/jmichel-otb/repos","events_url":"https://api.github.com/users/jmichel-otb/events{/privacy}","received_events_url":"https://api.github.com/users/jmichel-otb/received_events","type":"User","site_admin":false},"body":"# Summary\r\n\r\nThis PR migrates all our tests to a real unit test framework. I choosed unittest as it is the standard python framework, requiring no additional dependencies.\r\n\r\nImplementation details:\r\n* `testdata` moved to `tests` folder\r\n* `s2p_test.py`has been moved to `tests` folder, rewritten with `unittest` and split into different test file (one per module)\r\n* travis-ci' and `test` makefile target have been updated to run `unittest` with test discovery (and coverage for `travis-ci`)\r\n\r\n# Running tests\r\nAll those command can be run from the s2p root folder.\r\n\r\n## All tests\r\n```bash\r\n$ make test\r\n```\r\nor \r\n```bash\r\n$  python -m unittest discover -s tests -p \"*_test.py\"\r\n```\r\n\r\n## A specific test or group of tests\r\n### All tests in sift_test.py\r\n```bash\r\n$ python -m unittest tests.sift_test\r\n```\r\n### All tests in TestSifts class in sift_test.py\r\n```bash\r\n$ python -m unittest tests.sift_test.testSifts\r\n```\r\n### A specific test in in TestSifts class in sift_test.py\r\n```bash\r\n$ python -m unittest tests.sift_test.testSifts.test_image_keypoints\r\n```\r\n# Adding tests\r\nEdit or create the corresponding test module for the module to be tested.\r\n\r\n# Coverage\r\nAs a cherry icing on the cake, I added coverage report to travis:\r\n\r\n```\r\n----------------------------------------------------------------------\r\nRan 10 tests in 334.351s\r\nOK\r\nName                          Stmts   Miss  Cover   Missing\r\n-----------------------------------------------------------\r\ns2plib/__init__.py                0      0   100%\r\ns2plib/block_matching.py        115    109     5%   13-16, 35-249\r\ns2plib/common.py                168     96    43%   34-35, 89-92, 105, 113-116, 129-134, 156-159, 175-181, 202-205, 219-222, 237-252, 259-262, 279-295, 314-333, 348-358, 377-388, 392-402\r\ns2plib/config.py                 45      0   100%\r\ns2plib/estimation.py            105     78    26%   23-41, 48-51, 69-117, 136-160, 181-182, 227-233\r\ns2plib/evaluation.py             10      7    30%   23-32\r\ns2plib/fusion.py                 36     25    31%   21-24, 40-73\r\ns2plib/geographiclib.py          10      7    30%   26-34\r\ns2plib/initialization.py        173     33    81%   29-30, 48-49, 53-54, 56-59, 63-64, 67-82, 129, 230, 305-316\r\ns2plib/masking.py                36     26    28%   34-69, 81-82\r\ns2plib/parallel.py               91     34    63%   37-55, 93-94, 99-103, 135, 141-150\r\ns2plib/pointing_accuracy.py      63     35    44%   40-62, 84-101, 126-136, 172, 174, 177\r\ns2plib/rectification.py         162    144    11%   34-43, 62-79, 105-127, 148-162, 189-251, 274-290, 321-401\r\ns2plib/rpc_model.py             338    212    37%   66-87, 94-98, 135, 138-141, 144-167, 177-182, 238-264, 281, 291, 312-379, 389-432, 442-472, 482-505, 516-521, 525, 571-578\r\ns2plib/rpc_utils.py             215    154    28%   34-36, 54-92, 158-220, 252-255, 296-312, 319-348, 424-440, 485-498, 523-525, 549-557, 564-592\r\ns2plib/sift.py                   51     24    53%   35, 76, 78-81, 87, 89, 92-94, 119-142\r\ns2plib/test_estimation.py        43     43     0%   6-58\r\ns2plib/test_evaluation.py        21     21     0%   6-28\r\ns2plib/triangulation.py          54     44    19%   26-32, 56-63, 91-96, 114-126, 140-153, 178-194\r\ns2plib/viewGL.py                116    116     0%   5-208\r\ns2plib/visualisation.py          96     82    15%   35-54, 71-118, 141-203\r\n-----------------------------------------------------------\r\nTOTAL                          1948   1290    34%\r\n\r\n```\r\n\r\n\r\n\r\n","created_at":"2019-03-01T12:45:59Z","updated_at":"2019-03-01T12:45:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/MISS3D/s2p/pulls/196/commits","review_comments_url":"https://api.github.com/repos/MISS3D/s2p/pulls/196/comments","review_comment_url":"https://api.github.com/repos/MISS3D/s2p/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MISS3D/s2p/issues/196/comments","statuses_url":"https://api.github.com/repos/MISS3D/s2p/statuses/94eae0447ea89738b0cfef5a6e73fd97891bd5bb","head":{"label":"jmichel-otb:unittest","ref":"unittest","sha":"94eae0447ea89738b0cfef5a6e73fd97891bd5bb","user":{"login":"jmichel-otb","id":10595679,"node_id":"MDQ6VXNlcjEwNTk1Njc5","avatar_url":"https://avatars3.githubusercontent.com/u/10595679?v=4","gravatar_id":"","url":"https://api.github.com/users/jmichel-otb","html_url":"https://github.com/jmichel-otb","followers_url":"https://api.github.com/users/jmichel-otb/followers","following_url":"https://api.github.com/users/jmichel-otb/following{/other_user}","gists_url":"https://api.github.com/users/jmichel-otb/gists{/gist_id}","starred_url":"https://api.github.com/users/jmichel-otb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmichel-otb/subscriptions","organizations_url":"https://api.github.com/users/jmichel-otb/orgs","repos_url":"https://api.github.com/users/jmichel-otb/repos","events_url":"https://api.github.com/users/jmichel-otb/events{/privacy}","received_events_url":"https://api.github.com/users/jmichel-otb/received_events","type":"User","site_admin":false},"repo":{"id":39570717,"node_id":"MDEwOlJlcG9zaXRvcnkzOTU3MDcxNw==","name":"s2p","full_name":"jmichel-otb/s2p","private":false,"owner":{"login":"jmichel-otb","id":10595679,"node_id":"MDQ6VXNlcjEwNTk1Njc5","avatar_url":"https://avatars3.githubusercontent.com/u/10595679?v=4","gravatar_id":"","url":"https://api.github.com/users/jmichel-otb","html_url":"https://github.com/jmichel-otb","followers_url":"https://api.github.com/users/jmichel-otb/followers","following_url":"https://api.github.com/users/jmichel-otb/following{/other_user}","gists_url":"https://api.github.com/users/jmichel-otb/gists{/gist_id}","starred_url":"https://api.github.com/users/jmichel-otb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmichel-otb/subscriptions","organizations_url":"https://api.github.com/users/jmichel-otb/orgs","repos_url":"https://api.github.com/users/jmichel-otb/repos","events_url":"https://api.github.com/users/jmichel-otb/events{/privacy}","received_events_url":"https://api.github.com/users/jmichel-otb/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jmichel-otb/s2p","description":"Satellite Stereo Pipeline","fork":true,"url":"https://api.github.com/repos/jmichel-otb/s2p","forks_url":"https://api.github.com/repos/jmichel-otb/s2p/forks","keys_url":"https://api.github.com/repos/jmichel-otb/s2p/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmichel-otb/s2p/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmichel-otb/s2p/teams","hooks_url":"https://api.github.com/repos/jmichel-otb/s2p/hooks","issue_events_url":"https://api.github.com/repos/jmichel-otb/s2p/issues/events{/number}","events_url":"https://api.github.com/repos/jmichel-otb/s2p/events","assignees_url":"https://api.github.com/repos/jmichel-otb/s2p/assignees{/user}","branches_url":"https://api.github.com/repos/jmichel-otb/s2p/branches{/branch}","tags_url":"https://api.github.com/repos/jmichel-otb/s2p/tags","blobs_url":"https://api.github.com/repos/jmichel-otb/s2p/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmichel-otb/s2p/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmichel-otb/s2p/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmichel-otb/s2p/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmichel-otb/s2p/statuses/{sha}","languages_url":"https://api.github.com/repos/jmichel-otb/s2p/languages","stargazers_url":"https://api.github.com/repos/jmichel-otb/s2p/stargazers","contributors_url":"https://api.github.com/repos/jmichel-otb/s2p/contributors","subscribers_url":"https://api.github.com/repos/jmichel-otb/s2p/subscribers","subscription_url":"https://api.github.com/repos/jmichel-otb/s2p/subscription","commits_url":"https://api.github.com/repos/jmichel-otb/s2p/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmichel-otb/s2p/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmichel-otb/s2p/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmichel-otb/s2p/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmichel-otb/s2p/contents/{+path}","compare_url":"https://api.github.com/repos/jmichel-otb/s2p/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmichel-otb/s2p/merges","archive_url":"https://api.github.com/repos/jmichel-otb/s2p/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmichel-otb/s2p/downloads","issues_url":"https://api.github.com/repos/jmichel-otb/s2p/issues{/number}","pulls_url":"https://api.github.com/repos/jmichel-otb/s2p/pulls{/number}","milestones_url":"https://api.github.com/repos/jmichel-otb/s2p/milestones{/number}","notifications_url":"https://api.github.com/repos/jmichel-otb/s2p/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmichel-otb/s2p/labels{/name}","releases_url":"https://api.github.com/repos/jmichel-otb/s2p/releases{/id}","deployments_url":"https://api.github.com/repos/jmichel-otb/s2p/deployments","created_at":"2015-07-23T14:05:19Z","updated_at":"2017-02-03T14:07:51Z","pushed_at":"2019-03-01T12:08:47Z","git_url":"git://github.com/jmichel-otb/s2p.git","ssh_url":"git@github.com:jmichel-otb/s2p.git","clone_url":"https://github.com/jmichel-otb/s2p.git","svn_url":"https://github.com/jmichel-otb/s2p","homepage":"","size":97224,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"MISS3D:master","ref":"master","sha":"cfec24e1994d8ff5daefdea7bc386b4d0226c7b0","user":{"login":"MISS3D","id":25530023,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTMwMDIz","avatar_url":"https://avatars3.githubusercontent.com/u/25530023?v=4","gravatar_id":"","url":"https://api.github.com/users/MISS3D","html_url":"https://github.com/MISS3D","followers_url":"https://api.github.com/users/MISS3D/followers","following_url":"https://api.github.com/users/MISS3D/following{/other_user}","gists_url":"https://api.github.com/users/MISS3D/gists{/gist_id}","starred_url":"https://api.github.com/users/MISS3D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MISS3D/subscriptions","organizations_url":"https://api.github.com/users/MISS3D/orgs","repos_url":"https://api.github.com/users/MISS3D/repos","events_url":"https://api.github.com/users/MISS3D/events{/privacy}","received_events_url":"https://api.github.com/users/MISS3D/received_events","type":"Organization","site_admin":false},"repo":{"id":31714132,"node_id":"MDEwOlJlcG9zaXRvcnkzMTcxNDEzMg==","name":"s2p","full_name":"MISS3D/s2p","private":false,"owner":{"login":"MISS3D","id":25530023,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTMwMDIz","avatar_url":"https://avatars3.githubusercontent.com/u/25530023?v=4","gravatar_id":"","url":"https://api.github.com/users/MISS3D","html_url":"https://github.com/MISS3D","followers_url":"https://api.github.com/users/MISS3D/followers","following_url":"https://api.github.com/users/MISS3D/following{/other_user}","gists_url":"https://api.github.com/users/MISS3D/gists{/gist_id}","starred_url":"https://api.github.com/users/MISS3D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MISS3D/subscriptions","organizations_url":"https://api.github.com/users/MISS3D/orgs","repos_url":"https://api.github.com/users/MISS3D/repos","events_url":"https://api.github.com/users/MISS3D/events{/privacy}","received_events_url":"https://api.github.com/users/MISS3D/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/MISS3D/s2p","description":"Satellite Stereo Pipeline","fork":false,"url":"https://api.github.com/repos/MISS3D/s2p","forks_url":"https://api.github.com/repos/MISS3D/s2p/forks","keys_url":"https://api.github.com/repos/MISS3D/s2p/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MISS3D/s2p/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MISS3D/s2p/teams","hooks_url":"https://api.github.com/repos/MISS3D/s2p/hooks","issue_events_url":"https://api.github.com/repos/MISS3D/s2p/issues/events{/number}","events_url":"https://api.github.com/repos/MISS3D/s2p/events","assignees_url":"https://api.github.com/repos/MISS3D/s2p/assignees{/user}","branches_url":"https://api.github.com/repos/MISS3D/s2p/branches{/branch}","tags_url":"https://api.github.com/repos/MISS3D/s2p/tags","blobs_url":"https://api.github.com/repos/MISS3D/s2p/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MISS3D/s2p/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MISS3D/s2p/git/refs{/sha}","trees_url":"https://api.github.com/repos/MISS3D/s2p/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MISS3D/s2p/statuses/{sha}","languages_url":"https://api.github.com/repos/MISS3D/s2p/languages","stargazers_url":"https://api.github.com/repos/MISS3D/s2p/stargazers","contributors_url":"https://api.github.com/repos/MISS3D/s2p/contributors","subscribers_url":"https://api.github.com/repos/MISS3D/s2p/subscribers","subscription_url":"https://api.github.com/repos/MISS3D/s2p/subscription","commits_url":"https://api.github.com/repos/MISS3D/s2p/commits{/sha}","git_commits_url":"https://api.github.com/repos/MISS3D/s2p/git/commits{/sha}","comments_url":"https://api.github.com/repos/MISS3D/s2p/comments{/number}","issue_comment_url":"https://api.github.com/repos/MISS3D/s2p/issues/comments{/number}","contents_url":"https://api.github.com/repos/MISS3D/s2p/contents/{+path}","compare_url":"https://api.github.com/repos/MISS3D/s2p/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MISS3D/s2p/merges","archive_url":"https://api.github.com/repos/MISS3D/s2p/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MISS3D/s2p/downloads","issues_url":"https://api.github.com/repos/MISS3D/s2p/issues{/number}","pulls_url":"https://api.github.com/repos/MISS3D/s2p/pulls{/number}","milestones_url":"https://api.github.com/repos/MISS3D/s2p/milestones{/number}","notifications_url":"https://api.github.com/repos/MISS3D/s2p/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MISS3D/s2p/labels{/name}","releases_url":"https://api.github.com/repos/MISS3D/s2p/releases{/id}","deployments_url":"https://api.github.com/repos/MISS3D/s2p/deployments","created_at":"2015-03-05T13:08:21Z","updated_at":"2019-02-28T16:58:29Z","pushed_at":"2019-03-01T10:45:07Z","git_url":"git://github.com/MISS3D/s2p.git","ssh_url":"git@github.com:MISS3D/s2p.git","clone_url":"https://github.com/MISS3D/s2p.git","svn_url":"https://github.com/MISS3D/s2p","homepage":"","size":93994,"stargazers_count":79,"watchers_count":79,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":59,"open_issues":21,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MISS3D/s2p/pulls/196"},"html":{"href":"https://github.com/MISS3D/s2p/pull/196"},"issue":{"href":"https://api.github.com/repos/MISS3D/s2p/issues/196"},"comments":{"href":"https://api.github.com/repos/MISS3D/s2p/issues/196/comments"},"review_comments":{"href":"https://api.github.com/repos/MISS3D/s2p/pulls/196/comments"},"review_comment":{"href":"https://api.github.com/repos/MISS3D/s2p/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MISS3D/s2p/pulls/196/commits"},"statuses":{"href":"https://api.github.com/repos/MISS3D/s2p/statuses/94eae0447ea89738b0cfef5a6e73fd97891bd5bb"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":18,"additions":312,"deletions":303,"changed_files":33}}
other: {"actor":{"display_login":"jmichel-otb"}}