{"action":"created","comment":{"url":"https://api.github.com/repos/njoy/metaconfigure/pulls/comments/84403807","pull_request_review_id":5184966,"id":84403807,"diff_hunk":"@@ -0,0 +1,75 @@\n+#! /usr/bin/env python\n+\"\"\"\n+A script to generate a flat subproject directory from a tree of dependency directories\n+\"\"\"\n+import os\n+import subprocess\n+import textwrap\n+\n+def dependency_directory():\n+    \"\"\"\n+    A function isolating the path specification to the project's dependency directory\n+    \"\"\"\n+    return os.path.join( os.getcwd(), \"dependencies\" )\n+\n+def clone_submodule( relative_path ):\n+    \"\"\"\n+    A function to clone a git submodule\n+    \"\"\"\n+    print( textwrap.dedent(\n+      \"\"\"\n+      ----------------------------------------\n+      Fetching {relative_path}...\n+      ----------------------------------------\n+      \"\"\".format( relative_path = relative_path ) ) )\n+    invocation = [ \"git\", \"submodule\", \"update\", \"-q\",\"--init\", \"--\", relative_path ]\n+    if os.name == \"nt\":\n+        invocation.insert( 0, \"powershell\" )\n+\n+    clone = subprocess.Popen( invocation )\n+    clone.communicate()\n+\n+def update_repository():\n+    \"\"\"\n+    A function to update a submodule to lastest commit of the master branch\n+    \"\"\"\n+    print(\"Updating to master branch...\")\n+    print(\"\")\n+    invocation = [\"git\", \"pull\", \"-q\", \"origin\", \"master\"]\n+    if os.name == \"nt\":\n+        invocation.insert( 0, \"powershell\" )\n+    update = subprocess.Popen( invocation )\n+    update.communicate()\n+  \n+def traverse_dependencies( destination, traversed ):\n+    \"\"\"\n+    Clone and update dependencies uniquely and collect links to dependency projects\n+    in a destination folder\n+    \"\"\"\n+    if not os.path.isdir( dependency_directory() ):\n+        return\n+    \n+    os.chdir( dependency_directory() )\n+\n+    for dependency in os.listdir(os.getcwd()) :","path":"fetch_subprojects.py","position":54,"original_position":54,"commit_id":"dda0e93a7687f321e661e4ea20f2938328d51ce5","original_commit_id":"dda0e93a7687f321e661e4ea20f2938328d51ce5","user":{"login":"jlconlin","id":1275437,"avatar_url":"https://avatars.githubusercontent.com/u/1275437?v=3","gravatar_id":"","url":"https://api.github.com/users/jlconlin","html_url":"https://github.com/jlconlin","followers_url":"https://api.github.com/users/jlconlin/followers","following_url":"https://api.github.com/users/jlconlin/following{/other_user}","gists_url":"https://api.github.com/users/jlconlin/gists{/gist_id}","starred_url":"https://api.github.com/users/jlconlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlconlin/subscriptions","organizations_url":"https://api.github.com/users/jlconlin/orgs","repos_url":"https://api.github.com/users/jlconlin/repos","events_url":"https://api.github.com/users/jlconlin/events{/privacy}","received_events_url":"https://api.github.com/users/jlconlin/received_events","type":"User","site_admin":false},"body":"It seems like this would be a good place for [`os.walk(...)`](https://docs.python.org/3/library/os.html#os.walk). Perhaps I'm not understanding it right.","created_at":"2016-10-21T00:56:59Z","updated_at":"2016-10-21T00:58:23Z","html_url":"https://github.com/njoy/metaconfigure/pull/2#discussion_r84403807","pull_request_url":"https://api.github.com/repos/njoy/metaconfigure/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/njoy/metaconfigure/pulls/comments/84403807"},"html":{"href":"https://github.com/njoy/metaconfigure/pull/2#discussion_r84403807"},"pull_request":{"href":"https://api.github.com/repos/njoy/metaconfigure/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/njoy/metaconfigure/pulls/2","id":90246166,"html_url":"https://github.com/njoy/metaconfigure/pull/2","diff_url":"https://github.com/njoy/metaconfigure/pull/2.diff","patch_url":"https://github.com/njoy/metaconfigure/pull/2.patch","issue_url":"https://api.github.com/repos/njoy/metaconfigure/issues/2","number":2,"state":"open","locked":false,"title":"preparing for subtree conversion","user":{"login":"apmccartney","id":3707548,"avatar_url":"https://avatars.githubusercontent.com/u/3707548?v=3","gravatar_id":"","url":"https://api.github.com/users/apmccartney","html_url":"https://github.com/apmccartney","followers_url":"https://api.github.com/users/apmccartney/followers","following_url":"https://api.github.com/users/apmccartney/following{/other_user}","gists_url":"https://api.github.com/users/apmccartney/gists{/gist_id}","starred_url":"https://api.github.com/users/apmccartney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apmccartney/subscriptions","organizations_url":"https://api.github.com/users/apmccartney/orgs","repos_url":"https://api.github.com/users/apmccartney/repos","events_url":"https://api.github.com/users/apmccartney/events{/privacy}","received_events_url":"https://api.github.com/users/apmccartney/received_events","type":"User","site_admin":false},"body":"updates style of fetch script and creates a python package for metaconfiguration tasks. To be used as a subtree in other projects.\r\n\r\nadvantages\r\n+ fetch_subprojects script now lives in a single place.\r\n+ user calls to fetch_subprojects are now unecessary (handled by cmake script)\r\n+ cmake scripts can be regenerated without leaving the source tree\r\n\r\ndisadvantages\r\n+ metaconfigure directory cannot be hidden directory in parent projects.","created_at":"2016-10-20T17:32:38Z","updated_at":"2016-10-21T00:58:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c515478e0434e1c36587897e0bb9db3e636bf71b","assignee":{"login":"jlconlin","id":1275437,"avatar_url":"https://avatars.githubusercontent.com/u/1275437?v=3","gravatar_id":"","url":"https://api.github.com/users/jlconlin","html_url":"https://github.com/jlconlin","followers_url":"https://api.github.com/users/jlconlin/followers","following_url":"https://api.github.com/users/jlconlin/following{/other_user}","gists_url":"https://api.github.com/users/jlconlin/gists{/gist_id}","starred_url":"https://api.github.com/users/jlconlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlconlin/subscriptions","organizations_url":"https://api.github.com/users/jlconlin/orgs","repos_url":"https://api.github.com/users/jlconlin/repos","events_url":"https://api.github.com/users/jlconlin/events{/privacy}","received_events_url":"https://api.github.com/users/jlconlin/received_events","type":"User","site_admin":false},"assignees":[{"login":"jlconlin","id":1275437,"avatar_url":"https://avatars.githubusercontent.com/u/1275437?v=3","gravatar_id":"","url":"https://api.github.com/users/jlconlin","html_url":"https://github.com/jlconlin","followers_url":"https://api.github.com/users/jlconlin/followers","following_url":"https://api.github.com/users/jlconlin/following{/other_user}","gists_url":"https://api.github.com/users/jlconlin/gists{/gist_id}","starred_url":"https://api.github.com/users/jlconlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlconlin/subscriptions","organizations_url":"https://api.github.com/users/jlconlin/orgs","repos_url":"https://api.github.com/users/jlconlin/repos","events_url":"https://api.github.com/users/jlconlin/events{/privacy}","received_events_url":"https://api.github.com/users/jlconlin/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/njoy/metaconfigure/pulls/2/commits","review_comments_url":"https://api.github.com/repos/njoy/metaconfigure/pulls/2/comments","review_comment_url":"https://api.github.com/repos/njoy/metaconfigure/pulls/comments{/number}","comments_url":"https://api.github.com/repos/njoy/metaconfigure/issues/2/comments","statuses_url":"https://api.github.com/repos/njoy/metaconfigure/statuses/dda0e93a7687f321e661e4ea20f2938328d51ce5","head":{"label":"njoy:feature/modularize","ref":"feature/modularize","sha":"dda0e93a7687f321e661e4ea20f2938328d51ce5","user":{"login":"njoy","id":17747175,"avatar_url":"https://avatars.githubusercontent.com/u/17747175?v=3","gravatar_id":"","url":"https://api.github.com/users/njoy","html_url":"https://github.com/njoy","followers_url":"https://api.github.com/users/njoy/followers","following_url":"https://api.github.com/users/njoy/following{/other_user}","gists_url":"https://api.github.com/users/njoy/gists{/gist_id}","starred_url":"https://api.github.com/users/njoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njoy/subscriptions","organizations_url":"https://api.github.com/users/njoy/orgs","repos_url":"https://api.github.com/users/njoy/repos","events_url":"https://api.github.com/users/njoy/events{/privacy}","received_events_url":"https://api.github.com/users/njoy/received_events","type":"Organization","site_admin":false},"repo":{"id":69891567,"name":"metaconfigure","full_name":"njoy/metaconfigure","owner":{"login":"njoy","id":17747175,"avatar_url":"https://avatars.githubusercontent.com/u/17747175?v=3","gravatar_id":"","url":"https://api.github.com/users/njoy","html_url":"https://github.com/njoy","followers_url":"https://api.github.com/users/njoy/followers","following_url":"https://api.github.com/users/njoy/following{/other_user}","gists_url":"https://api.github.com/users/njoy/gists{/gist_id}","starred_url":"https://api.github.com/users/njoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njoy/subscriptions","organizations_url":"https://api.github.com/users/njoy/orgs","repos_url":"https://api.github.com/users/njoy/repos","events_url":"https://api.github.com/users/njoy/events{/privacy}","received_events_url":"https://api.github.com/users/njoy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/njoy/metaconfigure","description":"python scripts assisting in the generation of build system configuration files for NJOY21 projects","fork":false,"url":"https://api.github.com/repos/njoy/metaconfigure","forks_url":"https://api.github.com/repos/njoy/metaconfigure/forks","keys_url":"https://api.github.com/repos/njoy/metaconfigure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/njoy/metaconfigure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/njoy/metaconfigure/teams","hooks_url":"https://api.github.com/repos/njoy/metaconfigure/hooks","issue_events_url":"https://api.github.com/repos/njoy/metaconfigure/issues/events{/number}","events_url":"https://api.github.com/repos/njoy/metaconfigure/events","assignees_url":"https://api.github.com/repos/njoy/metaconfigure/assignees{/user}","branches_url":"https://api.github.com/repos/njoy/metaconfigure/branches{/branch}","tags_url":"https://api.github.com/repos/njoy/metaconfigure/tags","blobs_url":"https://api.github.com/repos/njoy/metaconfigure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/njoy/metaconfigure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/njoy/metaconfigure/git/refs{/sha}","trees_url":"https://api.github.com/repos/njoy/metaconfigure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/njoy/metaconfigure/statuses/{sha}","languages_url":"https://api.github.com/repos/njoy/metaconfigure/languages","stargazers_url":"https://api.github.com/repos/njoy/metaconfigure/stargazers","contributors_url":"https://api.github.com/repos/njoy/metaconfigure/contributors","subscribers_url":"https://api.github.com/repos/njoy/metaconfigure/subscribers","subscription_url":"https://api.github.com/repos/njoy/metaconfigure/subscription","commits_url":"https://api.github.com/repos/njoy/metaconfigure/commits{/sha}","git_commits_url":"https://api.github.com/repos/njoy/metaconfigure/git/commits{/sha}","comments_url":"https://api.github.com/repos/njoy/metaconfigure/comments{/number}","issue_comment_url":"https://api.github.com/repos/njoy/metaconfigure/issues/comments{/number}","contents_url":"https://api.github.com/repos/njoy/metaconfigure/contents/{+path}","compare_url":"https://api.github.com/repos/njoy/metaconfigure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/njoy/metaconfigure/merges","archive_url":"https://api.github.com/repos/njoy/metaconfigure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/njoy/metaconfigure/downloads","issues_url":"https://api.github.com/repos/njoy/metaconfigure/issues{/number}","pulls_url":"https://api.github.com/repos/njoy/metaconfigure/pulls{/number}","milestones_url":"https://api.github.com/repos/njoy/metaconfigure/milestones{/number}","notifications_url":"https://api.github.com/repos/njoy/metaconfigure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/njoy/metaconfigure/labels{/name}","releases_url":"https://api.github.com/repos/njoy/metaconfigure/releases{/id}","deployments_url":"https://api.github.com/repos/njoy/metaconfigure/deployments","created_at":"2016-10-03T17:00:31Z","updated_at":"2016-10-03T17:11:25Z","pushed_at":"2016-10-20T17:32:38Z","git_url":"git://github.com/njoy/metaconfigure.git","ssh_url":"git@github.com:njoy/metaconfigure.git","clone_url":"https://github.com/njoy/metaconfigure.git","svn_url":"https://github.com/njoy/metaconfigure","homepage":null,"size":16,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"njoy:master","ref":"master","sha":"6aa6af174a512740f203058a2ecf3c0ad64aef15","user":{"login":"njoy","id":17747175,"avatar_url":"https://avatars.githubusercontent.com/u/17747175?v=3","gravatar_id":"","url":"https://api.github.com/users/njoy","html_url":"https://github.com/njoy","followers_url":"https://api.github.com/users/njoy/followers","following_url":"https://api.github.com/users/njoy/following{/other_user}","gists_url":"https://api.github.com/users/njoy/gists{/gist_id}","starred_url":"https://api.github.com/users/njoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njoy/subscriptions","organizations_url":"https://api.github.com/users/njoy/orgs","repos_url":"https://api.github.com/users/njoy/repos","events_url":"https://api.github.com/users/njoy/events{/privacy}","received_events_url":"https://api.github.com/users/njoy/received_events","type":"Organization","site_admin":false},"repo":{"id":69891567,"name":"metaconfigure","full_name":"njoy/metaconfigure","owner":{"login":"njoy","id":17747175,"avatar_url":"https://avatars.githubusercontent.com/u/17747175?v=3","gravatar_id":"","url":"https://api.github.com/users/njoy","html_url":"https://github.com/njoy","followers_url":"https://api.github.com/users/njoy/followers","following_url":"https://api.github.com/users/njoy/following{/other_user}","gists_url":"https://api.github.com/users/njoy/gists{/gist_id}","starred_url":"https://api.github.com/users/njoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njoy/subscriptions","organizations_url":"https://api.github.com/users/njoy/orgs","repos_url":"https://api.github.com/users/njoy/repos","events_url":"https://api.github.com/users/njoy/events{/privacy}","received_events_url":"https://api.github.com/users/njoy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/njoy/metaconfigure","description":"python scripts assisting in the generation of build system configuration files for NJOY21 projects","fork":false,"url":"https://api.github.com/repos/njoy/metaconfigure","forks_url":"https://api.github.com/repos/njoy/metaconfigure/forks","keys_url":"https://api.github.com/repos/njoy/metaconfigure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/njoy/metaconfigure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/njoy/metaconfigure/teams","hooks_url":"https://api.github.com/repos/njoy/metaconfigure/hooks","issue_events_url":"https://api.github.com/repos/njoy/metaconfigure/issues/events{/number}","events_url":"https://api.github.com/repos/njoy/metaconfigure/events","assignees_url":"https://api.github.com/repos/njoy/metaconfigure/assignees{/user}","branches_url":"https://api.github.com/repos/njoy/metaconfigure/branches{/branch}","tags_url":"https://api.github.com/repos/njoy/metaconfigure/tags","blobs_url":"https://api.github.com/repos/njoy/metaconfigure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/njoy/metaconfigure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/njoy/metaconfigure/git/refs{/sha}","trees_url":"https://api.github.com/repos/njoy/metaconfigure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/njoy/metaconfigure/statuses/{sha}","languages_url":"https://api.github.com/repos/njoy/metaconfigure/languages","stargazers_url":"https://api.github.com/repos/njoy/metaconfigure/stargazers","contributors_url":"https://api.github.com/repos/njoy/metaconfigure/contributors","subscribers_url":"https://api.github.com/repos/njoy/metaconfigure/subscribers","subscription_url":"https://api.github.com/repos/njoy/metaconfigure/subscription","commits_url":"https://api.github.com/repos/njoy/metaconfigure/commits{/sha}","git_commits_url":"https://api.github.com/repos/njoy/metaconfigure/git/commits{/sha}","comments_url":"https://api.github.com/repos/njoy/metaconfigure/comments{/number}","issue_comment_url":"https://api.github.com/repos/njoy/metaconfigure/issues/comments{/number}","contents_url":"https://api.github.com/repos/njoy/metaconfigure/contents/{+path}","compare_url":"https://api.github.com/repos/njoy/metaconfigure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/njoy/metaconfigure/merges","archive_url":"https://api.github.com/repos/njoy/metaconfigure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/njoy/metaconfigure/downloads","issues_url":"https://api.github.com/repos/njoy/metaconfigure/issues{/number}","pulls_url":"https://api.github.com/repos/njoy/metaconfigure/pulls{/number}","milestones_url":"https://api.github.com/repos/njoy/metaconfigure/milestones{/number}","notifications_url":"https://api.github.com/repos/njoy/metaconfigure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/njoy/metaconfigure/labels{/name}","releases_url":"https://api.github.com/repos/njoy/metaconfigure/releases{/id}","deployments_url":"https://api.github.com/repos/njoy/metaconfigure/deployments","created_at":"2016-10-03T17:00:31Z","updated_at":"2016-10-03T17:11:25Z","pushed_at":"2016-10-20T17:32:38Z","git_url":"git://github.com/njoy/metaconfigure.git","ssh_url":"git@github.com:njoy/metaconfigure.git","clone_url":"https://github.com/njoy/metaconfigure.git","svn_url":"https://github.com/njoy/metaconfigure","homepage":null,"size":16,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/njoy/metaconfigure/pulls/2"},"html":{"href":"https://github.com/njoy/metaconfigure/pull/2"},"issue":{"href":"https://api.github.com/repos/njoy/metaconfigure/issues/2"},"comments":{"href":"https://api.github.com/repos/njoy/metaconfigure/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/njoy/metaconfigure/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/njoy/metaconfigure/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/njoy/metaconfigure/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/njoy/metaconfigure/statuses/dda0e93a7687f321e661e4ea20f2938328d51ce5"}}}}
{"actor":{"display_login":"jlconlin"}}