{"action":"created","comment":{"url":"https://api.github.com/repos/Ultimaker/Cura/pulls/comments/234719274","pull_request_review_id":176421084,"id":234719274,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDcxOTI3NA==","diff_hunk":"@@ -1,99 +1,129 @@\n # Copyright (c) 2018 Ultimaker B.V.\n # Cura is released under the terms of the LGPLv3 or higher.\n \n-import json #To understand the list of materials from the printer reply.\n-import os #To walk over material files.\n-import os.path #To filter on material files.\n-from PyQt5.QtNetwork import QNetworkReply, QNetworkRequest #To listen to the reply from the printer.\n-from typing import Any, Dict, Set, TYPE_CHECKING\n-import urllib.parse #For getting material IDs from their file names.\n-\n-from UM.Job import Job #The interface we're implementing.\n+import json  # To understand the list of materials from the printer reply.\n+import os  # To walk over material files.\n+import os.path  # To filter on material files.\n+import urllib.parse  # For getting material IDs from their file names.\n+from typing import Dict, TYPE_CHECKING\n+\n+from PyQt5.QtNetwork import QNetworkReply, QNetworkRequest  # To listen to the reply from the printer.\n+\n+from UM.Job import Job  # The interface we're implementing.\n from UM.Logger import Logger\n-from UM.MimeTypeDatabase import MimeTypeDatabase #To strip the extensions of the material profile files.\n+from UM.MimeTypeDatabase import MimeTypeDatabase  # To strip the extensions of the material profile files.\n from UM.Resources import Resources\n-from UM.Settings.ContainerRegistry import ContainerRegistry #To find the GUIDs of materials.\n-\n-from cura.CuraApplication import CuraApplication #For the resource types.\n+from UM.Settings.ContainerRegistry import ContainerRegistry  # To find the GUIDs of materials.\n+from cura.CuraApplication import CuraApplication  # For the resource types.\n+from plugins.UM3NetworkPrinting.src.Models import ClusterMaterial, LocalMaterial\n \n if TYPE_CHECKING:\n     from .ClusterUM3OutputDevice import ClusterUM3OutputDevice\n \n+\n ##  Asynchronous job to send material profiles to the printer.\n #\n #   This way it won't freeze up the interface while sending those materials.\n class SendMaterialJob(Job):\n     def __init__(self, device: \"ClusterUM3OutputDevice\") -> None:\n         super().__init__()\n-        self.device = device #type: ClusterUM3OutputDevice\n+        self.device = device  # type: ClusterUM3OutputDevice\n \n     def run(self) -> None:\n-        self.device.get(\"materials/\", on_finished = self.sendMissingMaterials)\n+        self.device.get(\"materials/\", on_finished=self.sendMissingMaterials)","path":"plugins/UM3NetworkPrinting/src/SendMaterialJob.py","position":null,"original_position":47,"commit_id":"2497325d606a9246bb383fa87e2dc1707f99e321","original_commit_id":"421af26f87892484381d398a6cbdf05e96a26165","user":{"login":"sedwards2009","id":6926644,"node_id":"MDQ6VXNlcjY5MjY2NDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6926644?v=4","gravatar_id":"","url":"https://api.github.com/users/sedwards2009","html_url":"https://github.com/sedwards2009","followers_url":"https://api.github.com/users/sedwards2009/followers","following_url":"https://api.github.com/users/sedwards2009/following{/other_user}","gists_url":"https://api.github.com/users/sedwards2009/gists{/gist_id}","starred_url":"https://api.github.com/users/sedwards2009/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sedwards2009/subscriptions","organizations_url":"https://api.github.com/users/sedwards2009/orgs","repos_url":"https://api.github.com/users/sedwards2009/repos","events_url":"https://api.github.com/users/sedwards2009/events{/privacy}","received_events_url":"https://api.github.com/users/sedwards2009/received_events","type":"User","site_admin":false},"body":"That's not really an assignment though. It's just parameter passing.\r\n","created_at":"2018-11-19T17:51:08Z","updated_at":"2018-11-19T17:51:08Z","html_url":"https://github.com/Ultimaker/Cura/pull/4816#discussion_r234719274","pull_request_url":"https://api.github.com/repos/Ultimaker/Cura/pulls/4816","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Ultimaker/Cura/pulls/comments/234719274"},"html":{"href":"https://github.com/Ultimaker/Cura/pull/4816#discussion_r234719274"},"pull_request":{"href":"https://api.github.com/repos/Ultimaker/Cura/pulls/4816"}},"in_reply_to_id":234224302},"pull_request":{"url":"https://api.github.com/repos/Ultimaker/Cura/pulls/4816","id":231546787,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNTQ2Nzg3","html_url":"https://github.com/Ultimaker/Cura/pull/4816","diff_url":"https://github.com/Ultimaker/Cura/pull/4816.diff","patch_url":"https://github.com/Ultimaker/Cura/pull/4816.patch","issue_url":"https://api.github.com/repos/Ultimaker/Cura/issues/4816","number":4816,"state":"open","locked":false,"title":"Tests for um3networkplugin","user":{"login":"marijnd","id":7235641,"node_id":"MDQ6VXNlcjcyMzU2NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/7235641?v=4","gravatar_id":"","url":"https://api.github.com/users/marijnd","html_url":"https://github.com/marijnd","followers_url":"https://api.github.com/users/marijnd/followers","following_url":"https://api.github.com/users/marijnd/following{/other_user}","gists_url":"https://api.github.com/users/marijnd/gists{/gist_id}","starred_url":"https://api.github.com/users/marijnd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marijnd/subscriptions","organizations_url":"https://api.github.com/users/marijnd/orgs","repos_url":"https://api.github.com/users/marijnd/repos","events_url":"https://api.github.com/users/marijnd/events{/privacy}","received_events_url":"https://api.github.com/users/marijnd/received_events","type":"User","site_admin":false},"body":"In preparation for printing from the cloud I started adding tests to the UM3NetworkPrinting plugin.\r\nI started adding test for SendMaterialJob and refactored that class to make it more testable.\r\n\r\nThis also fixes CURA-5947.","created_at":"2018-11-16T14:26:30Z","updated_at":"2018-11-19T17:51:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e221a271f74c06f57f9fff63cf399dd5d3f49f4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Ultimaker/Cura/pulls/4816/commits","review_comments_url":"https://api.github.com/repos/Ultimaker/Cura/pulls/4816/comments","review_comment_url":"https://api.github.com/repos/Ultimaker/Cura/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ultimaker/Cura/issues/4816/comments","statuses_url":"https://api.github.com/repos/Ultimaker/Cura/statuses/2497325d606a9246bb383fa87e2dc1707f99e321","head":{"label":"Ultimaker:tests-for-um3networkplugin","ref":"tests-for-um3networkplugin","sha":"2497325d606a9246bb383fa87e2dc1707f99e321","user":{"login":"Ultimaker","id":499557,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5OTU1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/499557?v=4","gravatar_id":"","url":"https://api.github.com/users/Ultimaker","html_url":"https://github.com/Ultimaker","followers_url":"https://api.github.com/users/Ultimaker/followers","following_url":"https://api.github.com/users/Ultimaker/following{/other_user}","gists_url":"https://api.github.com/users/Ultimaker/gists{/gist_id}","starred_url":"https://api.github.com/users/Ultimaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ultimaker/subscriptions","organizations_url":"https://api.github.com/users/Ultimaker/orgs","repos_url":"https://api.github.com/users/Ultimaker/repos","events_url":"https://api.github.com/users/Ultimaker/events{/privacy}","received_events_url":"https://api.github.com/users/Ultimaker/received_events","type":"Organization","site_admin":false},"repo":{"id":20884782,"node_id":"MDEwOlJlcG9zaXRvcnkyMDg4NDc4Mg==","name":"Cura","full_name":"Ultimaker/Cura","private":false,"owner":{"login":"Ultimaker","id":499557,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5OTU1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/499557?v=4","gravatar_id":"","url":"https://api.github.com/users/Ultimaker","html_url":"https://github.com/Ultimaker","followers_url":"https://api.github.com/users/Ultimaker/followers","following_url":"https://api.github.com/users/Ultimaker/following{/other_user}","gists_url":"https://api.github.com/users/Ultimaker/gists{/gist_id}","starred_url":"https://api.github.com/users/Ultimaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ultimaker/subscriptions","organizations_url":"https://api.github.com/users/Ultimaker/orgs","repos_url":"https://api.github.com/users/Ultimaker/repos","events_url":"https://api.github.com/users/Ultimaker/events{/privacy}","received_events_url":"https://api.github.com/users/Ultimaker/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Ultimaker/Cura","description":"3D printer / slicing GUI built on top of the Uranium framework","fork":false,"url":"https://api.github.com/repos/Ultimaker/Cura","forks_url":"https://api.github.com/repos/Ultimaker/Cura/forks","keys_url":"https://api.github.com/repos/Ultimaker/Cura/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ultimaker/Cura/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ultimaker/Cura/teams","hooks_url":"https://api.github.com/repos/Ultimaker/Cura/hooks","issue_events_url":"https://api.github.com/repos/Ultimaker/Cura/issues/events{/number}","events_url":"https://api.github.com/repos/Ultimaker/Cura/events","assignees_url":"https://api.github.com/repos/Ultimaker/Cura/assignees{/user}","branches_url":"https://api.github.com/repos/Ultimaker/Cura/branches{/branch}","tags_url":"https://api.github.com/repos/Ultimaker/Cura/tags","blobs_url":"https://api.github.com/repos/Ultimaker/Cura/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ultimaker/Cura/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ultimaker/Cura/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ultimaker/Cura/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ultimaker/Cura/statuses/{sha}","languages_url":"https://api.github.com/repos/Ultimaker/Cura/languages","stargazers_url":"https://api.github.com/repos/Ultimaker/Cura/stargazers","contributors_url":"https://api.github.com/repos/Ultimaker/Cura/contributors","subscribers_url":"https://api.github.com/repos/Ultimaker/Cura/subscribers","subscription_url":"https://api.github.com/repos/Ultimaker/Cura/subscription","commits_url":"https://api.github.com/repos/Ultimaker/Cura/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ultimaker/Cura/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ultimaker/Cura/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ultimaker/Cura/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ultimaker/Cura/contents/{+path}","compare_url":"https://api.github.com/repos/Ultimaker/Cura/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ultimaker/Cura/merges","archive_url":"https://api.github.com/repos/Ultimaker/Cura/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ultimaker/Cura/downloads","issues_url":"https://api.github.com/repos/Ultimaker/Cura/issues{/number}","pulls_url":"https://api.github.com/repos/Ultimaker/Cura/pulls{/number}","milestones_url":"https://api.github.com/repos/Ultimaker/Cura/milestones{/number}","notifications_url":"https://api.github.com/repos/Ultimaker/Cura/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ultimaker/Cura/labels{/name}","releases_url":"https://api.github.com/repos/Ultimaker/Cura/releases{/id}","deployments_url":"https://api.github.com/repos/Ultimaker/Cura/deployments","created_at":"2014-06-16T12:55:31Z","updated_at":"2018-11-19T15:52:44Z","pushed_at":"2018-11-19T15:52:35Z","git_url":"git://github.com/Ultimaker/Cura.git","ssh_url":"git@github.com:Ultimaker/Cura.git","clone_url":"https://github.com/Ultimaker/Cura.git","svn_url":"https://github.com/Ultimaker/Cura","homepage":"","size":161689,"stargazers_count":1088,"watchers_count":1088,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":562,"mirror_url":null,"archived":false,"open_issues_count":558,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":562,"open_issues":558,"watchers":1088,"default_branch":"master"}},"base":{"label":"Ultimaker:master","ref":"master","sha":"f10bd28c4ae8084f9b8f8f343b3b8471a764a2a4","user":{"login":"Ultimaker","id":499557,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5OTU1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/499557?v=4","gravatar_id":"","url":"https://api.github.com/users/Ultimaker","html_url":"https://github.com/Ultimaker","followers_url":"https://api.github.com/users/Ultimaker/followers","following_url":"https://api.github.com/users/Ultimaker/following{/other_user}","gists_url":"https://api.github.com/users/Ultimaker/gists{/gist_id}","starred_url":"https://api.github.com/users/Ultimaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ultimaker/subscriptions","organizations_url":"https://api.github.com/users/Ultimaker/orgs","repos_url":"https://api.github.com/users/Ultimaker/repos","events_url":"https://api.github.com/users/Ultimaker/events{/privacy}","received_events_url":"https://api.github.com/users/Ultimaker/received_events","type":"Organization","site_admin":false},"repo":{"id":20884782,"node_id":"MDEwOlJlcG9zaXRvcnkyMDg4NDc4Mg==","name":"Cura","full_name":"Ultimaker/Cura","private":false,"owner":{"login":"Ultimaker","id":499557,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5OTU1Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/499557?v=4","gravatar_id":"","url":"https://api.github.com/users/Ultimaker","html_url":"https://github.com/Ultimaker","followers_url":"https://api.github.com/users/Ultimaker/followers","following_url":"https://api.github.com/users/Ultimaker/following{/other_user}","gists_url":"https://api.github.com/users/Ultimaker/gists{/gist_id}","starred_url":"https://api.github.com/users/Ultimaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ultimaker/subscriptions","organizations_url":"https://api.github.com/users/Ultimaker/orgs","repos_url":"https://api.github.com/users/Ultimaker/repos","events_url":"https://api.github.com/users/Ultimaker/events{/privacy}","received_events_url":"https://api.github.com/users/Ultimaker/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Ultimaker/Cura","description":"3D printer / slicing GUI built on top of the Uranium framework","fork":false,"url":"https://api.github.com/repos/Ultimaker/Cura","forks_url":"https://api.github.com/repos/Ultimaker/Cura/forks","keys_url":"https://api.github.com/repos/Ultimaker/Cura/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ultimaker/Cura/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ultimaker/Cura/teams","hooks_url":"https://api.github.com/repos/Ultimaker/Cura/hooks","issue_events_url":"https://api.github.com/repos/Ultimaker/Cura/issues/events{/number}","events_url":"https://api.github.com/repos/Ultimaker/Cura/events","assignees_url":"https://api.github.com/repos/Ultimaker/Cura/assignees{/user}","branches_url":"https://api.github.com/repos/Ultimaker/Cura/branches{/branch}","tags_url":"https://api.github.com/repos/Ultimaker/Cura/tags","blobs_url":"https://api.github.com/repos/Ultimaker/Cura/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ultimaker/Cura/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ultimaker/Cura/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ultimaker/Cura/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ultimaker/Cura/statuses/{sha}","languages_url":"https://api.github.com/repos/Ultimaker/Cura/languages","stargazers_url":"https://api.github.com/repos/Ultimaker/Cura/stargazers","contributors_url":"https://api.github.com/repos/Ultimaker/Cura/contributors","subscribers_url":"https://api.github.com/repos/Ultimaker/Cura/subscribers","subscription_url":"https://api.github.com/repos/Ultimaker/Cura/subscription","commits_url":"https://api.github.com/repos/Ultimaker/Cura/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ultimaker/Cura/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ultimaker/Cura/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ultimaker/Cura/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ultimaker/Cura/contents/{+path}","compare_url":"https://api.github.com/repos/Ultimaker/Cura/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ultimaker/Cura/merges","archive_url":"https://api.github.com/repos/Ultimaker/Cura/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ultimaker/Cura/downloads","issues_url":"https://api.github.com/repos/Ultimaker/Cura/issues{/number}","pulls_url":"https://api.github.com/repos/Ultimaker/Cura/pulls{/number}","milestones_url":"https://api.github.com/repos/Ultimaker/Cura/milestones{/number}","notifications_url":"https://api.github.com/repos/Ultimaker/Cura/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ultimaker/Cura/labels{/name}","releases_url":"https://api.github.com/repos/Ultimaker/Cura/releases{/id}","deployments_url":"https://api.github.com/repos/Ultimaker/Cura/deployments","created_at":"2014-06-16T12:55:31Z","updated_at":"2018-11-19T15:52:44Z","pushed_at":"2018-11-19T15:52:35Z","git_url":"git://github.com/Ultimaker/Cura.git","ssh_url":"git@github.com:Ultimaker/Cura.git","clone_url":"https://github.com/Ultimaker/Cura.git","svn_url":"https://github.com/Ultimaker/Cura","homepage":"","size":161689,"stargazers_count":1088,"watchers_count":1088,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":562,"mirror_url":null,"archived":false,"open_issues_count":558,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":562,"open_issues":558,"watchers":1088,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ultimaker/Cura/pulls/4816"},"html":{"href":"https://github.com/Ultimaker/Cura/pull/4816"},"issue":{"href":"https://api.github.com/repos/Ultimaker/Cura/issues/4816"},"comments":{"href":"https://api.github.com/repos/Ultimaker/Cura/issues/4816/comments"},"review_comments":{"href":"https://api.github.com/repos/Ultimaker/Cura/pulls/4816/comments"},"review_comment":{"href":"https://api.github.com/repos/Ultimaker/Cura/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ultimaker/Cura/pulls/4816/commits"},"statuses":{"href":"https://api.github.com/repos/Ultimaker/Cura/statuses/2497325d606a9246bb383fa87e2dc1707f99e321"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sedwards2009"}}