dashlab 0.3.1__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. {dashlab-0.3.1 → dashlab-0.3.2}/PKG-INFO +1 -1
  2. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/_version.py +1 -1
  3. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/base.py +8 -16
  4. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/static/listw.css +4 -0
  5. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab.egg-info/PKG-INFO +1 -1
  6. {dashlab-0.3.1 → dashlab-0.3.2}/LICENSE +0 -0
  7. {dashlab-0.3.1 → dashlab-0.3.2}/README.md +0 -0
  8. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/__init__.py +0 -0
  9. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/_internal.py +0 -0
  10. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/core.py +0 -0
  11. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/patches.py +0 -0
  12. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/static/animator.css +0 -0
  13. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/static/animator.js +0 -0
  14. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/static/fscreen.css +0 -0
  15. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/static/fscreen.js +0 -0
  16. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/static/listw.js +0 -0
  17. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/utils.py +0 -0
  18. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab/widgets.py +0 -0
  19. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab.egg-info/SOURCES.txt +0 -0
  20. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab.egg-info/dependency_links.txt +0 -0
  21. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab.egg-info/requires.txt +0 -0
  22. {dashlab-0.3.1 → dashlab-0.3.2}/dashlab.egg-info/top_level.txt +0 -0
  23. {dashlab-0.3.1 → dashlab-0.3.2}/pyproject.toml +0 -0
  24. {dashlab-0.3.1 → dashlab-0.3.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dashlab
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: A Python package for dashboard and data visualization tools.
5
5
  Author-email: Abdul Saboor <asaboor.my@outlook.com>
6
6
  License-Expression: MIT
@@ -1,4 +1,4 @@
1
1
  # This is automatically updated at build time, do not edit manually.
2
2
  # Double qoites are checked here
3
3
 
4
- __version__ = "0.3.1"
4
+ __version__ = "0.3.2"
@@ -420,7 +420,7 @@ class DashboardBase(ipw.interactive, metaclass = _metaclass):
420
420
  raise type(e)(f"In {key!r} of layout: {e}") from e # better error message
421
421
  return layout_widgets
422
422
 
423
- def __unpack_group(self, pattern, groups):
423
+ def __unpack_group(self, pattern):
424
424
  group, excp = pattern.split('!',1) if '!' in pattern else (pattern, '')
425
425
  exclude = []
426
426
  if excp.strip(): # only try to exclude if excp is not empty or just whitespace
@@ -429,17 +429,10 @@ class DashboardBase(ipw.interactive, metaclass = _metaclass):
429
429
  except re.error as e:
430
430
  raise ValueError(f"Invalid exclusion regex pattern {excp!r} in {pattern!r}.\n{e}") from e
431
431
 
432
- if group == '*all':
433
- return [k for k in self.__all_widgets if k not in exclude]
434
- elif group == '*out':
435
- return [n for n in self.__groups.outputs if n not in exclude]
436
- elif group == '*ctrl':
437
- return [n for n in self.__groups.controls if n not in exclude]
438
- elif group == '*repr':
439
- return [n for n in self.__groups.others if n not in exclude]
440
- else:
441
- raise ValueError(f"Invalid special group name {group!r}, valid names are: {groups} followed by optional '!name|regex...' exclusion")
442
-
432
+ if not group in self.__groups:
433
+ raise ValueError(f"Invalid special group name {group!r}, valid names are: {list(self.__groups)} followed by optional '!name|regex...' exclusion")
434
+ return [name for name in self.__groups[group] if name not in exclude]
435
+
443
436
  @_format_docs(**_docs)
444
437
  def gather(self, *widgets: 'str | DOMWidget', verbose: bool=False) -> tuple[DOMWidget]:
445
438
  """Get list of widgets by names or general widgets for layout configuration.
@@ -477,7 +470,7 @@ class DashboardBase(ipw.interactive, metaclass = _metaclass):
477
470
  # Shows: [gather (group)]: *all!debug.* → fig1,fig2,x,y,out-stats
478
471
  ```
479
472
  """
480
- specials = ['*all','*out','*ctrl','*repr']
473
+ specials = list(self.__groups) # special group names
481
474
  Ws, LC = self.__all_widgets, [name.lower() for name in self.__all_widgets] # all widgets by name and lower case for case insensitive search
482
475
 
483
476
  collected = [] # And collect included names keeping exluded out
@@ -495,7 +488,7 @@ class DashboardBase(ipw.interactive, metaclass = _metaclass):
495
488
  elif name.startswith('*'): # special groups
496
489
  names = []
497
490
  try:
498
- names = self.__unpack_group(name, specials)
491
+ names = self.__unpack_group(name)
499
492
  collected.extend([Ws[n] for n in names]) # already filtered above
500
493
  finally:
501
494
  if verbose:
@@ -855,7 +848,6 @@ class DashboardBase(ipw.interactive, metaclass = _metaclass):
855
848
  raise ValueError(f"Function {f.__name__!r} has parameters {extra_params} that are not defined in interactive params.")
856
849
 
857
850
  def __create_groups(self, widgets_dict):
858
- groups = namedtuple('WidgetGropus', ['controls', 'outputs', 'others'])
859
851
  controls, outputs, others = [], [], []
860
852
  for key, widget in widgets_dict.items():
861
853
  if isinstance(widget, ipw.Output):
@@ -871,7 +863,7 @@ class DashboardBase(ipw.interactive, metaclass = _metaclass):
871
863
  widgets_dict[c].add_class('widget-param').add_class('widget-control') # similar to widget-output added by ipywidgets
872
864
  for o in others:
873
865
  widgets_dict[o].add_class('widget-param') # what else
874
- return groups(controls=tuple(controls), outputs=tuple(outputs), others=tuple(others))
866
+ return {'*all': tuple(widgets_dict), '*ctrl': tuple(controls), '*out': tuple(outputs), '*repr': tuple(others)}
875
867
 
876
868
  def __hint_btns_update(self, func):
877
869
  func_params = {k:v for k,v in inspect.signature(func).parameters.items()}
@@ -14,6 +14,9 @@
14
14
  flex-direction: row;
15
15
  margin-bottom: 0;
16
16
  box-sizing: border-box;
17
+ flex-wrap: wrap;
18
+ overflow-x: hidden;
19
+ padding-left: 4px;
17
20
  }
18
21
 
19
22
  .list-widget:hover .list-item {
@@ -106,6 +109,7 @@
106
109
  .tabs-widget .list-widget.tabs {
107
110
  border-radius: 4px 4px 0 0;
108
111
  border-bottom: 1px inset #8884;
112
+ padding-left: 0;
109
113
  }
110
114
 
111
115
  .tabs-widget .list-widget.tabs .list-item:hover {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dashlab
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: A Python package for dashboard and data visualization tools.
5
5
  Author-email: Abdul Saboor <asaboor.my@outlook.com>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes