{"action":"created","issue":{"url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/issues/41","repository_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer","labels_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/issues/41/comments","events_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/issues/41/events","html_url":"https://github.com/artefactual-labs/mets-reader-writer/issues/41","id":311226058,"number":41,"title":"Problem: Tree or serialize() required as an arg to validate functions when METSDocument would be a nicer abstraction","user":{"login":"ross-spencer","id":1880412,"avatar_url":"https://avatars1.githubusercontent.com/u/1880412?v=4","gravatar_id":"","url":"https://api.github.com/users/ross-spencer","html_url":"https://github.com/ross-spencer","followers_url":"https://api.github.com/users/ross-spencer/followers","following_url":"https://api.github.com/users/ross-spencer/following{/other_user}","gists_url":"https://api.github.com/users/ross-spencer/gists{/gist_id}","starred_url":"https://api.github.com/users/ross-spencer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ross-spencer/subscriptions","organizations_url":"https://api.github.com/users/ross-spencer/orgs","repos_url":"https://api.github.com/users/ross-spencer/repos","events_url":"https://api.github.com/users/ross-spencer/events{/privacy}","received_events_url":"https://api.github.com/users/ross-spencer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-04T13:18:27Z","updated_at":"2018-04-09T19:10:05Z","closed_at":null,"author_association":"MEMBER","body":"Here, and a few other places we're asked to pass a `.tree` argument as `mets_doc`, in this case, to validate the document:\r\n```\r\ndef xsd_validate(mets_doc, xmlschema=METS_XSD_PATH):\r\n    xmlschema = get_xmlschema(xmlschema, mets_doc)\r\n    is_valid = xmlschema.validate(mets_doc)\r\n    error_log = xmlschema.error_log\r\n    return is_valid, error_log\r\n```\r\nI wonder if the METSDocument itself wouldn't be a nicer abstraction to be passing around functions such as this when using this utility?"},"comment":{"url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/issues/comments/379861227","html_url":"https://github.com/artefactual-labs/mets-reader-writer/issues/41#issuecomment-379861227","issue_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/issues/41","id":379861227,"user":{"login":"jrwdunham","id":2504271,"avatar_url":"https://avatars1.githubusercontent.com/u/2504271?v=4","gravatar_id":"","url":"https://api.github.com/users/jrwdunham","html_url":"https://github.com/jrwdunham","followers_url":"https://api.github.com/users/jrwdunham/followers","following_url":"https://api.github.com/users/jrwdunham/following{/other_user}","gists_url":"https://api.github.com/users/jrwdunham/gists{/gist_id}","starred_url":"https://api.github.com/users/jrwdunham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrwdunham/subscriptions","organizations_url":"https://api.github.com/users/jrwdunham/orgs","repos_url":"https://api.github.com/users/jrwdunham/repos","events_url":"https://api.github.com/users/jrwdunham/events{/privacy}","received_events_url":"https://api.github.com/users/jrwdunham/received_events","type":"User","site_admin":false},"created_at":"2018-04-09T19:10:05Z","updated_at":"2018-04-09T19:10:05Z","author_association":"CONTRIBUTOR","body":"@ross-spencer I agree. In fact, I think even nicer would be making `.validate()` an instance method of `METSDocument`."}}
{"actor":{"display_login":"jrwdunham"}}