datastock 0.0.38__tar.gz → 0.0.39__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 (49) hide show
  1. {datastock-0.0.38/datastock.egg-info → datastock-0.0.39}/PKG-INFO +1 -1
  2. {datastock-0.0.38 → datastock-0.0.39}/datastock/_class1.py +32 -1
  3. {datastock-0.0.38 → datastock-0.0.39}/datastock/_class1_show.py +120 -3
  4. {datastock-0.0.38 → datastock-0.0.39}/datastock/_plot_as_array.py +1 -1
  5. {datastock-0.0.38 → datastock-0.0.39}/datastock/_plot_as_array_234d.py +1 -1
  6. {datastock-0.0.38 → datastock-0.0.39}/datastock/version.py +1 -1
  7. {datastock-0.0.38 → datastock-0.0.39/datastock.egg-info}/PKG-INFO +1 -1
  8. {datastock-0.0.38 → datastock-0.0.39}/LICENSE +0 -0
  9. {datastock-0.0.38 → datastock-0.0.39}/MANIFEST.in +0 -0
  10. {datastock-0.0.38 → datastock-0.0.39}/README.md +0 -0
  11. {datastock-0.0.38 → datastock-0.0.39}/_updateversion.py +0 -0
  12. {datastock-0.0.38 → datastock-0.0.39}/datastock/_DataCollection_utils.py +0 -0
  13. {datastock-0.0.38 → datastock-0.0.39}/datastock/__init__.py +0 -0
  14. {datastock-0.0.38 → datastock-0.0.39}/datastock/_class.py +0 -0
  15. {datastock-0.0.38 → datastock-0.0.39}/datastock/_class0.py +0 -0
  16. {datastock-0.0.38 → datastock-0.0.39}/datastock/_class1_binning.py +0 -0
  17. {datastock-0.0.38 → datastock-0.0.39}/datastock/_class1_check.py +0 -0
  18. {datastock-0.0.38 → datastock-0.0.39}/datastock/_class1_compute.py +0 -0
  19. {datastock-0.0.38 → datastock-0.0.39}/datastock/_class1_domain.py +0 -0
  20. {datastock-0.0.38 → datastock-0.0.39}/datastock/_class1_interpolate.py +0 -0
  21. {datastock-0.0.38 → datastock-0.0.39}/datastock/_class1_uniformize.py +0 -0
  22. {datastock-0.0.38 → datastock-0.0.39}/datastock/_class2.py +0 -0
  23. {datastock-0.0.38 → datastock-0.0.39}/datastock/_class2_interactivity.py +0 -0
  24. {datastock-0.0.38 → datastock-0.0.39}/datastock/_class3.py +0 -0
  25. {datastock-0.0.38 → datastock-0.0.39}/datastock/_direct_calls.py +0 -0
  26. {datastock-0.0.38 → datastock-0.0.39}/datastock/_export_dataframe.py +0 -0
  27. {datastock-0.0.38 → datastock-0.0.39}/datastock/_find_plateau.py +0 -0
  28. {datastock-0.0.38 → datastock-0.0.39}/datastock/_generic_check.py +0 -0
  29. {datastock-0.0.38 → datastock-0.0.39}/datastock/_generic_utils.py +0 -0
  30. {datastock-0.0.38 → datastock-0.0.39}/datastock/_generic_utils_plot.py +0 -0
  31. {datastock-0.0.38 → datastock-0.0.39}/datastock/_plot_BvsA_as_distribution.py +0 -0
  32. {datastock-0.0.38 → datastock-0.0.39}/datastock/_plot_BvsA_as_distribution_check.py +0 -0
  33. {datastock-0.0.38 → datastock-0.0.39}/datastock/_plot_as_array_1d.py +0 -0
  34. {datastock-0.0.38 → datastock-0.0.39}/datastock/_plot_as_mobile_lines.py +0 -0
  35. {datastock-0.0.38 → datastock-0.0.39}/datastock/_plot_as_profile1d.py +0 -0
  36. {datastock-0.0.38 → datastock-0.0.39}/datastock/_plot_correlations.py +0 -0
  37. {datastock-0.0.38 → datastock-0.0.39}/datastock/_plot_old_backup.py +0 -0
  38. {datastock-0.0.38 → datastock-0.0.39}/datastock/_plot_text.py +0 -0
  39. {datastock-0.0.38 → datastock-0.0.39}/datastock/_saveload.py +0 -0
  40. {datastock-0.0.38 → datastock-0.0.39}/datastock/tests/__init__.py +0 -0
  41. {datastock-0.0.38 → datastock-0.0.39}/datastock/tests/output/__init__.py +0 -0
  42. {datastock-0.0.38 → datastock-0.0.39}/datastock/tests/test_01_DataStock.py +0 -0
  43. {datastock-0.0.38 → datastock-0.0.39}/datastock.egg-info/SOURCES.txt +0 -0
  44. {datastock-0.0.38 → datastock-0.0.39}/datastock.egg-info/dependency_links.txt +0 -0
  45. {datastock-0.0.38 → datastock-0.0.39}/datastock.egg-info/requires.txt +0 -0
  46. {datastock-0.0.38 → datastock-0.0.39}/datastock.egg-info/top_level.txt +0 -0
  47. {datastock-0.0.38 → datastock-0.0.39}/pyproject.toml +0 -0
  48. {datastock-0.0.38 → datastock-0.0.39}/setup.cfg +0 -0
  49. {datastock-0.0.38 → datastock-0.0.39}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datastock
