tts-data-utils 0.7.3__py3-none-any.whl

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 (72) hide show
  1. tts_data_utils/__init__.py +0 -0
  2. tts_data_utils/core/__init__.py +0 -0
  3. tts_data_utils/core/container_history.py +79 -0
  4. tts_data_utils/core/data_container.py +2102 -0
  5. tts_data_utils/core/data_item.py +487 -0
  6. tts_data_utils/core/diff.py +155 -0
  7. tts_data_utils/core/generic.py +78 -0
  8. tts_data_utils/core/lorem_utils.py +206 -0
  9. tts_data_utils/core/visual_diff.py +148 -0
  10. tts_data_utils/invulnerable_data_manager/__init__.py +0 -0
  11. tts_data_utils/invulnerable_data_manager/batch.py +176 -0
  12. tts_data_utils/invulnerable_data_manager/invulnerable_data_manager.py +171 -0
  13. tts_data_utils/invulnerable_data_manager/utilities.py +151 -0
  14. tts_data_utils/multimission/__init__.py +0 -0
  15. tts_data_utils/multimission/alarms.py +109 -0
  16. tts_data_utils/multimission/eha.py +253 -0
  17. tts_data_utils/multimission/evr.py +340 -0
  18. tts_data_utils/multimission/evr_gaps.py +148 -0
  19. tts_data_utils/multimission/expected_lad.py +161 -0
  20. tts_data_utils/multimission/planning_rule.py +106 -0
  21. tts_data_utils/multimission/taco.py +53 -0
  22. tts_data_utils/test/__init__.py +0 -0
  23. tts_data_utils/test/core/__init__.py +0 -0
  24. tts_data_utils/test/core/test_data_container.py +403 -0
  25. tts_data_utils/test/core/test_data_item.py +92 -0
  26. tts_data_utils/test/core/test_diff.py +173 -0
  27. tts_data_utils/test/core/test_files/diff/diff_dict/actual_diff.csv +5135 -0
  28. tts_data_utils/test/core/test_files/diff/diff_dict/expected_diff.csv +5135 -0
  29. tts_data_utils/test/core/test_files/diff/diff_dict/left.csv +637 -0
  30. tts_data_utils/test/core/test_files/diff/diff_dict/right.csv +637 -0
  31. tts_data_utils/test/core/test_files/diff/diff_list/actual_diff.csv +5135 -0
  32. tts_data_utils/test/core/test_files/diff/diff_list/expected_diff.csv +5135 -0
  33. tts_data_utils/test/core/test_files/diff/diff_list/left.csv +637 -0
  34. tts_data_utils/test/core/test_files/diff/diff_list/right.csv +637 -0
  35. tts_data_utils/test/core/test_files/diff/diff_list_size/actual_diff.csv +33 -0
  36. tts_data_utils/test/core/test_files/diff/diff_list_size/expected_diff.csv +33 -0
  37. tts_data_utils/test/core/test_files/diff/diff_list_size/left.csv +637 -0
  38. tts_data_utils/test/core/test_files/diff/diff_list_size/right.csv +637 -0
  39. tts_data_utils/test/core/test_files/diff/diff_simple_types/actual_diff.csv +17894 -0
  40. tts_data_utils/test/core/test_files/diff/diff_simple_types/expected_diff.csv +17894 -0
  41. tts_data_utils/test/core/test_files/diff/diff_simple_types/left.csv +637 -0
  42. tts_data_utils/test/core/test_files/diff/diff_simple_types/right.csv +637 -0
  43. tts_data_utils/test/core/test_files/diff/diff_type/actual_diff.csv +5135 -0
  44. tts_data_utils/test/core/test_files/diff/diff_type/expected_diff.csv +5135 -0
  45. tts_data_utils/test/core/test_files/diff/diff_type/left.csv +637 -0
  46. tts_data_utils/test/core/test_files/diff/diff_type/right.csv +637 -0
  47. tts_data_utils/test/core/test_files/diff/same_not_same/actual_diff.csv +5135 -0
  48. tts_data_utils/test/core/test_files/visdiff/adjacent_insert_delete.html +1581 -0
  49. tts_data_utils/test/core/test_files/visdiff/insert_and_delete.html +1581 -0
  50. tts_data_utils/test/core/test_files/visdiff/no_diff.html +1581 -0
  51. tts_data_utils/test/core/test_files/visdiff/overlapping_insert_delete.html +1541 -0
  52. tts_data_utils/test/core/test_files/visdiff/replace.html +1581 -0
  53. tts_data_utils/test/core/test_files/visdiff/replace_with_delete.html +1581 -0
  54. tts_data_utils/test/core/test_files/visdiff/simple_delete.html +1581 -0
  55. tts_data_utils/test/core/test_files/visdiff/simple_insert.html +1581 -0
  56. tts_data_utils/test/core/test_files/visdiff/stressing_case.html +2061 -0
  57. tts_data_utils/test/core/test_filters.py +319 -0
  58. tts_data_utils/test/core/test_generic_container.py +22 -0
  59. tts_data_utils/test/core/test_history.py +44 -0
  60. tts_data_utils/test/core/test_visdiff.py +193 -0
  61. tts_data_utils/test/invulnerable_data_manager/test_invulnerable_data_manager.py +150 -0
  62. tts_data_utils/test/multimission/__init__.py +0 -0
  63. tts_data_utils/test/multimission/evr/__init__.py +0 -0
  64. tts_data_utils/test/multimission/evr/test_evr.py +29 -0
  65. tts_data_utils/test/multimission/evr/test_files/actual_evr_gaps.csv +12 -0
  66. tts_data_utils/test/multimission/evr/test_files/evrs_with_gaps.csv +30 -0
  67. tts_data_utils/test/multimission/evr/test_files/expected_evr_gaps.csv +12 -0
  68. tts_data_utils/util.py +104 -0
  69. tts_data_utils-0.7.3.dist-info/METADATA +81 -0
  70. tts_data_utils-0.7.3.dist-info/RECORD +72 -0
  71. tts_data_utils-0.7.3.dist-info/WHEEL +5 -0
  72. tts_data_utils-0.7.3.dist-info/top_level.txt +1 -0
