{"action":"created","comment":{"url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments/71705443","id":71705443,"diff_hunk":"@@ -1,14 +1,87 @@\n # -*- coding: utf-8 -*-\n \n from pyramid.view import view_config\n-from pyramid.httpexceptions import HTTPNotFound\n+import networkx as nx\n+from itertools import chain\n+from pyramid.httpexceptions import HTTPInternalServerError, HTTPNotFound\n \n from chsdi.models.bod import Catalog\n from chsdi.lib.validation import MapNameValidation\n from chsdi.lib.sqlalchemy_customs import remove_accents\n from chsdi.lib.filters import filter_by_geodata_staging\n \n \n+# Cutsom networkx like function","path":"chsdi/views/catalog.py","position":15,"original_position":15,"commit_id":"f8051d92c6b74e34fcd75733d693c0317f9be1f7","original_commit_id":"f8051d92c6b74e34fcd75733d693c0317f9be1f7","user":{"login":"loicgasser","id":3306154,"avatar_url":"https://avatars.githubusercontent.com/u/3306154?v=3","gravatar_id":"","url":"https://api.github.com/users/loicgasser","html_url":"https://github.com/loicgasser","followers_url":"https://api.github.com/users/loicgasser/followers","following_url":"https://api.github.com/users/loicgasser/following{/other_user}","gists_url":"https://api.github.com/users/loicgasser/gists{/gist_id}","starred_url":"https://api.github.com/users/loicgasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loicgasser/subscriptions","organizations_url":"https://api.github.com/users/loicgasser/orgs","repos_url":"https://api.github.com/users/loicgasser/repos","events_url":"https://api.github.com/users/loicgasser/events{/privacy}","received_events_url":"https://api.github.com/users/loicgasser/received_events","type":"User","site_admin":false},"body":":see_no_evil: ","created_at":"2016-07-21T13:35:47Z","updated_at":"2016-07-21T13:35:47Z","html_url":"https://github.com/geoadmin/mf-chsdi3/pull/1968#discussion_r71705443","pull_request_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1968","_links":{"self":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments/71705443"},"html":{"href":"https://github.com/geoadmin/mf-chsdi3/pull/1968#discussion_r71705443"},"pull_request":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1968"}}},"pull_request":{"url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1968","id":62236385,"html_url":"https://github.com/geoadmin/mf-chsdi3/pull/1968","diff_url":"https://github.com/geoadmin/mf-chsdi3/pull/1968.diff","patch_url":"https://github.com/geoadmin/mf-chsdi3/pull/1968.patch","issue_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1968","number":1968,"state":"open","locked":false,"title":"Refactor catalog service and improve coverage","user":{"login":"mariavkourouni","id":14076451,"avatar_url":"https://avatars.githubusercontent.com/u/14076451?v=3","gravatar_id":"","url":"https://api.github.com/users/mariavkourouni","html_url":"https://github.com/mariavkourouni","followers_url":"https://api.github.com/users/mariavkourouni/followers","following_url":"https://api.github.com/users/mariavkourouni/following{/other_user}","gists_url":"https://api.github.com/users/mariavkourouni/gists{/gist_id}","starred_url":"https://api.github.com/users/mariavkourouni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariavkourouni/subscriptions","organizations_url":"https://api.github.com/users/mariavkourouni/orgs","repos_url":"https://api.github.com/users/mariavkourouni/repos","events_url":"https://api.github.com/users/mariavkourouni/events{/privacy}","received_events_url":"https://api.github.com/users/mariavkourouni/received_events","type":"User","site_admin":false},"body":"[Test - catalog tree graph](http://mf-chsdi3.dev.bgdi.ch/kom_catalog/rest/services/ech/CatalogServer)","created_at":"2016-03-09T14:31:33Z","updated_at":"2016-07-21T13:35:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69ee05fd3e5f3be382ee11dbba1e80fbcfc87aa5","assignee":{"login":"mariavkourouni","id":14076451,"avatar_url":"https://avatars.githubusercontent.com/u/14076451?v=3","gravatar_id":"","url":"https://api.github.com/users/mariavkourouni","html_url":"https://github.com/mariavkourouni","followers_url":"https://api.github.com/users/mariavkourouni/followers","following_url":"https://api.github.com/users/mariavkourouni/following{/other_user}","gists_url":"https://api.github.com/users/mariavkourouni/gists{/gist_id}","starred_url":"https://api.github.com/users/mariavkourouni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariavkourouni/subscriptions","organizations_url":"https://api.github.com/users/mariavkourouni/orgs","repos_url":"https://api.github.com/users/mariavkourouni/repos","events_url":"https://api.github.com/users/mariavkourouni/events{/privacy}","received_events_url":"https://api.github.com/users/mariavkourouni/received_events","type":"User","site_admin":false},"assignees":[{"login":"mariavkourouni","id":14076451,"avatar_url":"https://avatars.githubusercontent.com/u/14076451?v=3","gravatar_id":"","url":"https://api.github.com/users/mariavkourouni","html_url":"https://github.com/mariavkourouni","followers_url":"https://api.github.com/users/mariavkourouni/followers","following_url":"https://api.github.com/users/mariavkourouni/following{/other_user}","gists_url":"https://api.github.com/users/mariavkourouni/gists{/gist_id}","starred_url":"https://api.github.com/users/mariavkourouni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariavkourouni/subscriptions","organizations_url":"https://api.github.com/users/mariavkourouni/orgs","repos_url":"https://api.github.com/users/mariavkourouni/repos","events_url":"https://api.github.com/users/mariavkourouni/events{/privacy}","received_events_url":"https://api.github.com/users/mariavkourouni/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1968/commits","review_comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1968/comments","review_comment_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1968/comments","statuses_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/f8051d92c6b74e34fcd75733d693c0317f9be1f7","head":{"label":"geoadmin:kom_catalog","ref":"kom_catalog","sha":"f8051d92c6b74e34fcd75733d693c0317f9be1f7","user":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":10399553,"name":"mf-chsdi3","full_name":"geoadmin/mf-chsdi3","owner":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoadmin/mf-chsdi3","description":"api3.geo.admin.ch source code. ","fork":false,"url":"https://api.github.com/repos/geoadmin/mf-chsdi3","forks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/forks","keys_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/teams","hooks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/hooks","issue_events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/events{/number}","events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/events","assignees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/assignees{/user}","branches_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/branches{/branch}","tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/tags","blobs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/{sha}","languages_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/languages","stargazers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/stargazers","contributors_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contributors","subscribers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscribers","subscription_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscription","commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contents/{+path}","compare_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/merges","archive_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/downloads","issues_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues{/number}","pulls_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls{/number}","milestones_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/milestones{/number}","notifications_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/labels{/name}","releases_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/releases{/id}","deployments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/deployments","created_at":"2013-05-31T06:59:44Z","updated_at":"2016-02-16T10:24:27Z","pushed_at":"2016-07-21T13:14:45Z","git_url":"git://github.com/geoadmin/mf-chsdi3.git","ssh_url":"git@github.com:geoadmin/mf-chsdi3.git","clone_url":"https://github.com/geoadmin/mf-chsdi3.git","svn_url":"https://github.com/geoadmin/mf-chsdi3","homepage":"api3.geo.admin.ch","size":412587,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":64,"forks":10,"open_issues":64,"watchers":13,"default_branch":"master"}},"base":{"label":"geoadmin:master","ref":"master","sha":"12b2978ff67ab907c2764bf935b5c9785f1cea4c","user":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":10399553,"name":"mf-chsdi3","full_name":"geoadmin/mf-chsdi3","owner":{"login":"geoadmin","id":3369793,"avatar_url":"https://avatars.githubusercontent.com/u/3369793?v=3","gravatar_id":"","url":"https://api.github.com/users/geoadmin","html_url":"https://github.com/geoadmin","followers_url":"https://api.github.com/users/geoadmin/followers","following_url":"https://api.github.com/users/geoadmin/following{/other_user}","gists_url":"https://api.github.com/users/geoadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/geoadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoadmin/subscriptions","organizations_url":"https://api.github.com/users/geoadmin/orgs","repos_url":"https://api.github.com/users/geoadmin/repos","events_url":"https://api.github.com/users/geoadmin/events{/privacy}","received_events_url":"https://api.github.com/users/geoadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geoadmin/mf-chsdi3","description":"api3.geo.admin.ch source code. ","fork":false,"url":"https://api.github.com/repos/geoadmin/mf-chsdi3","forks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/forks","keys_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/teams","hooks_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/hooks","issue_events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/events{/number}","events_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/events","assignees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/assignees{/user}","branches_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/branches{/branch}","tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/tags","blobs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/refs{/sha}","trees_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/{sha}","languages_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/languages","stargazers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/stargazers","contributors_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contributors","subscribers_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscribers","subscription_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/subscription","commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/commits{/sha}","git_commits_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/git/commits{/sha}","comments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/comments{/number}","issue_comment_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/comments{/number}","contents_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/contents/{+path}","compare_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/merges","archive_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/downloads","issues_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues{/number}","pulls_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls{/number}","milestones_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/milestones{/number}","notifications_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/labels{/name}","releases_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/releases{/id}","deployments_url":"https://api.github.com/repos/geoadmin/mf-chsdi3/deployments","created_at":"2013-05-31T06:59:44Z","updated_at":"2016-02-16T10:24:27Z","pushed_at":"2016-07-21T13:14:45Z","git_url":"git://github.com/geoadmin/mf-chsdi3.git","ssh_url":"git@github.com:geoadmin/mf-chsdi3.git","clone_url":"https://github.com/geoadmin/mf-chsdi3.git","svn_url":"https://github.com/geoadmin/mf-chsdi3","homepage":"api3.geo.admin.ch","size":412587,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":64,"forks":10,"open_issues":64,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1968"},"html":{"href":"https://github.com/geoadmin/mf-chsdi3/pull/1968"},"issue":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1968"},"comments":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/issues/1968/comments"},"review_comments":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1968/comments"},"review_comment":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/pulls/1968/commits"},"statuses":{"href":"https://api.github.com/repos/geoadmin/mf-chsdi3/statuses/f8051d92c6b74e34fcd75733d693c0317f9be1f7"}}}}
{"actor":{"display_login":"loicgasser"}}