3
- Version: 0.0.38
3
+ Version: 0.0.39
4
4
  Summary: A python library for generic class and data handling
5
5
  Home-page: https://github.com/ToFuProject/datastock
6
6
  Author: Didier VEZINET
@@ -977,6 +977,37 @@ class DataStock1(DataStock0):
977
977
  def show_interactive(self):
978
978
  self.show(show_which=['axes', 'mobile', 'interactivity'])
979
979
 
980
+ def show_details(
981
+ self,
982
+ key=None,
983
+ which=None,
984
+ # pretty print options
985
+ sep=None,
986
+ line=None,
987
+ justify=None,
988
+ table_sep=None,
989
+ # bool options
990
+ verb=True,
991
+ returnas=False,
992
+ ):
993
+ """ Summary description of the object content """
994
+ return _class1_show.main_details(
995
+ coll=self,
996
+ which=which,
997
+ key=key,
998
+ # pretty print options
999
+ sep=sep,
1000
+ line=line,
1001
+ justify=justify,
1002
+ table_sep=table_sep,
1003
+ # bool options
1004
+ verb=verb,
1005
+ returnas=returnas,
1006
+ )
1007
+
1008
+ def _get_show_details(self, which=None, key=None):
1009
+ raise NotImplementedError()
1010
+
980
1011
  def __repr__(self):
981
1012
  try:
982
1013
  return self.show(returnas=str, verb=False)
@@ -1009,4 +1040,4 @@ class DataStock1(DataStock0):
1009
1040
 
1010
1041
  __all__ = [
1011
1042
  sorted([k0 for k0 in locals() if k0.startswith('DataStock')])[-1]
1012
- ]
1043
+ ]
@@ -13,7 +13,6 @@ from . import _generic_utils
13
13
  from . import _generic_check
14
14
 
15
15
 
16
-
17
16
  #############################################
18
17
  #############################################
19
18
  # Main
