-
Notifications
You must be signed in to change notification settings - Fork 284
Conversation
Adds an RPC endpoint which returns fragments for a given rendering task. A fragment is a collection of subtasks which all refer to a common part of the whole task (currently it is the start_task index from subtask extra_data).
Sample JSON response from the RPC in its current form (subtask_count is 5, only one subtask has been assigned):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golem/task/rpc.py
Outdated
@@ -5,7 +5,7 @@ | |||
import logging | |||
import os.path | |||
import re | |||
import typing | |||
from typing import Any, Dict, Generator, Iterable, List, Optional, Tuple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?... maybe it's just me but I find typing.X
immediately more readable than just X
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find prefixing overly verbose, especially for collection type signatures (when the prefix gets repeated multiple times). I suppose it's mostly subjective, but from typing
seems to be more widely used in our codebase (113 vs 29 files).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I second @shadeofblue in that. IMO this is a case of namespace pollution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## develop #4120 +/- ##
===========================================
+ Coverage 88.64% 88.67% +0.03%
===========================================
Files 214 214
Lines 18682 18697 +15
===========================================
+ Hits 16561 16580 +19
+ Misses 2121 2117 -4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added remote procedure looks good 👍
I don't like changing clean namespace into this polluted... thing. :/
>>> import this
The Zen of Python, by Tim Peters
[...]
Namespaces are one honking great idea -- let's do more of those!
golem/task/rpc.py
Outdated
@@ -5,7 +5,7 @@ | |||
import logging | |||
import os.path | |||
import re | |||
import typing | |||
from typing import Any, Dict, Generator, Iterable, List, Optional, Tuple |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I second @shadeofblue in that. IMO this is a case of namespace pollution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolves: #4041
Adds an RPC endpoint which returns fragments for a given rendering task.
A fragment is a collection of subtasks which all refer to a common part
of the whole task (currently it is the start_task index from subtask
extra_data).