{"action":"created","comment":{"url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls/comments/225069780","pull_request_review_id":164587490,"id":225069780,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNTA2OTc4MA==","diff_hunk":"@@ -0,0 +1,179 @@\n+from os.path import join, basename\n+\n+import pytest\n+from pytest import fixture\n+from yaml import YAMLError\n+\n+from mlvtools.exception import MlVToolException\n+from mlvtools.mlv_dvc.dvc_parser import get_dvc_dependencies, get_dvc_meta, DvcMeta\n+from tests.helpers.utils import write_dvc_file\n+\n+\n+@fixture\n+def base_steps(work_dir):\n+    steps = [join(work_dir, 'step1.yml'), join(work_dir, 'step2.yml'), join(work_dir, 'step3.yml'),\n+             join(work_dir, 'step4.yml'), join(work_dir, 'step5.yml')]\n+\n+    write_dvc_file(steps[0], 'cmd1', deps=['./pipeline_in'], outs=['./s1_out'])\n+    write_dvc_file(steps[1], 'cmd2', deps=['./s1_out'], outs=['./s2_out'])\n+    write_dvc_file(steps[2], 'cmd3', deps=['./s2_out'], outs=['./s3_out'])\n+    write_dvc_file(steps[3], 'cmd4', deps=['./s2_out'], outs=['./s4_out'])\n+    write_dvc_file(steps[4], 'cmd5', deps=['./s3_out', './s4_out'], outs=['./s5_out'])\n+    return steps\n+\n+\n+def test_should_get_dependencies_steps(base_steps):\n+    \"\"\"\n+        Test all steps to in denpendency of the target step\n+\n+             +-----------+              +---------------+\n+             | step1.dvc |              | isolated1.dvc |\n+             +-----------+              +---------------+\n+                    *\n+             +-----------+              +---------------+\n+             | step2.dvc |              | isolated2.dvc |\n+             +-----------+              +---------------+\n+         **                  **\n++-----------+             +-----------+\n+| step3.dvc |             | step4.dvc |\n++-----------+             +-----------+\n+                **    **\n+             +-----------+\n+             | step5.dvc |\n+             +-----------+\n+    \"\"\"\n+\n+    dependencies = list(get_dvc_dependencies(target_file_path=base_steps[-1], dvc_files=base_steps))\n+    # Topological sort solution can be 1 -> 2 -> 3 -> 4 -> 5\n+    #                               or 1 -> 2 -> 4 -> 3 -> 5\n+    assert [d.name for d in dependencies[:2]] == [basename(s) for s in base_steps[:2]]\n+    expected_commuted_steps = [basename(base_steps[2]), basename(base_steps[3])]\n+    assert [d.name for d in dependencies[2:4]] == expected_commuted_steps or reversed(expected_commuted_steps)\n+    assert dependencies[4].name == basename(base_steps[4])","path":"tests/mlv_dvc/test_dvc_parser.py","position":52,"original_position":52,"commit_id":"6dccc5ed6c49d8e5f0172c7fae949b428adfc23a","original_commit_id":"6229bde1d66d1540e53afd00e1fa5af2a7893eee","user":{"login":"mgu","id":91013,"node_id":"MDQ6VXNlcjkxMDEz","avatar_url":"https://avatars2.githubusercontent.com/u/91013?v=4","gravatar_id":"","url":"https://api.github.com/users/mgu","html_url":"https://github.com/mgu","followers_url":"https://api.github.com/users/mgu/followers","following_url":"https://api.github.com/users/mgu/following{/other_user}","gists_url":"https://api.github.com/users/mgu/gists{/gist_id}","starred_url":"https://api.github.com/users/mgu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgu/subscriptions","organizations_url":"https://api.github.com/users/mgu/orgs","repos_url":"https://api.github.com/users/mgu/repos","events_url":"https://api.github.com/users/mgu/events{/privacy}","received_events_url":"https://api.github.com/users/mgu/received_events","type":"User","site_admin":false},"body":"ok for your version, but I don't like the indentation :D \r\nYou should definitely try `black` ;)","created_at":"2018-10-15T08:01:34Z","updated_at":"2018-10-15T08:01:34Z","html_url":"https://github.com/peopledoc/ml-versioning-tools/pull/22#discussion_r225069780","pull_request_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls/22","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls/comments/225069780"},"html":{"href":"https://github.com/peopledoc/ml-versioning-tools/pull/22#discussion_r225069780"},"pull_request":{"href":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls/22"}},"in_reply_to_id":225054980},"pull_request":{"url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls/22","id":222387974,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyMzg3OTc0","html_url":"https://github.com/peopledoc/ml-versioning-tools/pull/22","diff_url":"https://github.com/peopledoc/ml-versioning-tools/pull/22.diff","patch_url":"https://github.com/peopledoc/ml-versioning-tools/pull/22.patch","issue_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/issues/22","number":22,"state":"open","locked":false,"title":"DC-80 Export DVC Pipeline","user":{"login":"sbracaloni","id":39304052,"node_id":"MDQ6VXNlcjM5MzA0MDUy","avatar_url":"https://avatars3.githubusercontent.com/u/39304052?v=4","gravatar_id":"","url":"https://api.github.com/users/sbracaloni","html_url":"https://github.com/sbracaloni","followers_url":"https://api.github.com/users/sbracaloni/followers","following_url":"https://api.github.com/users/sbracaloni/following{/other_user}","gists_url":"https://api.github.com/users/sbracaloni/gists{/gist_id}","starred_url":"https://api.github.com/users/sbracaloni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbracaloni/subscriptions","organizations_url":"https://api.github.com/users/sbracaloni/orgs","repos_url":"https://api.github.com/users/sbracaloni/repos","events_url":"https://api.github.com/users/sbracaloni/events{/privacy}","received_events_url":"https://api.github.com/users/sbracaloni/received_events","type":"User","site_admin":false},"body":"Export the ordered list of commands needed to complete a given pipeline step.\r\nSequential execution.\r\nLocal pipeline step only.\r\n\r\nTODO: add doc\r\n\r\nWIP","created_at":"2018-10-12T08:29:05Z","updated_at":"2018-10-15T08:01:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ef79eae3ba02a60a1e6afa3ae11b01d91caf85b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls/22/commits","review_comments_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls/22/comments","review_comment_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/issues/22/comments","statuses_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/statuses/6dccc5ed6c49d8e5f0172c7fae949b428adfc23a","head":{"label":"peopledoc:dc-80-export-pipeline","ref":"dc-80-export-pipeline","sha":"6dccc5ed6c49d8e5f0172c7fae949b428adfc23a","user":{"login":"peopledoc","id":1080062,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwODAwNjI=","avatar_url":"https://avatars2.githubusercontent.com/u/1080062?v=4","gravatar_id":"","url":"https://api.github.com/users/peopledoc","html_url":"https://github.com/peopledoc","followers_url":"https://api.github.com/users/peopledoc/followers","following_url":"https://api.github.com/users/peopledoc/following{/other_user}","gists_url":"https://api.github.com/users/peopledoc/gists{/gist_id}","starred_url":"https://api.github.com/users/peopledoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peopledoc/subscriptions","organizations_url":"https://api.github.com/users/peopledoc/orgs","repos_url":"https://api.github.com/users/peopledoc/repos","events_url":"https://api.github.com/users/peopledoc/events{/privacy}","received_events_url":"https://api.github.com/users/peopledoc/received_events","type":"Organization","site_admin":false},"repo":{"id":145836701,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU4MzY3MDE=","name":"ml-versioning-tools","full_name":"peopledoc/ml-versioning-tools","private":false,"owner":{"login":"peopledoc","id":1080062,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwODAwNjI=","avatar_url":"https://avatars2.githubusercontent.com/u/1080062?v=4","gravatar_id":"","url":"https://api.github.com/users/peopledoc","html_url":"https://github.com/peopledoc","followers_url":"https://api.github.com/users/peopledoc/followers","following_url":"https://api.github.com/users/peopledoc/following{/other_user}","gists_url":"https://api.github.com/users/peopledoc/gists{/gist_id}","starred_url":"https://api.github.com/users/peopledoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peopledoc/subscriptions","organizations_url":"https://api.github.com/users/peopledoc/orgs","repos_url":"https://api.github.com/users/peopledoc/repos","events_url":"https://api.github.com/users/peopledoc/events{/privacy}","received_events_url":"https://api.github.com/users/peopledoc/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/peopledoc/ml-versioning-tools","description":"Public repository for versioning machine learning data","fork":false,"url":"https://api.github.com/repos/peopledoc/ml-versioning-tools","forks_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/forks","keys_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/teams","hooks_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/hooks","issue_events_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/issues/events{/number}","events_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/events","assignees_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/assignees{/user}","branches_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/branches{/branch}","tags_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/tags","blobs_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/languages","stargazers_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/stargazers","contributors_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/contributors","subscribers_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/subscribers","subscription_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/subscription","commits_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/contents/{+path}","compare_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/merges","archive_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/downloads","issues_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/issues{/number}","pulls_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/labels{/name}","releases_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/releases{/id}","deployments_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/deployments","created_at":"2018-08-23T10:12:59Z","updated_at":"2018-10-15T07:01:09Z","pushed_at":"2018-10-15T07:04:10Z","git_url":"git://github.com/peopledoc/ml-versioning-tools.git","ssh_url":"git@github.com:peopledoc/ml-versioning-tools.git","clone_url":"https://github.com/peopledoc/ml-versioning-tools.git","svn_url":"https://github.com/peopledoc/ml-versioning-tools","homepage":"","size":179,"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":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"peopledoc:master","ref":"master","sha":"c2e9ee304cf0c13f7bfe0e33de2bc9b0615e1954","user":{"login":"peopledoc","id":1080062,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwODAwNjI=","avatar_url":"https://avatars2.githubusercontent.com/u/1080062?v=4","gravatar_id":"","url":"https://api.github.com/users/peopledoc","html_url":"https://github.com/peopledoc","followers_url":"https://api.github.com/users/peopledoc/followers","following_url":"https://api.github.com/users/peopledoc/following{/other_user}","gists_url":"https://api.github.com/users/peopledoc/gists{/gist_id}","starred_url":"https://api.github.com/users/peopledoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peopledoc/subscriptions","organizations_url":"https://api.github.com/users/peopledoc/orgs","repos_url":"https://api.github.com/users/peopledoc/repos","events_url":"https://api.github.com/users/peopledoc/events{/privacy}","received_events_url":"https://api.github.com/users/peopledoc/received_events","type":"Organization","site_admin":false},"repo":{"id":145836701,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU4MzY3MDE=","name":"ml-versioning-tools","full_name":"peopledoc/ml-versioning-tools","private":false,"owner":{"login":"peopledoc","id":1080062,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwODAwNjI=","avatar_url":"https://avatars2.githubusercontent.com/u/1080062?v=4","gravatar_id":"","url":"https://api.github.com/users/peopledoc","html_url":"https://github.com/peopledoc","followers_url":"https://api.github.com/users/peopledoc/followers","following_url":"https://api.github.com/users/peopledoc/following{/other_user}","gists_url":"https://api.github.com/users/peopledoc/gists{/gist_id}","starred_url":"https://api.github.com/users/peopledoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peopledoc/subscriptions","organizations_url":"https://api.github.com/users/peopledoc/orgs","repos_url":"https://api.github.com/users/peopledoc/repos","events_url":"https://api.github.com/users/peopledoc/events{/privacy}","received_events_url":"https://api.github.com/users/peopledoc/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/peopledoc/ml-versioning-tools","description":"Public repository for versioning machine learning data","fork":false,"url":"https://api.github.com/repos/peopledoc/ml-versioning-tools","forks_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/forks","keys_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/teams","hooks_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/hooks","issue_events_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/issues/events{/number}","events_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/events","assignees_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/assignees{/user}","branches_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/branches{/branch}","tags_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/tags","blobs_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/languages","stargazers_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/stargazers","contributors_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/contributors","subscribers_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/subscribers","subscription_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/subscription","commits_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/contents/{+path}","compare_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/merges","archive_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/downloads","issues_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/issues{/number}","pulls_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/labels{/name}","releases_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/releases{/id}","deployments_url":"https://api.github.com/repos/peopledoc/ml-versioning-tools/deployments","created_at":"2018-08-23T10:12:59Z","updated_at":"2018-10-15T07:01:09Z","pushed_at":"2018-10-15T07:04:10Z","git_url":"git://github.com/peopledoc/ml-versioning-tools.git","ssh_url":"git@github.com:peopledoc/ml-versioning-tools.git","clone_url":"https://github.com/peopledoc/ml-versioning-tools.git","svn_url":"https://github.com/peopledoc/ml-versioning-tools","homepage":"","size":179,"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":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls/22"},"html":{"href":"https://github.com/peopledoc/ml-versioning-tools/pull/22"},"issue":{"href":"https://api.github.com/repos/peopledoc/ml-versioning-tools/issues/22"},"comments":{"href":"https://api.github.com/repos/peopledoc/ml-versioning-tools/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/peopledoc/ml-versioning-tools/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/peopledoc/ml-versioning-tools/statuses/6dccc5ed6c49d8e5f0172c7fae949b428adfc23a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mgu"}}