oocana 0.15.4__py3-none-any.whl → 0.16.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.
oocana/context.py CHANGED
@@ -39,10 +39,11 @@ class Context:
39
39
  __is_done: bool = False
40
40
  __keep_alive: OnlyEqualSelf = OnlyEqualSelf()
41
41
  __session_dir: str
42
+ __tmp_dir: str
42
43
  _logger: Optional[logging.Logger] = None
43
44
 
44
45
  def __init__(
45
- self, inputs: Dict[str, Any], blockInfo: BlockInfo, mainframe: Mainframe, store, outputs, session_dir: str
46
+ self, inputs: Dict[str, Any], blockInfo: BlockInfo, mainframe: Mainframe, store, outputs, session_dir: str, tmp_dir: str
46
47
  ) -> None:
47
48
 
48
49
  self.__block_info = blockInfo
@@ -57,6 +58,7 @@ class Context:
57
58
  outputs_defs[k] = HandleDef(**v)
58
59
  self.__outputs_def = outputs_defs
59
60
  self.__session_dir = session_dir
61
+ self.__tmp_dir = tmp_dir
60
62
 
61
63
  @property
62
64
  def logger(self) -> logging.Logger:
@@ -73,6 +75,12 @@ class Context:
73
75
  """a temporary directory for the current session, all blocks in the one session will share the same directory.
74
76
  """
75
77
  return self.__session_dir
78
+
79
+ @property
80
+ def tmp_dir(self) -> str:
81
+ """a temporary directory for the current follow, all blocks in the this flow will share the same directory. this directory will be cleaned if this session finish successfully, otherwise it will be kept for debugging or other purpose.
82
+ """
83
+ return self.__tmp_dir
76
84
 
77
85
  @property
78
86
  def keepAlive(self):
@@ -121,6 +129,10 @@ class Context:
121
129
  "gpu_vendor": os.getenv("OOMOL_HOST_GPU_VENDOR", "unknown"),
122
130
  "gpu_renderer": os.getenv("OOMOL_HOST_GPU_RENDERER", "unknown"),
123
131
  }
132
+
133
+ @property
134
+ def is_done(self) -> bool:
135
+ return self.__is_done
124
136
 
125
137
  def __store_ref(self, handle: str):
126
138
  return StoreKey(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: oocana
3
- Version: 0.15.4
3
+ Version: 0.16.1
4
4
  Summary: python implement of oocana to give a context for oocana block
5
5
  License: MIT
6
6
  Requires-Python: >=3.9
@@ -1,8 +1,8 @@
1
- oocana-0.15.4.dist-info/METADATA,sha256=TdDtwa_A4ZP4Z1ZLodAnbhLpaHPTCRkGc5MWycXjODM,287
2
- oocana-0.15.4.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
- oocana-0.15.4.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
1
+ oocana-0.16.1.dist-info/METADATA,sha256=FRtIBiqRy9ExCm38VrwyWrr-cTUMYh3kp0VTGKsNv5Y,287
2
+ oocana-0.16.1.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
3
+ oocana-0.16.1.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
4
  oocana/__init__.py,sha256=zMrQ1asZoRE91-BShf1v2ibdThaMc07YtZt5iNbbxsg,281
5
- oocana/context.py,sha256=S4SNHjJouOenll7gLvHS4HWYqyGKvI2u6kwOZberSaY,11764
5
+ oocana/context.py,sha256=5XUvlZNS9dCM6GcmaOTHFNnPyjosX-tXuQudLM28oSM,12243
6
6
  oocana/data.py,sha256=ex042cqPHxqyRI8nuQBCguL1aLKX-7GGDughc-EAPqY,2939
7
7
  oocana/handle_data.py,sha256=p0iEvdsVV3BqcelM8rvq0a_VPI52SeahaGCszfhZ0TI,1927
8
8
  oocana/mainframe.py,sha256=VwqvjLlxLKqzzRjqPjWS-rsqRI5jiaq73l90hVBUu8g,5164
@@ -10,4 +10,4 @@ oocana/preview.py,sha256=sAKcVUFmOMvrzYLrvqAxd26SppSvK1qJqRTHdAS-KDc,1959
10
10
  oocana/schema.py,sha256=8LwMaW4eXa3EmKxR4kzyTOpZiClMRMMsMA6f9CXodW4,4332
11
11
  oocana/service.py,sha256=dPCcScQfMBlEjIodFnKU17-HlbBzrQbQK6CNRw7SmOE,2442
12
12
  oocana/throtter.py,sha256=xTldm2OZ5uYPiyC6Aatug4FJAoMylPjtXftxHvSr_50,1104
13
- oocana-0.15.4.dist-info/RECORD,,
13
+ oocana-0.16.1.dist-info/RECORD,,