{"action":"created","issue":{"url":"https://api.github.com/repos/wtsi-hgi/python-common/issues/9","repository_url":"https://api.github.com/repos/wtsi-hgi/python-common","labels_url":"https://api.github.com/repos/wtsi-hgi/python-common/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/wtsi-hgi/python-common/issues/9/comments","events_url":"https://api.github.com/repos/wtsi-hgi/python-common/issues/9/events","html_url":"https://github.com/wtsi-hgi/python-common/pull/9","id":154660311,"number":9,"title":"Added to_dict() for exporting metadata","user":{"login":"colin-nolan","id":1138107,"avatar_url":"https://avatars.githubusercontent.com/u/1138107?v=3","gravatar_id":"","url":"https://api.github.com/users/colin-nolan","html_url":"https://github.com/colin-nolan","followers_url":"https://api.github.com/users/colin-nolan/followers","following_url":"https://api.github.com/users/colin-nolan/following{/other_user}","gists_url":"https://api.github.com/users/colin-nolan/gists{/gist_id}","starred_url":"https://api.github.com/users/colin-nolan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colin-nolan/subscriptions","organizations_url":"https://api.github.com/users/colin-nolan/orgs","repos_url":"https://api.github.com/users/colin-nolan/repos","events_url":"https://api.github.com/users/colin-nolan/events{/privacy}","received_events_url":"https://api.github.com/users/colin-nolan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-13T08:35:18Z","updated_at":"2016-05-13T11:19:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wtsi-hgi/python-common/pulls/9","html_url":"https://github.com/wtsi-hgi/python-common/pull/9","diff_url":"https://github.com/wtsi-hgi/python-common/pull/9.diff","patch_url":"https://github.com/wtsi-hgi/python-common/pull/9.patch"},"body":"I've finally got around to sorting out this repository... I've merged Irina's commits on the `master` branch into the `develop` branch. However, I don't think the functionality in this commit is needed though.\r\n\r\n`Metadata` implements the `Mapping` interface (https://docs.python.org/3/library/collections.abc.html), in addition to having most of the methods defined in `MutableMapping`. It is subsequently nearly exactly the same, functionality, as a `dict` and, in most cases, can be treated in the same way as one.\r\n\r\nIf it is absolutely necessary to have a object of type `dict`, conversion is possible through use of the overloaded `dict` constructor that takes a `Mapping` instance as an argument:\r\n```\r\ndict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs\r\n```\r\ne.g. \r\n```\r\nmetadata_as_dict = dict(metadata)\r\n```\r\n\r\nGiven the alternatives, I don't think the solution in this commit, which exposes a pointer to an internal variable, is required."},"comment":{"url":"https://api.github.com/repos/wtsi-hgi/python-common/issues/comments/219016597","html_url":"https://github.com/wtsi-hgi/python-common/pull/9#issuecomment-219016597","issue_url":"https://api.github.com/repos/wtsi-hgi/python-common/issues/9","id":219016597,"user":{"login":"codecov-io","id":8655789,"avatar_url":"https://avatars.githubusercontent.com/u/8655789?v=3","gravatar_id":"","url":"https://api.github.com/users/codecov-io","html_url":"https://github.com/codecov-io","followers_url":"https://api.github.com/users/codecov-io/followers","following_url":"https://api.github.com/users/codecov-io/following{/other_user}","gists_url":"https://api.github.com/users/codecov-io/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov-io/subscriptions","organizations_url":"https://api.github.com/users/codecov-io/orgs","repos_url":"https://api.github.com/users/codecov-io/repos","events_url":"https://api.github.com/users/codecov-io/events{/privacy}","received_events_url":"https://api.github.com/users/codecov-io/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T11:19:03Z","updated_at":"2016-05-13T11:19:03Z","body":"## [Current coverage][cc-pull] is **91.74%**\n> Merging [#9][cc-pull] into [develop][cc-base-branch] will decrease coverage by **-0.47%**\n\n1. 2 files (not in diff) in `hgicommon` were modified. [more](https://codecov.io/gh/wtsi-hgi/python-common/commit/d9d7822a25fe7ceef9eaa1dac81c260eec60247a/changes?src=pr#686769636F6D6D6F6E) \n  - Hits `-3`\n1. File `...ommon/collections.py` was modified. [more](https://codecov.io/gh/wtsi-hgi/python-common/commit/d9d7822a25fe7ceef9eaa1dac81c260eec60247a/changes?src=pr#686769636F6D6D6F6E2F636F6C6C656374696F6E732E7079) \n  - Misses `0` \n  - Partials `0` \n  - Hits `-3`\n\n```diff\n@@            develop         #9   diff @@\n==========================================\n  Files            12         12          \n  Lines           373        363    -10   \n  Methods           0          0          \n  Messages          0          0          \n  Branches          0          0          \n==========================================\n- Hits            344        333    -11   \n- Misses           29         30     +1   \n  Partials          0          0          \n```\n\n> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [12897b3...d9d7822][cc-compare]\n[cc-base-branch]: https://codecov.io/gh/wtsi-hgi/python-common/branch/develop?src=pr\n[cc-compare]: https://codecov.io/gh/wtsi-hgi/python-common/compare/12897b33dffd120723fb730104c042941115163b...d9d7822a25fe7ceef9eaa1dac81c260eec60247a\n[cc-pull]: https://codecov.io/gh/wtsi-hgi/python-common/pull/9?src=pr"}}