{"action":"created","comment":{"url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/pulls/comments/196060487","pull_request_review_id":129536109,"id":196060487,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjA2MDQ4Nw==","diff_hunk":"@@ -97,26 +101,20 @@ def load_file(self):\n                     # log.logger().info(\"Shapefile path: \" + shapefile_path)\n \n                     # extract date from string","path":"data-import/db_manipulate.py","position":96,"original_position":96,"commit_id":"c795c3fbd830c979350309eea82fe13156ee3482","original_commit_id":"c795c3fbd830c979350309eea82fe13156ee3482","user":{"login":"henhuy","id":17476051,"node_id":"MDQ6VXNlcjE3NDc2MDUx","avatar_url":"https://avatars3.githubusercontent.com/u/17476051?v=4","gravatar_id":"","url":"https://api.github.com/users/henhuy","html_url":"https://github.com/henhuy","followers_url":"https://api.github.com/users/henhuy/followers","following_url":"https://api.github.com/users/henhuy/following{/other_user}","gists_url":"https://api.github.com/users/henhuy/gists{/gist_id}","starred_url":"https://api.github.com/users/henhuy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henhuy/subscriptions","organizations_url":"https://api.github.com/users/henhuy/orgs","repos_url":"https://api.github.com/users/henhuy/repos","events_url":"https://api.github.com/users/henhuy/events{/privacy}","received_events_url":"https://api.github.com/users/henhuy/received_events","type":"User","site_admin":false},"body":"I rewrote this part as it was very specific (windows-system-and path-specific).\r\nAs I understood, you only want to get the date from the directory name?\r\nMy solution works as follows:\r\n1. First I get name of parent directory (holding the date in its name)\r\n1. I make use of _regex_ (`import re`) to find matching pattern starting with '_' and ending with '.gk3'\r\n1. I extract the date string by removing the pattern surroundings","created_at":"2018-06-18T12:36:19Z","updated_at":"2018-06-18T12:48:01Z","html_url":"https://github.com/OpenEnergyPlatform/data-preprocessing/pull/6#discussion_r196060487","pull_request_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/pulls/6","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/pulls/comments/196060487"},"html":{"href":"https://github.com/OpenEnergyPlatform/data-preprocessing/pull/6#discussion_r196060487"},"pull_request":{"href":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/pulls/6","id":195454770,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NDU0Nzcw","html_url":"https://github.com/OpenEnergyPlatform/data-preprocessing/pull/6","diff_url":"https://github.com/OpenEnergyPlatform/data-preprocessing/pull/6.diff","patch_url":"https://github.com/OpenEnergyPlatform/data-preprocessing/pull/6.patch","issue_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/issues/6","number":6,"state":"open","locked":false,"title":"Review-Branch","user":{"login":"henhuy","id":17476051,"node_id":"MDQ6VXNlcjE3NDc2MDUx","avatar_url":"https://avatars3.githubusercontent.com/u/17476051?v=4","gravatar_id":"","url":"https://api.github.com/users/henhuy","html_url":"https://github.com/henhuy","followers_url":"https://api.github.com/users/henhuy/followers","following_url":"https://api.github.com/users/henhuy/following{/other_user}","gists_url":"https://api.github.com/users/henhuy/gists{/gist_id}","starred_url":"https://api.github.com/users/henhuy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henhuy/subscriptions","organizations_url":"https://api.github.com/users/henhuy/orgs","repos_url":"https://api.github.com/users/henhuy/repos","events_url":"https://api.github.com/users/henhuy/events{/privacy}","received_events_url":"https://api.github.com/users/henhuy/received_events","type":"User","site_admin":false},"body":"First review on current pre-processing","created_at":"2018-06-18T08:37:00Z","updated_at":"2018-06-18T12:48:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f98a040ce67ec575b9f9202a640b2a19c61beea5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/pulls/6/commits","review_comments_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/pulls/6/comments","review_comment_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/issues/6/comments","statuses_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/statuses/c795c3fbd830c979350309eea82fe13156ee3482","head":{"label":"henhuy:master","ref":"master","sha":"c795c3fbd830c979350309eea82fe13156ee3482","user":{"login":"henhuy","id":17476051,"node_id":"MDQ6VXNlcjE3NDc2MDUx","avatar_url":"https://avatars3.githubusercontent.com/u/17476051?v=4","gravatar_id":"","url":"https://api.github.com/users/henhuy","html_url":"https://github.com/henhuy","followers_url":"https://api.github.com/users/henhuy/followers","following_url":"https://api.github.com/users/henhuy/following{/other_user}","gists_url":"https://api.github.com/users/henhuy/gists{/gist_id}","starred_url":"https://api.github.com/users/henhuy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henhuy/subscriptions","organizations_url":"https://api.github.com/users/henhuy/orgs","repos_url":"https://api.github.com/users/henhuy/repos","events_url":"https://api.github.com/users/henhuy/events{/privacy}","received_events_url":"https://api.github.com/users/henhuy/received_events","type":"User","site_admin":false},"repo":{"id":137723007,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc3MjMwMDc=","name":"data-preprocessing","full_name":"henhuy/data-preprocessing","owner":{"login":"henhuy","id":17476051,"node_id":"MDQ6VXNlcjE3NDc2MDUx","avatar_url":"https://avatars3.githubusercontent.com/u/17476051?v=4","gravatar_id":"","url":"https://api.github.com/users/henhuy","html_url":"https://github.com/henhuy","followers_url":"https://api.github.com/users/henhuy/followers","following_url":"https://api.github.com/users/henhuy/following{/other_user}","gists_url":"https://api.github.com/users/henhuy/gists{/gist_id}","starred_url":"https://api.github.com/users/henhuy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henhuy/subscriptions","organizations_url":"https://api.github.com/users/henhuy/orgs","repos_url":"https://api.github.com/users/henhuy/repos","events_url":"https://api.github.com/users/henhuy/events{/privacy}","received_events_url":"https://api.github.com/users/henhuy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/henhuy/data-preprocessing","description":"Formatting and import of data. Data and metadata review.","fork":true,"url":"https://api.github.com/repos/henhuy/data-preprocessing","forks_url":"https://api.github.com/repos/henhuy/data-preprocessing/forks","keys_url":"https://api.github.com/repos/henhuy/data-preprocessing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/henhuy/data-preprocessing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/henhuy/data-preprocessing/teams","hooks_url":"https://api.github.com/repos/henhuy/data-preprocessing/hooks","issue_events_url":"https://api.github.com/repos/henhuy/data-preprocessing/issues/events{/number}","events_url":"https://api.github.com/repos/henhuy/data-preprocessing/events","assignees_url":"https://api.github.com/repos/henhuy/data-preprocessing/assignees{/user}","branches_url":"https://api.github.com/repos/henhuy/data-preprocessing/branches{/branch}","tags_url":"https://api.github.com/repos/henhuy/data-preprocessing/tags","blobs_url":"https://api.github.com/repos/henhuy/data-preprocessing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/henhuy/data-preprocessing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/henhuy/data-preprocessing/git/refs{/sha}","trees_url":"https://api.github.com/repos/henhuy/data-preprocessing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/henhuy/data-preprocessing/statuses/{sha}","languages_url":"https://api.github.com/repos/henhuy/data-preprocessing/languages","stargazers_url":"https://api.github.com/repos/henhuy/data-preprocessing/stargazers","contributors_url":"https://api.github.com/repos/henhuy/data-preprocessing/contributors","subscribers_url":"https://api.github.com/repos/henhuy/data-preprocessing/subscribers","subscription_url":"https://api.github.com/repos/henhuy/data-preprocessing/subscription","commits_url":"https://api.github.com/repos/henhuy/data-preprocessing/commits{/sha}","git_commits_url":"https://api.github.com/repos/henhuy/data-preprocessing/git/commits{/sha}","comments_url":"https://api.github.com/repos/henhuy/data-preprocessing/comments{/number}","issue_comment_url":"https://api.github.com/repos/henhuy/data-preprocessing/issues/comments{/number}","contents_url":"https://api.github.com/repos/henhuy/data-preprocessing/contents/{+path}","compare_url":"https://api.github.com/repos/henhuy/data-preprocessing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/henhuy/data-preprocessing/merges","archive_url":"https://api.github.com/repos/henhuy/data-preprocessing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/henhuy/data-preprocessing/downloads","issues_url":"https://api.github.com/repos/henhuy/data-preprocessing/issues{/number}","pulls_url":"https://api.github.com/repos/henhuy/data-preprocessing/pulls{/number}","milestones_url":"https://api.github.com/repos/henhuy/data-preprocessing/milestones{/number}","notifications_url":"https://api.github.com/repos/henhuy/data-preprocessing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/henhuy/data-preprocessing/labels{/name}","releases_url":"https://api.github.com/repos/henhuy/data-preprocessing/releases{/id}","deployments_url":"https://api.github.com/repos/henhuy/data-preprocessing/deployments","created_at":"2018-06-18T07:41:54Z","updated_at":"2018-06-18T12:24:39Z","pushed_at":"2018-06-18T12:24:38Z","git_url":"git://github.com/henhuy/data-preprocessing.git","ssh_url":"git@github.com:henhuy/data-preprocessing.git","clone_url":"https://github.com/henhuy/data-preprocessing.git","svn_url":"https://github.com/henhuy/data-preprocessing","homepage":"","size":74,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"OpenEnergyPlatform:master","ref":"master","sha":"91212cbd77aaa550af433bcad1bbf5f3bb4c5add","user":{"login":"OpenEnergyPlatform","id":37101913,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MTAxOTEz","avatar_url":"https://avatars1.githubusercontent.com/u/37101913?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenEnergyPlatform","html_url":"https://github.com/OpenEnergyPlatform","followers_url":"https://api.github.com/users/OpenEnergyPlatform/followers","following_url":"https://api.github.com/users/OpenEnergyPlatform/following{/other_user}","gists_url":"https://api.github.com/users/OpenEnergyPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenEnergyPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenEnergyPlatform/subscriptions","organizations_url":"https://api.github.com/users/OpenEnergyPlatform/orgs","repos_url":"https://api.github.com/users/OpenEnergyPlatform/repos","events_url":"https://api.github.com/users/OpenEnergyPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/OpenEnergyPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":131572188,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE1NzIxODg=","name":"data-preprocessing","full_name":"OpenEnergyPlatform/data-preprocessing","owner":{"login":"OpenEnergyPlatform","id":37101913,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MTAxOTEz","avatar_url":"https://avatars1.githubusercontent.com/u/37101913?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenEnergyPlatform","html_url":"https://github.com/OpenEnergyPlatform","followers_url":"https://api.github.com/users/OpenEnergyPlatform/followers","following_url":"https://api.github.com/users/OpenEnergyPlatform/following{/other_user}","gists_url":"https://api.github.com/users/OpenEnergyPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenEnergyPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenEnergyPlatform/subscriptions","organizations_url":"https://api.github.com/users/OpenEnergyPlatform/orgs","repos_url":"https://api.github.com/users/OpenEnergyPlatform/repos","events_url":"https://api.github.com/users/OpenEnergyPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/OpenEnergyPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenEnergyPlatform/data-preprocessing","description":"Formatting and import of data. Data and metadata review.","fork":false,"url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing","forks_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/forks","keys_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/teams","hooks_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/hooks","issue_events_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/issues/events{/number}","events_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/events","assignees_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/assignees{/user}","branches_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/branches{/branch}","tags_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/tags","blobs_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/languages","stargazers_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/stargazers","contributors_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/contributors","subscribers_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/subscribers","subscription_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/subscription","commits_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/contents/{+path}","compare_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/merges","archive_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/downloads","issues_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/issues{/number}","pulls_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/labels{/name}","releases_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/releases{/id}","deployments_url":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/deployments","created_at":"2018-04-30T08:27:30Z","updated_at":"2018-06-18T09:19:19Z","pushed_at":"2018-06-18T12:26:10Z","git_url":"git://github.com/OpenEnergyPlatform/data-preprocessing.git","ssh_url":"git@github.com:OpenEnergyPlatform/data-preprocessing.git","clone_url":"https://github.com/OpenEnergyPlatform/data-preprocessing.git","svn_url":"https://github.com/OpenEnergyPlatform/data-preprocessing","homepage":"","size":64,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":7,"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":1,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/pulls/6"},"html":{"href":"https://github.com/OpenEnergyPlatform/data-preprocessing/pull/6"},"issue":{"href":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/issues/6"},"comments":{"href":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/OpenEnergyPlatform/data-preprocessing/statuses/c795c3fbd830c979350309eea82fe13156ee3482"}},"author_association":"NONE"}}
{"actor":{"display_login":"henhuy"}}