orca-python 0.7.0__py3-none-any.whl → 0.7.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.
orca_python/main.py CHANGED
@@ -10,8 +10,11 @@ import re
10
10
  import sys
11
11
  import asyncio
12
12
  import logging
13
+ import datetime as dt
13
14
  import traceback
14
15
 
16
+ from google.protobuf import timestamp_pb2
17
+
15
18
  logging.basicConfig(
16
19
  level=logging.INFO,
17
20
  format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
@@ -150,8 +153,8 @@ T = TypeVar("T", bound=AlgorithmFn)
150
153
 
151
154
  @dataclass
152
155
  class Window:
153
- time_from: int
154
- time_to: int
156
+ time_from: dt.datetime
157
+ time_to: dt.datetime
155
158
  name: str
156
159
  version: str
157
160
  origin: str
@@ -167,9 +170,15 @@ def EmitWindow(window: Window) -> None:
167
170
  """
168
171
  LOGGER.info(f"Emitting window: {window}")
169
172
 
173
+ _time_from = timestamp_pb2.Timestamp()
174
+ _time_from.FromDatetime(window.time_from)
175
+
176
+ _time_to = timestamp_pb2.Timestamp()
177
+ _time_to.FromDatetime(window.time_to)
178
+
170
179
  window_pb = pb.Window()
171
- window_pb.time_to = window.time_to
172
- window_pb.time_from = window.time_from
180
+ window_pb.time_to = _time_from
181
+ window_pb.time_from = _time_to
173
182
  window_pb.window_type_name = window.name
174
183
  window_pb.window_type_version = window.version
175
184
  window_pb.origin = window.origin
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: orca-python
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: Python SDK for the Predixus Orca product
5
5
  Author: Frederick Mannings
6
6
  Author-email: contact@predixus.com
@@ -9,9 +9,9 @@ vendor/validate_pb2_grpc.py,sha256=qIlTS0MGHE7myQ7tCMbS-pPqA9FMZl_Hn9Mh_uq2o9o,8
9
9
  orca_python/__init__.py,sha256=tHVOEF69iiLzbymMTuEKdbGSqeaAzpc-BiZY7VY1Gz4,362
10
10
  orca_python/envs.py,sha256=zSuukNSpEw78VpSSIDAA9KRAurWedQMwx1qyQg9f8pk,560
11
11
  orca_python/exceptions.py,sha256=WjkKGQvmS8Z7L63rIROnLFjA-8sGX5R9714xgD1j_7E,512
12
- orca_python/main.py,sha256=3nRxUNOqU4IXuQYkyjQVFLdsgAwemFWScCwuE6RKxs0,29408
12
+ orca_python/main.py,sha256=zKRWZX_Rh63vcK0QL6TSUz0DuulHkqz0oObpAnDVfTc,29651
13
13
  orca_python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- orca_python-0.7.0.dist-info/LICENSE,sha256=sxb8X8qhbZ_JaCBFmoIriJzA-jelKmh86sAKQsIRN_I,1062
15
- orca_python-0.7.0.dist-info/METADATA,sha256=o-6F9dfhcXJ5Oa4ivf4iMddUd_0i_ZqoC5rPdqbdTxU,3019
16
- orca_python-0.7.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
17
- orca_python-0.7.0.dist-info/RECORD,,
14
+ orca_python-0.7.1.dist-info/LICENSE,sha256=sxb8X8qhbZ_JaCBFmoIriJzA-jelKmh86sAKQsIRN_I,1062
15
+ orca_python-0.7.1.dist-info/METADATA,sha256=qEE8Eh7vSr7OtvNFI2ATiAvJ1tUZtd1-l_pvFRApA8o,3019
16
+ orca_python-0.7.1.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
17
+ orca_python-0.7.1.dist-info/RECORD,,