ocean-runner 0.2.9__tar.gz → 0.2.11__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.

Potentially problematic release.


This version of ocean-runner might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ocean-runner
3
- Version: 0.2.9
3
+ Version: 0.2.11
4
4
  Summary: A fluent API for OceanProtocol algorithms
5
5
  Project-URL: Homepage, https://github.com/AgrospAI/ocean-runner
6
6
  Project-URL: Issues, https://github.com/AgrospAI/ocean-runner/issues
@@ -134,11 +134,6 @@ Algorithm(
134
134
  """
135
135
  Random secret to use while testing.
136
136
  """
137
-
138
- runtime: "dev",
139
- """
140
- Runtime mode. "dev" to run normally, "test" to run pytest
141
- """
142
137
  )
143
138
  """
144
139
  Should not be needed in production algorithms, used to mock environment variables, defaults to using env.
@@ -197,4 +192,3 @@ Environment variables:
197
192
  - `TRANSFORMATION_DID` Algorithm DID, must have format: `abc..90`
198
193
  - `SECRET` Algorithm secret.
199
194
  - `BASE_DIR` (optional, default="/data"): Base path to the OceanProtocol data directories.
200
- - `RUNTIME` (optional, default="dev"): Runtime mode
@@ -111,11 +111,6 @@ Algorithm(
111
111
  """
112
112
  Random secret to use while testing.
113
113
  """
114
-
115
- runtime: "dev",
116
- """
117
- Runtime mode. "dev" to run normally, "test" to run pytest
118
- """
119
114
  )
120
115
  """
121
116
  Should not be needed in production algorithms, used to mock environment variables, defaults to using env.
@@ -174,4 +169,3 @@ Environment variables:
174
169
  - `TRANSFORMATION_DID` Algorithm DID, must have format: `abc..90`
175
170
  - `SECRET` Algorithm secret.
176
171
  - `BASE_DIR` (optional, default="/data"): Base path to the OceanProtocol data directories.
177
- - `RUNTIME` (optional, default="dev"): Runtime mode
@@ -2,7 +2,7 @@ import os
2
2
  from dataclasses import asdict, dataclass, field
3
3
  from logging import Logger
4
4
  from pathlib import Path
5
- from typing import Callable, Iterable, Literal, TypeVar
5
+ from typing import Callable, Iterable, TypeVar
6
6
 
7
7
  T = TypeVar("T")
8
8
 
@@ -31,11 +31,6 @@ class Environment:
31
31
  )
32
32
  """Super secret secret"""
33
33
 
34
- runtime: Literal["dev", "test"] = field(
35
- default_factory=lambda: os.environ.get("RUNTIME", "dev").lower()
36
- )
37
- """Select runtime mode"""
38
-
39
34
  dict = asdict
40
35
 
41
36
 
@@ -95,7 +95,7 @@ class Algorithm(Generic[JobDetailsT, ResultT]):
95
95
 
96
96
  @property
97
97
  def result(self) -> ResultT:
98
- if not self._result:
98
+ if self._result is None:
99
99
  raise Algorithm.Error("Result missing, run the algorithm first")
100
100
  return self._result
101
101
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "ocean-runner"
3
- version = "0.2.9"
3
+ version = "0.2.11"
4
4
  description = "A fluent API for OceanProtocol algorithms"
5
5
  authors = [
6
6
  { name = "AgrospAI", email = "agrospai@udl.cat" },
File without changes
File without changes