Skip to content

Commit 72ce717

Browse files
committed
Iterate on kusto and spanner mixin & Add more types
1 parent f8075cd commit 72ce717

18 files changed

+1219
-939
lines changed

graphistry/Plottable.py

Lines changed: 127 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from graphistry.plugins_types.graphviz_types import EdgeAttr, Format, GraphAttr, NodeAttr, Prog
1212
from graphistry.plugins_types.kusto_types import KustoConfig
1313
from graphistry.plugins_types.spanner_types import SpannerConfig
14-
from graphistry.privacy import Mode as PrivacyMode
14+
from graphistry.privacy import Mode as PrivacyMode, Privacy
1515
from graphistry.Engine import EngineAbstract
1616
from graphistry.utils.json import JSONVal
1717

@@ -75,6 +75,7 @@ class Plottable(Protocol):
7575
_height : int
7676
_render : RenderModesConcrete
7777
_url_params : dict
78+
_privacy : Optional[Privacy]
7879
_name : Optional[str]
7980
_description : Optional[str]
8081
_style : Optional[dict]
@@ -157,13 +158,137 @@ def reset_caches(self) -> None:
157158

158159
def addStyle(
159160
self,
160-
fg: Dict[str, Any],
161+
fg: Optional[Dict[str, Any]] = None,
161162
bg: Optional[Dict[str, Any]] = None,
162163
page: Optional[Dict[str, Any]] = None,
163164
logo: Optional[Dict[str, Any]] = None,
164165
) -> 'Plottable':
165166
...
167+
168+
def style(
169+
self,
170+
fg: Optional[Dict[str, Any]] = None,
171+
bg: Optional[Dict[str, Any]] = None,
172+
page: Optional[Dict[str, Any]] = None,
173+
logo: Optional[Dict[str, Any]] = None,
174+
) -> 'Plottable':
175+
...
176+
177+
def encode_point_color(
178+
self,
179+
column: str,
180+
palette: Optional[List[str]] = ...,
181+
as_categorical: Optional[bool] = ...,
182+
as_continuous: Optional[bool] = ...,
183+
categorical_mapping: Optional[Dict[Any, Any]] = ...,
184+
default_mapping: Optional[str] = ...,
185+
for_default: bool = True,
186+
for_current: bool = False,
187+
) -> "Plottable":
188+
...
166189

190+
def encode_edge_color(
191+
self,
192+
column: str,
193+
palette: Optional[List[str]] = ...,
194+
as_categorical: Optional[bool] = ...,
195+
as_continuous: Optional[bool] = ...,
196+
categorical_mapping: Optional[Dict[Any, Any]] = ...,
197+
default_mapping: Optional[str] = ...,
198+
for_default: bool = True,
199+
for_current: bool = False,
200+
) -> "Plottable":
201+
...
202+
203+
def encode_point_size(
204+
self,
205+
column: str,
206+
categorical_mapping: Optional[Dict[Any, Union[int, float]]] = ...,
207+
default_mapping: Optional[Union[int, float]] = ...,
208+
for_default: bool = True,
209+
for_current: bool = False,
210+
) -> "Plottable":
211+
...
212+
213+
214+
def encode_point_icon(
215+
self,
216+
column: str,
217+
categorical_mapping: Optional[Dict[Any, str]] = ...,
218+
continuous_binning: Optional[List[Any]] = ...,
219+
default_mapping: Optional[str] = ...,
220+
comparator: Optional[Callable[[Any, Any], int]] = ...,
221+
for_default: bool = True,
222+
for_current: bool = False,
223+
as_text: bool = False,
224+
blend_mode: Optional[str] = ...,
225+
style: Optional[Dict[str, Any]] = ...,
226+
border: Optional[Dict[str, Any]] = ...,
227+
shape: Optional[str] = ...,
228+
) -> "Plottable":
229+
...
230+
231+
232+
def encode_edge_icon(
233+
self,
234+
column: str,
235+
categorical_mapping: Optional[Dict[Any, str]] = ...,
236+
continuous_binning: Optional[List[Any]] = ...,
237+
default_mapping: Optional[str] = ...,
238+
comparator: Optional[Callable[[Any, Any], int]] = ...,
239+
for_default: bool = True,
240+
for_current: bool = False,
241+
as_text: bool = False,
242+
blend_mode: Optional[str] = ...,
243+
style: Optional[Dict[str, Any]] = ...,
244+
border: Optional[Dict[str, Any]] = ...,
245+
shape: Optional[str] = ...,
246+
) -> "Plottable":
247+
...
248+
249+
250+
def encode_point_badge(
251+
self,
252+
column: str,
253+
position: str = "TopRight",
254+
categorical_mapping: Optional[Dict[Any, Any]] = ...,
255+
continuous_binning: Optional[List[Any]] = ...,
256+
default_mapping: Optional[Any] = ...,
257+
comparator: Optional[Callable[[Any, Any], int]] = ...,
258+
color: Optional[str] = ...,
259+
bg: Optional[str] = ...,
260+
fg: Optional[str] = ...,
261+
for_current: bool = False,
262+
for_default: bool = True,
263+
as_text: Optional[bool] = ...,
264+
blend_mode: Optional[str] = ...,
265+
style: Optional[Dict[str, Any]] = ...,
266+
border: Optional[Dict[str, Any]] = ...,
267+
shape: Optional[str] = ...,
268+
) -> "Plottable":
269+
...
270+
271+
def encode_edge_badge(
272+
self,
273+
column: str,
274+
position: str = "TopRight",
275+
categorical_mapping: Optional[Dict[Any, Any]] = ...,
276+
continuous_binning: Optional[List[Any]] = ...,
277+
default_mapping: Optional[Any] = ...,
278+
comparator: Optional[Callable[[Any, Any], int]] = ...,
279+
color: Optional[str] = ...,
280+
bg: Optional[str] = ...,
281+
fg: Optional[str] = ...,
282+
for_current: bool = False,
283+
for_default: bool = True,
284+
as_text: Optional[bool] = ...,
285+
blend_mode: Optional[str] = ...,
286+
style: Optional[Dict[str, Any]] = ...,
287+
border: Optional[Dict[str, Any]] = ...,
288+
shape: Optional[str] = ...,
289+
) -> "Plottable":
290+
...
291+
167292
def name(self, name: str) -> 'Plottable':
168293
...
169294

@@ -666,5 +791,3 @@ def transform_umap(self, df: pd.DataFrame,
666791
) -> Union[Tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame], 'Plottable']:
667792
...
668793

669-
670-

0 commit comments

Comments
 (0)