File without changes
File without changes
@@ -0,0 +1,79 @@
1
+ import pdb
2
+ from abc import ABC, abstractmethod
3
+
4
+ from tts_data_utils.core.data_container import DataContainer
5
+ from tts_data_utils.core.data_item import DataItem
6
+
7
+ from jpl_time import Time
8
+
9
+ class DataContainerHistoryItem(DataItem):
10
+ """
11
+ DataItem to go with DataContainerHistoryContainer
12
+
13
+ :param Action: Which action was taken at the step represented in this row?
14
+ :type Action: str
15
+
16
+ :param Description: Description of the action taken at the step represented in this row
17
+ :type Description: str
18
+
19
+ :param Ending Count: Number of records after the action was taken
20
+ :type Ending Count: int
21
+
22
+ :param Starting Count: Number of records before the action was taken
23
+ :type Starting Count: int
24
+
25
+ :param Percent Remaining: Percentage of records at this step relative to previous step
26
+ :type Percent Remaining: float
27
+
28
+ """
29
+
30
+ DICT_VALID_KEYS = [
31
+ ('Action', str),
32
+ ('Description', str),
33
+ ('Ending Count', (int, float, str)),
34
+ ('Starting Count', (int, float, str)),
35
+ ('Percent Remaining', (int, float, str))
36
+ ]
37
+
38
+ def __sub_init(self):
39
+ return
40
+
41
+ def time(self):
42
+ return
43
+
44
+ class DataContainerHistoryContainer(DataContainer):
45
+ """
46
+ A special container that is added by default to all data containers (except history
47
+ containers to avoid infinite recursion).
48
+
49
+ As containers are filtered, appended, and sliced, it can become difficult to trace
50
+ how a particular came to be. The DataContainerHistoryContiner tracks actions that
51
+ have been taken in order to build a container from its initial metadata and including
52
+ each manipulation that happens going forward.
53
+
54
+ Data Container history is not meant to make previous states of the container
55
+ reproducable, but just to offer a crutch in debugging code.
56
+
57
+ The number of records is also provided to enable some level of data analysis based
58
+ on filtering values.
59
+
60
+ :param name: The name of this instantiation of the data container.
61
+ :type name: str
62
+
63
+ :param metadata: Dictionary of open-ended metadata that can be provided in extensions of DataContainer
64
+ :type metadata: dict
65
+ """
66
+
67
+ NAME = 'data container history'
68
+ DATA_ITEM_CLS = DataContainerHistoryItem
69
+
70
+ def __init__(self, name, metadata):
71
+ super().__init__()
72
+ self.name = name
73
+ self.metadata = metadata
74
+ self.records = []
75
+ self._repr_cols = ['Action', 'Description', 'Starting Count', 'Ending Count', 'Percent Remaining']
76
+
77
+ @property
78
+ def repr_cols(self):
79
+ return self._repr_cols