@@ -77,7 +76,13 @@ def main(
77
76
  for k0 in coll._dobj.keys():
78
77
  if 'obj' in show_which or k0 in show_which:
79
78
  func = coll._get_show_obj(k0)
80
- lcol, lar = func(coll=coll, which=k0, lcol=lcol, lar=lar, show=show)
79
+ lcol, lar = func(
80
+ coll=coll,
81
+ which=k0,
82
+ lcol=lcol,
83
+ lar=lar,
84
+ show=show,
85
+ )
81
86
 
82
87
  return _generic_utils.pretty_print(
83
88
  headers=lcol,
@@ -403,4 +408,116 @@ def _show_extract(dobj=None, lk=None):
403
408
  else:
404
409
  lv0.append(str(v0))
405
410
 
406
- return lv0
411
+ return lv0
412
+
413
+
414
+ #############################################
415
+ #############################################
416
+ # Main - details
417
+ #############################################
418
+
419
+
420
+ def main_details(
421
+ coll=None,
422
+ # options
423
+ which=None,
424
+ key=None,
425
+ # print parameters
426
+ sep=None,
427
+ line=None,
428
+ justify=None,
429
+ table_sep=None,
430
+ # bool options
431
+ verb=True,
432
+ returnas=False,
433
+ ):
434
+
435
+ # -------------
436
+ # check inputs
437
+ # -------------
438
+
439
+ which, key = _check_details(
440
+ coll=coll,
441
+ which=which,
442
+ key=key,
443
+ )
444
+
445
+ # intialize
446
+ lcol, lar = [], []
447
+
448
+ # -----------------------
449
+ # Build for dobj
450
+ # -----------------------
451
+
452
+ func = coll._get_show_details(which=which)
453
+ lcol, lar = func(
454
+ coll=coll,
455
+ key=key,
456
+ lcol=lcol,
457
+ lar=lar,
458
+ )
459
+
460
+ return _generic_utils.pretty_print(
461
+ headers=lcol,
462
+ content=lar,
463
+ sep=sep,
464
+ line=line,
465
+ table_sep=table_sep,
466
+ verb=verb,
467
+ returnas=returnas,
468
+ )
469
+
470
+
471
+ ###########################################################
472
+ ###########################################################
473
+ # check details
474
+ ###########################################################
475
+
476
+
477
+ def _check_details(
478
+ coll=None,
479
+ which=None,
480
+ key=None,
481
+ ):
482
+
483
+ # -------------
484
+ # key
485
+ # -------------
486
+
487
+ lok_which = list(coll._dobj.keys())
488
+ dkey = {}
489
+ for kw in lok_which:
490
+ dkey.update({
491
+ k1: kw for k1 in coll.dobj[kw].keys()
492
+ })
493
+
494
+ # check
495
+ try:
496
+ key = _generic_check._check_var(
497
+ key, 'key',
498
+ types=str,
499
+ allowed=list(dkey.keys()),
500
+ )
501
+
502
+ which = dkey[key]
503
+
504
+ except Exception:
505
+
506
+ # -------------
507
+ # show_which
508
+
509
+ lok = list(coll._dobj.keys())
510
+ which = _generic_check._check_var(
511
+ which, 'which',
512
+ types=str,
513
+ allowed=lok,
514
+ )
515
+
516
+ lok = [k1 for k1, kw in dkey.items() if kw == which]
517
+ key = _generic_check._check_var(
518
+ key, 'key',
519
+ types=str,
520
+ allowed=lok,
521
+ )
522
+
523
+ return which, key
@@ -906,4 +906,4 @@ def get_data_str(dk=None, coll2=None, key=None, ndim=None, dscale=None):
906
906
  else:
907
907
  lab = f"{key} ({units})"
908
908
 
909
- return dk, key, lab
909
+ return dk, key, lab
@@ -783,4 +783,4 @@ def _label_axes(
783
783
  ax.set_xticks([])
784
784
  ax.set_yticks([])
785
785
 
786
- return dax
786
+ return dax
@@ -1,2 +1,2 @@
1
1
  # Do not edit, pipeline versioning governed by git tags!
2
- __version__ = '0.0.38'
2
+ __version__ = '0.0.39'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datastock
3
- Version: 0.0.38
3
+ Version: 0.0.39
4
4
  Summary: A python library for generic class and data handling
5
5
  Home-page: https://github.com/ToFuProject/datastock
6
6
  Author: Didier VEZINET
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes