{"action":"closed","number":41,"pull_request":{"url":"https://api.github.com/repos/ome/ome-files-cpp/pulls/41","id":97793973,"html_url":"https://github.com/ome/ome-files-cpp/pull/41","diff_url":"https://github.com/ome/ome-files-cpp/pull/41.diff","patch_url":"https://github.com/ome/ome-files-cpp/pull/41.patch","issue_url":"https://api.github.com/repos/ome/ome-files-cpp/issues/41","number":41,"state":"closed","locked":false,"title":"Python wrapper","user":{"login":"simleo","id":1183171,"avatar_url":"https://avatars.githubusercontent.com/u/1183171?v=3","gravatar_id":"","url":"https://api.github.com/users/simleo","html_url":"https://github.com/simleo","followers_url":"https://api.github.com/users/simleo/followers","following_url":"https://api.github.com/users/simleo/following{/other_user}","gists_url":"https://api.github.com/users/simleo/gists{/gist_id}","starred_url":"https://api.github.com/users/simleo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simleo/subscriptions","organizations_url":"https://api.github.com/users/simleo/orgs","repos_url":"https://api.github.com/users/simleo/repos","events_url":"https://api.github.com/users/simleo/events{/privacy}","received_events_url":"https://api.github.com/users/simleo/received_events","type":"User","site_admin":false},"body":"Opening for initial feedback (this is just a minimal stub for now).\r\n\r\nTo test:\r\n\r\n* Build the C++ libraries and install them to a `PREFIX`\r\n* Move to the `python` subdir and run `python setup.py build_ext -I${PREFIX}/include -L${PREFIX}/lib -R${PREFIX}/lib`\r\n* Move to `build/lib*` (e.g., `build/lib.macosx-10.11-x86_64-2.7` on my laptop)\r\n* Add `${PREFIX}/lib` to the library path seen by the linker. On my Mac laptop, I ran `export DYLD_LIBRARY_PATH=${PREFIX}/lib`\r\n* Open a Python shell and try something like the following:\r\n\r\n```\r\n>>> import ome_files\r\n>>> reader = ome_files.OMETIFFReader()\r\n>>> reader.get_image_count()\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nome_files.Error: Current file should not be null; call setId() first\r\n>>> reader.set_id(\"/path/to/img.ome.tif\")\r\n>>> count = reader.get_image_count()\r\n>>> reader.close()\r\n```\r\n\r\n**Notes:**\r\n\r\n(including a summary of initial comments from @rleigh-codelibre, @joshmoore and @sbesson)\r\n\r\n*Wrapping strategy*\r\n\r\nThere are many ways to go about this. This is a \"classic\" Python extension, which uses the built-in C-level Python API. The main benefits of this approach w.r.t. using an external wrapping tool (boost.python, cython, swig, pybind11, ...) should be 1) maximum flexibility (i.e., full control of what's happening) and 2) no additional dependencies. The main drawback should be (possibly) more \"manual\" work. Note that we might need to integrate Numpy at some point, due to the presence of sophisticated numeric types.\r\n\r\n*Which Python?*\r\n\r\nThis is a Python 2 extension. Do we want to support Python 2 or 3? They are mutually incompatible, so supporting both is an option but would require additional work\r\n\r\n*Which repo?*\r\n\r\nAt least in its current state, the python wrapping code does not necessarily have to be here. We could start an `ome-files-py` repo.","created_at":"2016-12-13T17:08:54Z","updated_at":"2016-12-22T16:31:00Z","closed_at":"2016-12-22T16:31:00Z","merged_at":null,"merge_commit_sha":"6d3bae59aab5eb4008fa9736768493e1ad7f7689","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ome/ome-files-cpp/pulls/41/commits","review_comments_url":"https://api.github.com/repos/ome/ome-files-cpp/pulls/41/comments","review_comment_url":"https://api.github.com/repos/ome/ome-files-cpp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ome/ome-files-cpp/issues/41/comments","statuses_url":"https://api.github.com/repos/ome/ome-files-cpp/statuses/401962257d51f6f74103cdb4174feef9f71bab64","head":{"label":"simleo:python","ref":"python","sha":"401962257d51f6f74103cdb4174feef9f71bab64","user":{"login":"simleo","id":1183171,"avatar_url":"https://avatars.githubusercontent.com/u/1183171?v=3","gravatar_id":"","url":"https://api.github.com/users/simleo","html_url":"https://github.com/simleo","followers_url":"https://api.github.com/users/simleo/followers","following_url":"https://api.github.com/users/simleo/following{/other_user}","gists_url":"https://api.github.com/users/simleo/gists{/gist_id}","starred_url":"https://api.github.com/users/simleo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simleo/subscriptions","organizations_url":"https://api.github.com/users/simleo/orgs","repos_url":"https://api.github.com/users/simleo/repos","events_url":"https://api.github.com/users/simleo/events{/privacy}","received_events_url":"https://api.github.com/users/simleo/received_events","type":"User","site_admin":false},"repo":{"id":76250843,"name":"ome-files-cpp","full_name":"simleo/ome-files-cpp","owner":{"login":"simleo","id":1183171,"avatar_url":"https://avatars.githubusercontent.com/u/1183171?v=3","gravatar_id":"","url":"https://api.github.com/users/simleo","html_url":"https://github.com/simleo","followers_url":"https://api.github.com/users/simleo/followers","following_url":"https://api.github.com/users/simleo/following{/other_user}","gists_url":"https://api.github.com/users/simleo/gists{/gist_id}","starred_url":"https://api.github.com/users/simleo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simleo/subscriptions","organizations_url":"https://api.github.com/users/simleo/orgs","repos_url":"https://api.github.com/users/simleo/repos","events_url":"https://api.github.com/users/simleo/events{/privacy}","received_events_url":"https://api.github.com/users/simleo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/simleo/ome-files-cpp","description":"OME Files is a C++ library for reading and writing data using the open and standard OME-TIFF file format using the OME data model","fork":true,"url":"https://api.github.com/repos/simleo/ome-files-cpp","forks_url":"https://api.github.com/repos/simleo/ome-files-cpp/forks","keys_url":"https://api.github.com/repos/simleo/ome-files-cpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/simleo/ome-files-cpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/simleo/ome-files-cpp/teams","hooks_url":"https://api.github.com/repos/simleo/ome-files-cpp/hooks","issue_events_url":"https://api.github.com/repos/simleo/ome-files-cpp/issues/events{/number}","events_url":"https://api.github.com/repos/simleo/ome-files-cpp/events","assignees_url":"https://api.github.com/repos/simleo/ome-files-cpp/assignees{/user}","branches_url":"https://api.github.com/repos/simleo/ome-files-cpp/branches{/branch}","tags_url":"https://api.github.com/repos/simleo/ome-files-cpp/tags","blobs_url":"https://api.github.com/repos/simleo/ome-files-cpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/simleo/ome-files-cpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/simleo/ome-files-cpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/simleo/ome-files-cpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/simleo/ome-files-cpp/statuses/{sha}","languages_url":"https://api.github.com/repos/simleo/ome-files-cpp/languages","stargazers_url":"https://api.github.com/repos/simleo/ome-files-cpp/stargazers","contributors_url":"https://api.github.com/repos/simleo/ome-files-cpp/contributors","subscribers_url":"https://api.github.com/repos/simleo/ome-files-cpp/subscribers","subscription_url":"https://api.github.com/repos/simleo/ome-files-cpp/subscription","commits_url":"https://api.github.com/repos/simleo/ome-files-cpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/simleo/ome-files-cpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/simleo/ome-files-cpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/simleo/ome-files-cpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/simleo/ome-files-cpp/contents/{+path}","compare_url":"https://api.github.com/repos/simleo/ome-files-cpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/simleo/ome-files-cpp/merges","archive_url":"https://api.github.com/repos/simleo/ome-files-cpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/simleo/ome-files-cpp/downloads","issues_url":"https://api.github.com/repos/simleo/ome-files-cpp/issues{/number}","pulls_url":"https://api.github.com/repos/simleo/ome-files-cpp/pulls{/number}","milestones_url":"https://api.github.com/repos/simleo/ome-files-cpp/milestones{/number}","notifications_url":"https://api.github.com/repos/simleo/ome-files-cpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/simleo/ome-files-cpp/labels{/name}","releases_url":"https://api.github.com/repos/simleo/ome-files-cpp/releases{/id}","deployments_url":"https://api.github.com/repos/simleo/ome-files-cpp/deployments","created_at":"2016-12-12T11:34:52Z","updated_at":"2016-12-12T11:34:54Z","pushed_at":"2016-12-20T15:30:54Z","git_url":"git://github.com/simleo/ome-files-cpp.git","ssh_url":"git@github.com:simleo/ome-files-cpp.git","clone_url":"https://github.com/simleo/ome-files-cpp.git","svn_url":"https://github.com/simleo/ome-files-cpp","homepage":"","size":2417,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ome:master","ref":"master","sha":"04d10f04d9297b2fb8ae01e7b0f18a2716c2bcbc","user":{"login":"ome","id":1831717,"avatar_url":"https://avatars.githubusercontent.com/u/1831717?v=3","gravatar_id":"","url":"https://api.github.com/users/ome","html_url":"https://github.com/ome","followers_url":"https://api.github.com/users/ome/followers","following_url":"https://api.github.com/users/ome/following{/other_user}","gists_url":"https://api.github.com/users/ome/gists{/gist_id}","starred_url":"https://api.github.com/users/ome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ome/subscriptions","organizations_url":"https://api.github.com/users/ome/orgs","repos_url":"https://api.github.com/users/ome/repos","events_url":"https://api.github.com/users/ome/events{/privacy}","received_events_url":"https://api.github.com/users/ome/received_events","type":"Organization","site_admin":false},"repo":{"id":51790383,"name":"ome-files-cpp","full_name":"ome/ome-files-cpp","owner":{"login":"ome","id":1831717,"avatar_url":"https://avatars.githubusercontent.com/u/1831717?v=3","gravatar_id":"","url":"https://api.github.com/users/ome","html_url":"https://github.com/ome","followers_url":"https://api.github.com/users/ome/followers","following_url":"https://api.github.com/users/ome/following{/other_user}","gists_url":"https://api.github.com/users/ome/gists{/gist_id}","starred_url":"https://api.github.com/users/ome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ome/subscriptions","organizations_url":"https://api.github.com/users/ome/orgs","repos_url":"https://api.github.com/users/ome/repos","events_url":"https://api.github.com/users/ome/events{/privacy}","received_events_url":"https://api.github.com/users/ome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ome/ome-files-cpp","description":"OME Files is a C++ library for reading and writing data using the open and standard OME-TIFF file format using the OME data model","fork":false,"url":"https://api.github.com/repos/ome/ome-files-cpp","forks_url":"https://api.github.com/repos/ome/ome-files-cpp/forks","keys_url":"https://api.github.com/repos/ome/ome-files-cpp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ome/ome-files-cpp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ome/ome-files-cpp/teams","hooks_url":"https://api.github.com/repos/ome/ome-files-cpp/hooks","issue_events_url":"https://api.github.com/repos/ome/ome-files-cpp/issues/events{/number}","events_url":"https://api.github.com/repos/ome/ome-files-cpp/events","assignees_url":"https://api.github.com/repos/ome/ome-files-cpp/assignees{/user}","branches_url":"https://api.github.com/repos/ome/ome-files-cpp/branches{/branch}","tags_url":"https://api.github.com/repos/ome/ome-files-cpp/tags","blobs_url":"https://api.github.com/repos/ome/ome-files-cpp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ome/ome-files-cpp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ome/ome-files-cpp/git/refs{/sha}","trees_url":"https://api.github.com/repos/ome/ome-files-cpp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ome/ome-files-cpp/statuses/{sha}","languages_url":"https://api.github.com/repos/ome/ome-files-cpp/languages","stargazers_url":"https://api.github.com/repos/ome/ome-files-cpp/stargazers","contributors_url":"https://api.github.com/repos/ome/ome-files-cpp/contributors","subscribers_url":"https://api.github.com/repos/ome/ome-files-cpp/subscribers","subscription_url":"https://api.github.com/repos/ome/ome-files-cpp/subscription","commits_url":"https://api.github.com/repos/ome/ome-files-cpp/commits{/sha}","git_commits_url":"https://api.github.com/repos/ome/ome-files-cpp/git/commits{/sha}","comments_url":"https://api.github.com/repos/ome/ome-files-cpp/comments{/number}","issue_comment_url":"https://api.github.com/repos/ome/ome-files-cpp/issues/comments{/number}","contents_url":"https://api.github.com/repos/ome/ome-files-cpp/contents/{+path}","compare_url":"https://api.github.com/repos/ome/ome-files-cpp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ome/ome-files-cpp/merges","archive_url":"https://api.github.com/repos/ome/ome-files-cpp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ome/ome-files-cpp/downloads","issues_url":"https://api.github.com/repos/ome/ome-files-cpp/issues{/number}","pulls_url":"https://api.github.com/repos/ome/ome-files-cpp/pulls{/number}","milestones_url":"https://api.github.com/repos/ome/ome-files-cpp/milestones{/number}","notifications_url":"https://api.github.com/repos/ome/ome-files-cpp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ome/ome-files-cpp/labels{/name}","releases_url":"https://api.github.com/repos/ome/ome-files-cpp/releases{/id}","deployments_url":"https://api.github.com/repos/ome/ome-files-cpp/deployments","created_at":"2016-02-15T22:29:24Z","updated_at":"2016-10-28T20:28:30Z","pushed_at":"2016-12-20T15:30:56Z","git_url":"git://github.com/ome/ome-files-cpp.git","ssh_url":"git@github.com:ome/ome-files-cpp.git","clone_url":"https://github.com/ome/ome-files-cpp.git","svn_url":"https://github.com/ome/ome-files-cpp","homepage":"","size":2413,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ome/ome-files-cpp/pulls/41"},"html":{"href":"https://github.com/ome/ome-files-cpp/pull/41"},"issue":{"href":"https://api.github.com/repos/ome/ome-files-cpp/issues/41"},"comments":{"href":"https://api.github.com/repos/ome/ome-files-cpp/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/ome/ome-files-cpp/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/ome/ome-files-cpp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ome/ome-files-cpp/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/ome/ome-files-cpp/statuses/401962257d51f6f74103cdb4174feef9f71bab64"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":3,"review_comments":0,"commits":4,"additions":161,"deletions":0,"changed_files":2}}
{"actor":{"display_login":"simleo"}}