timetoalign 0.0.1__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.
@@ -0,0 +1,11 @@
1
+ Metadata-Version: 2.4
2
+ Name: timetoalign
3
+ Version: 0.0.1
4
+ Home-page: https://github.com/TimeToAlign
5
+ Author: Johannes Hentschel
6
+ Author-email: johannes.hentschel@bruckneruni.at
7
+ Classifier: Development Status :: 1 - Planning
8
+ Dynamic: author
9
+ Dynamic: author-email
10
+ Dynamic: classifier
11
+ Dynamic: home-page
@@ -0,0 +1,13 @@
1
+ tta/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
2
+ tta/common.py,sha256=xE0gvVxUHk-a-Z9ZZpM934F8leK6zz5kgf7ACboruxs,1416
3
+ tta/conversions.py,sha256=ZicwLxvNK4rBvLCe15zwa66ZVoxISd0WZDYDGj7ISYk,136988
4
+ tta/events.py,sha256=eguR00iwZOjzCQOapeCtQEJtqXXPeBhNQOIIBuc12C4,48908
5
+ tta/parsing.py,sha256=hHemufjqW7JiKmX3g1yqIg7ruSdwiGRvhQvj3MseyQc,79389
6
+ tta/registry.py,sha256=Db__uJ0Xrg6BMJNEv0xOBBZPpbDgUKLlATLpCy3-Dlw,17844
7
+ tta/representations.py,sha256=-l3H0UNvtqTSwdkl39wvXv-932TWV3B2SpVWBFU_Tx0,29407
8
+ tta/timelines.py,sha256=IBvme04Ya-c_zj3s1Ve6nUszf2GsMkoBWCBow9bzXZg,80813
9
+ tta/utils.py,sha256=uxuGgcwyDhoIhm_67r3H0hgVv5iZ1L_6qncqL0tzn2M,30343
10
+ timetoalign-0.0.1.dist-info/METADATA,sha256=q3xeNeFDIgu39EGsXpCcv-jEG2Mfc8ACxMcaFr2IcHY,296
11
+ timetoalign-0.0.1.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
12
+ timetoalign-0.0.1.dist-info/top_level.txt,sha256=I5Ug7Ya3tBKuLOD7isIv1E8oWjXGfF4zyh6nm4KlNzs,4
13
+ timetoalign-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (78.1.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ tta
tta/__init__.py ADDED
@@ -0,0 +1 @@
1
+
tta/common.py ADDED
@@ -0,0 +1,58 @@
1
+ import logging
2
+ from typing import Optional, Generic, TypeVar
3
+
4
+ from processing.tta.registry import register_object, register_class
5
+
6
+ D = TypeVar("D") # any data type
7
+
8
+ class RegisteredObject(Generic[D]):
9
+ """
10
+ Base class for objects that will be managed by an ObjectRegistry.
11
+ """
12
+
13
+ @classmethod
14
+ @property
15
+ def class_name(cls) -> str:
16
+ return str(cls.__name__)
17
+
18
+ @classmethod
19
+ @property
20
+ def logger(cls) -> logging.Logger:
21
+ return logging.getLogger(cls.__module__ + '.' + cls.__name__)
22
+
23
+ def __init_subclass__(cls, **kwargs):
24
+ super().__init_subclass__(**kwargs)
25
+ register_class(cls)
26
+
27
+
28
+ def __init__(
29
+ self,
30
+ id_prefix: str,
31
+ uid: Optional[str] = None,
32
+ *args,
33
+ **kwargs
34
+ ):
35
+ given_id = kwargs.pop("given_id", None)
36
+ self._id: str = ""
37
+ _ = register_object( # assigns ID
38
+ self,
39
+ id_prefix=id_prefix,
40
+ uid=uid,
41
+ description=given_id
42
+ )
43
+ # super().__init__(*args, **kwargs)
44
+
45
+ @property
46
+ def id(self):
47
+ return self._id
48
+
49
+ def __repr__(self) -> str:
50
+ return f"{self.class_name}(id={self.id!r})"
51
+
52
+ def __hash__(self) -> int:
53
+ return hash(self.id)
54
+
55
+ def __eq__(self, other) -> bool:
56
+ if isinstance(other, RegisteredObject):
57
+ return self.id == other.id
58
+ return False