fred-oss 0.3.0__tar.gz → 0.4.1__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.
Files changed (36) hide show
  1. {fred_oss-0.3.0/src/main/fred_oss.egg-info → fred_oss-0.4.1}/PKG-INFO +1 -1
  2. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/integrations/runpod/cli_ext.py +2 -2
  3. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/integrations/runpod/helper.py +17 -2
  4. fred_oss-0.4.1/src/main/fred/version +1 -0
  5. {fred_oss-0.3.0 → fred_oss-0.4.1/src/main/fred_oss.egg-info}/PKG-INFO +1 -1
  6. fred_oss-0.3.0/src/main/fred/version +0 -1
  7. {fred_oss-0.3.0 → fred_oss-0.4.1}/MANIFEST.in +0 -0
  8. {fred_oss-0.3.0 → fred_oss-0.4.1}/NOTICE.txt +0 -0
  9. {fred_oss-0.3.0 → fred_oss-0.4.1}/README.md +0 -0
  10. {fred_oss-0.3.0 → fred_oss-0.4.1}/requirements.txt +0 -0
  11. {fred_oss-0.3.0 → fred_oss-0.4.1}/setup.cfg +0 -0
  12. {fred_oss-0.3.0 → fred_oss-0.4.1}/setup.py +0 -0
  13. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/cli/__init__.py +0 -0
  14. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/cli/__main__.py +0 -0
  15. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/cli/interface.py +0 -0
  16. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/cli/main.py +0 -0
  17. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/integrations/databricks/__init__.py +0 -0
  18. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/integrations/databricks/cli_ext.py +0 -0
  19. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/integrations/databricks/runtime.py +0 -0
  20. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/integrations/databricks/runtimes/__init__.py +0 -0
  21. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/integrations/databricks/runtimes/scanner.py +0 -0
  22. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/integrations/databricks/runtimes/sync.py +0 -0
  23. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/integrations/databricks/wrappers/__init__.py +0 -0
  24. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/integrations/databricks/wrappers/dbutils.py +0 -0
  25. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/integrations/runpod/__init__.py +0 -0
  26. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/maturity.py +0 -0
  27. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/settings.py +0 -0
  28. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/utils/__init__.py +0 -0
  29. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/utils/dateops.py +0 -0
  30. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/utils/runtime.py +0 -0
  31. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred/version.py +0 -0
  32. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred_oss.egg-info/SOURCES.txt +0 -0
  33. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred_oss.egg-info/dependency_links.txt +0 -0
  34. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred_oss.egg-info/entry_points.txt +0 -0
  35. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred_oss.egg-info/requires.txt +0 -0
  36. {fred_oss-0.3.0 → fred_oss-0.4.1}/src/main/fred_oss.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fred-oss
3
- Version: 0.3.0
3
+ Version: 0.4.1
4
4
  Summary: FREDOSS
5
5
  Home-page: https://fred.fahera.mx
6
6
  Author: Fahera Research, Education, and Development
@@ -23,7 +23,7 @@ class RunPodExt(IntegrationExtCLI):
23
23
  return handler.run(
24
24
  event={
25
25
  "id": "local-exec",
26
- "payload": payload
26
+ "input": payload,
27
27
  }
28
28
  )
29
29
 
@@ -45,4 +45,4 @@ class RunPodExt(IntegrationExtCLI):
45
45
  "handler": handler.run,
46
46
  **kwargs,
47
47
  }
48
- )
48
+ )
@@ -2,6 +2,7 @@ import time
2
2
  from dataclasses import dataclass, field
3
3
  from typing import Optional
4
4
 
5
+ from fred.utils.dateops import datetime_utcnow
5
6
  from fred.settings import logger_manager
6
7
 
7
8
  logger = logger_manager.get_logger(name=__name__)
@@ -10,6 +11,10 @@ logger = logger_manager.get_logger(name=__name__)
10
11
  @dataclass(frozen=True, slots=True)
11
12
  class HandlerHelper:
12
13
  context: dict = field(default_factory=dict)
14
+ metadata: dict = field(default_factory=dict)
15
+
16
+ def __post_init__(self):
17
+ self.metadata["handler_created_at"] = datetime_utcnow().isoformat()
13
18
 
14
19
  @classmethod
15
20
  def find_handler(
@@ -27,7 +32,13 @@ class HandlerHelper:
27
32
  if not handler_cls or not issubclass(handler_cls, cls):
28
33
  logger.error(f"Handler class '{handler_classname}' not found or is not a subclass of HandlerHelper.")
29
34
  raise ValueError(f"Handler '{handler_classname}' not found in module '{import_pattern}' or is not a subclass of HandlerHelper.")
30
- return handler_cls(**init_kwargs)
35
+ kwargs = {
36
+ "metadata": {
37
+ "handler_found_at": datetime_utcnow().isoformat()
38
+ },
39
+ **init_kwargs,
40
+ }
41
+ return handler_cls(**kwargs)
31
42
 
32
43
  def handler(self, payload: dict) -> Optional[dict]:
33
44
  logger.warning("Handler method not implemented.")
@@ -35,7 +46,9 @@ class HandlerHelper:
35
46
 
36
47
  def run(self, event: dict) -> dict:
37
48
  job_event_identifier = event.get("id")
49
+ self.metadata["run_seq"] = self.metadata.get("run_seq", 0) + 1
38
50
  payload = event.get("input", {})
51
+ started_at = datetime_utcnow().isoformat()
39
52
  start_time = time.perf_counter()
40
53
  ok = True
41
54
  try:
@@ -47,8 +60,10 @@ class HandlerHelper:
47
60
  "error": str(e)
48
61
  }
49
62
  return {
63
+ "ok": ok,
50
64
  "id": job_event_identifier,
51
65
  "duration": time.perf_counter() - start_time,
66
+ "started_at": started_at,
52
67
  "response": response,
53
- "ok": ok,
68
+ "metadata": self.metadata,
54
69
  }
@@ -0,0 +1 @@
1
+ 0.4.1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fred-oss
3
- Version: 0.3.0
3
+ Version: 0.4.1
4
4
  Summary: FREDOSS
5
5
  Home-page: https://fred.fahera.mx
6
6
  Author: Fahera Research, Education, and Development
@@ -1 +0,0 @@
1
- 0.3.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes