{"action":"opened","number":272,"pull_request":{"url":"https://api.github.com/repos/ClimateImpactLab/DataFS/pulls/272","id":118330593,"html_url":"https://github.com/ClimateImpactLab/DataFS/pull/272","diff_url":"https://github.com/ClimateImpactLab/DataFS/pull/272.diff","patch_url":"https://github.com/ClimateImpactLab/DataFS/pull/272.patch","issue_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/issues/272","number":272,"state":"open","locked":false,"title":"remove_dir implemented through `archive.delete()`","user":{"login":"jgerardsimcock","id":6101444,"avatar_url":"https://avatars2.githubusercontent.com/u/6101444?v=3","gravatar_id":"","url":"https://api.github.com/users/jgerardsimcock","html_url":"https://github.com/jgerardsimcock","followers_url":"https://api.github.com/users/jgerardsimcock/followers","following_url":"https://api.github.com/users/jgerardsimcock/following{/other_user}","gists_url":"https://api.github.com/users/jgerardsimcock/gists{/gist_id}","starred_url":"https://api.github.com/users/jgerardsimcock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgerardsimcock/subscriptions","organizations_url":"https://api.github.com/users/jgerardsimcock/orgs","repos_url":"https://api.github.com/users/jgerardsimcock/repos","events_url":"https://api.github.com/users/jgerardsimcock/events{/privacy}","received_events_url":"https://api.github.com/users/jgerardsimcock/received_events","type":"User","site_admin":false},"body":" - [x] closes #212\r\n - [x] tests added / passed: tests not added.  \r\n - [x] docs reflect changes\r\n - [x] passes ``flake8 datafs examples tests docs``\r\n - [x] whatsnew entry\r\n\r\nTests updated to remove old file artifacts in testing databases. New tests added under `tests/test_removemdir.py`\r\n\r\nThis pr is an implementation of the pyfilesystem `'fs.removedir` called via a new implementation of `archive.delete`. Previously, `archive.delete` removed the archive record from the manager as well as removing any version-name file objects from the file system. They did not, however, remove the top-level namespace. For example, previously, if you had an archive with name `tas/global` with version `0.0.1`, and `0.0.2` and you called\r\n\r\n `api.delete_archive('tas/global')`  it would delete file objects `tas/global/0.0.1` and `tas/global/0.02` from the file system. However, from the following, you can see that our archive still exists in file system name space. \r\n\r\n```\r\nIn [1]: api.listdir('tas/global') \r\nOut [1]: []\r\n\r\nIn [2]: api.listdir('tas')\r\nOut [2] ['global']\r\n\r\n```\r\n\r\nPR Implementation of delete\r\n---------------------------------\r\n\r\n```\r\nIn [1]: api.listdir('tas/global')\r\nOut [1]: [u'0.0.1', u'0.0.2']\r\n\r\nIn [2]: api.listdir('tas/regional')\r\nOut [2]: [u'0.0.1', u'0.0.2']\r\n\r\nIn [3]: api.listdir('tas')\r\nOut [3]: [u'regional', u'global', u'adm1', u'adm2']\r\n\r\nIn [3]: tasg = api.get_archive('tas/global')\r\n\r\nIn [4]: tasg.delete()\r\n\r\nIn [ 5]: api.get_archive('tas/global')\r\n...\r\n\r\nKeyError: 'Archive \"tas/global\" not found'\r\n\r\nIn [6]: api.listdir('tas')\r\nOut [6]: [u'regional', u'adm1', u'adm2']\r\n\r\nIn [7]: api.delete_archive('tas/regional')\r\n\r\nIn [8]: api.listdir('tas')\r\nOut [8]: [u'adm1', u'adm2']\r\n\r\nIn [9]: api.get_archive('tas/regional')\r\n...\r\n\r\nKeyError: 'Archive \"tas/regional\" not found'\r\n\r\n```\r\n\r\n","created_at":"2017-04-30T23:01:43Z","updated_at":"2017-04-30T23:01:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/pulls/272/commits","review_comments_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/pulls/272/comments","review_comment_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/issues/272/comments","statuses_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/statuses/0029891ccfa656a9c44079ace8b9046331e2ed38","head":{"label":"ClimateImpactLab:remove_dir","ref":"remove_dir","sha":"0029891ccfa656a9c44079ace8b9046331e2ed38","user":{"login":"ClimateImpactLab","id":17581376,"avatar_url":"https://avatars0.githubusercontent.com/u/17581376?v=3","gravatar_id":"","url":"https://api.github.com/users/ClimateImpactLab","html_url":"https://github.com/ClimateImpactLab","followers_url":"https://api.github.com/users/ClimateImpactLab/followers","following_url":"https://api.github.com/users/ClimateImpactLab/following{/other_user}","gists_url":"https://api.github.com/users/ClimateImpactLab/gists{/gist_id}","starred_url":"https://api.github.com/users/ClimateImpactLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClimateImpactLab/subscriptions","organizations_url":"https://api.github.com/users/ClimateImpactLab/orgs","repos_url":"https://api.github.com/users/ClimateImpactLab/repos","events_url":"https://api.github.com/users/ClimateImpactLab/events{/privacy}","received_events_url":"https://api.github.com/users/ClimateImpactLab/received_events","type":"Organization","site_admin":false},"repo":{"id":74184663,"name":"DataFS","full_name":"ClimateImpactLab/DataFS","owner":{"login":"ClimateImpactLab","id":17581376,"avatar_url":"https://avatars0.githubusercontent.com/u/17581376?v=3","gravatar_id":"","url":"https://api.github.com/users/ClimateImpactLab","html_url":"https://github.com/ClimateImpactLab","followers_url":"https://api.github.com/users/ClimateImpactLab/followers","following_url":"https://api.github.com/users/ClimateImpactLab/following{/other_user}","gists_url":"https://api.github.com/users/ClimateImpactLab/gists{/gist_id}","starred_url":"https://api.github.com/users/ClimateImpactLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClimateImpactLab/subscriptions","organizations_url":"https://api.github.com/users/ClimateImpactLab/orgs","repos_url":"https://api.github.com/users/ClimateImpactLab/repos","events_url":"https://api.github.com/users/ClimateImpactLab/events{/privacy}","received_events_url":"https://api.github.com/users/ClimateImpactLab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ClimateImpactLab/DataFS","description":"An abstraction layer for data storage systems","fork":false,"url":"https://api.github.com/repos/ClimateImpactLab/DataFS","forks_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/forks","keys_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/teams","hooks_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/hooks","issue_events_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/issues/events{/number}","events_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/events","assignees_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/assignees{/user}","branches_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/branches{/branch}","tags_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/tags","blobs_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/statuses/{sha}","languages_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/languages","stargazers_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/stargazers","contributors_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/contributors","subscribers_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/subscribers","subscription_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/subscription","commits_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/contents/{+path}","compare_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/merges","archive_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/downloads","issues_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/issues{/number}","pulls_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/pulls{/number}","milestones_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/milestones{/number}","notifications_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/labels{/name}","releases_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/releases{/id}","deployments_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/deployments","created_at":"2016-11-19T03:32:09Z","updated_at":"2017-01-27T16:41:26Z","pushed_at":"2017-04-30T22:28:39Z","git_url":"git://github.com/ClimateImpactLab/DataFS.git","ssh_url":"git@github.com:ClimateImpactLab/DataFS.git","clone_url":"https://github.com/ClimateImpactLab/DataFS.git","svn_url":"https://github.com/ClimateImpactLab/DataFS","homepage":"","size":893,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":44,"forks":2,"open_issues":44,"watchers":1,"default_branch":"master"}},"base":{"label":"ClimateImpactLab:master","ref":"master","sha":"22fa9026ad79b8bfe6320eb70080c1abd7dfae93","user":{"login":"ClimateImpactLab","id":17581376,"avatar_url":"https://avatars0.githubusercontent.com/u/17581376?v=3","gravatar_id":"","url":"https://api.github.com/users/ClimateImpactLab","html_url":"https://github.com/ClimateImpactLab","followers_url":"https://api.github.com/users/ClimateImpactLab/followers","following_url":"https://api.github.com/users/ClimateImpactLab/following{/other_user}","gists_url":"https://api.github.com/users/ClimateImpactLab/gists{/gist_id}","starred_url":"https://api.github.com/users/ClimateImpactLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClimateImpactLab/subscriptions","organizations_url":"https://api.github.com/users/ClimateImpactLab/orgs","repos_url":"https://api.github.com/users/ClimateImpactLab/repos","events_url":"https://api.github.com/users/ClimateImpactLab/events{/privacy}","received_events_url":"https://api.github.com/users/ClimateImpactLab/received_events","type":"Organization","site_admin":false},"repo":{"id":74184663,"name":"DataFS","full_name":"ClimateImpactLab/DataFS","owner":{"login":"ClimateImpactLab","id":17581376,"avatar_url":"https://avatars0.githubusercontent.com/u/17581376?v=3","gravatar_id":"","url":"https://api.github.com/users/ClimateImpactLab","html_url":"https://github.com/ClimateImpactLab","followers_url":"https://api.github.com/users/ClimateImpactLab/followers","following_url":"https://api.github.com/users/ClimateImpactLab/following{/other_user}","gists_url":"https://api.github.com/users/ClimateImpactLab/gists{/gist_id}","starred_url":"https://api.github.com/users/ClimateImpactLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClimateImpactLab/subscriptions","organizations_url":"https://api.github.com/users/ClimateImpactLab/orgs","repos_url":"https://api.github.com/users/ClimateImpactLab/repos","events_url":"https://api.github.com/users/ClimateImpactLab/events{/privacy}","received_events_url":"https://api.github.com/users/ClimateImpactLab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ClimateImpactLab/DataFS","description":"An abstraction layer for data storage systems","fork":false,"url":"https://api.github.com/repos/ClimateImpactLab/DataFS","forks_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/forks","keys_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/teams","hooks_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/hooks","issue_events_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/issues/events{/number}","events_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/events","assignees_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/assignees{/user}","branches_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/branches{/branch}","tags_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/tags","blobs_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/git/refs{/sha}","trees_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/statuses/{sha}","languages_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/languages","stargazers_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/stargazers","contributors_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/contributors","subscribers_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/subscribers","subscription_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/subscription","commits_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/commits{/sha}","git_commits_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/git/commits{/sha}","comments_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/comments{/number}","issue_comment_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/issues/comments{/number}","contents_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/contents/{+path}","compare_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/merges","archive_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/downloads","issues_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/issues{/number}","pulls_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/pulls{/number}","milestones_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/milestones{/number}","notifications_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/labels{/name}","releases_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/releases{/id}","deployments_url":"https://api.github.com/repos/ClimateImpactLab/DataFS/deployments","created_at":"2016-11-19T03:32:09Z","updated_at":"2017-01-27T16:41:26Z","pushed_at":"2017-04-30T22:28:39Z","git_url":"git://github.com/ClimateImpactLab/DataFS.git","ssh_url":"git@github.com:ClimateImpactLab/DataFS.git","clone_url":"https://github.com/ClimateImpactLab/DataFS.git","svn_url":"https://github.com/ClimateImpactLab/DataFS","homepage":"","size":893,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":44,"forks":2,"open_issues":44,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ClimateImpactLab/DataFS/pulls/272"},"html":{"href":"https://github.com/ClimateImpactLab/DataFS/pull/272"},"issue":{"href":"https://api.github.com/repos/ClimateImpactLab/DataFS/issues/272"},"comments":{"href":"https://api.github.com/repos/ClimateImpactLab/DataFS/issues/272/comments"},"review_comments":{"href":"https://api.github.com/repos/ClimateImpactLab/DataFS/pulls/272/comments"},"review_comment":{"href":"https://api.github.com/repos/ClimateImpactLab/DataFS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ClimateImpactLab/DataFS/pulls/272/commits"},"statuses":{"href":"https://api.github.com/repos/ClimateImpactLab/DataFS/statuses/0029891ccfa656a9c44079ace8b9046331e2ed38"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":186,"deletions":0,"changed_files":2}}
{"actor":{"display_login":"jgerardsimcock"}}