divi 0.0.1.dev9__tar.gz → 0.0.1.dev10__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 (37) hide show
  1. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/PKG-INFO +1 -1
  2. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/divi/__init__.py +1 -1
  3. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/scripts/hatch_build.py +34 -0
  4. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/scripts/proto_build.py +8 -11
  5. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/.gitignore +0 -0
  6. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/LICENSE +0 -0
  7. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/Makefile +0 -0
  8. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/README.md +0 -0
  9. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/apps/README.md +0 -0
  10. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/core/README.md +0 -0
  11. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/core/go.mod +0 -0
  12. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/core/go.sum +0 -0
  13. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/core/main.go +0 -0
  14. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/core/proto/core.pb.go +0 -0
  15. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/core/proto/core_grpc.pb.go +0 -0
  16. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/core/proto/health.pb.go +0 -0
  17. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/divi/core/__init__.py +0 -0
  18. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/divi/core/finish.py +0 -0
  19. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/divi/core/init.py +0 -0
  20. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/divi/core/run.py +0 -0
  21. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/divi/proto/core.proto +0 -0
  22. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/divi/proto/core_pb2.py +0 -0
  23. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/divi/proto/core_pb2.pyi +0 -0
  24. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/divi/proto/core_pb2_grpc.py +0 -0
  25. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/divi/proto/health.proto +0 -0
  26. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/divi/proto/health_pb2.py +0 -0
  27. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/divi/proto/health_pb2.pyi +0 -0
  28. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/divi/utils.py +0 -0
  29. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/docs/README.md +0 -0
  30. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/docs/package_readme.md +0 -0
  31. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/go.work +0 -0
  32. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/go.work.sum +0 -0
  33. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/hatch.toml +0 -0
  34. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/packages/README.md +0 -0
  35. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/pyproject.toml +0 -0
  36. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/scripts/README.md +0 -0
  37. {divi-0.0.1.dev9 → divi-0.0.1.dev10}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: divi
3
- Version: 0.0.1.dev9
3
+ Version: 0.0.1.dev10
4
4
  Summary: The Agent Platform for Observability & Evaluation
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.11
@@ -5,5 +5,5 @@ from . import proto
5
5
  name: str = "divi"
6
6
  run: Optional[Run] = None
7
7
 
8
- __version__ = "0.0.1.dev9"
8
+ __version__ = "0.0.1.dev10"
9
9
  __all__ = ["init", "finish", "proto"]
@@ -1,11 +1,17 @@
1
1
  import re
2
+ import shutil
3
+ import pathlib
2
4
  import sysconfig
5
+ import subprocess
3
6
 
4
7
  from hatchling.builders.hooks.plugin.interface import BuildHookInterface
5
8
 
6
9
 
7
10
  class CustomBuildHook(BuildHookInterface):
8
11
  def initialize(self, version, build_data):
12
+ target_path = pathlib.Path("core", "main.go")
13
+ output_path = pathlib.Path("divi", "bin", "core")
14
+ self._go_build(target_path, output_path)
9
15
  build_data["tag"] = f"py3-none-{self._get_platform_tag()}"
10
16
  build_data["pure_python"] = False
11
17
 
@@ -45,3 +51,31 @@ class CustomBuildHook(BuildHookInterface):
45
51
  if os == "linux":
46
52
  parts[0] = "manylinux1"
47
53
  return "_".join(parts)
54
+
55
+ def _go_build(
56
+ self,
57
+ target_path: pathlib.PurePath,
58
+ output_path: pathlib.PurePath,
59
+ ):
60
+ """go build -o output_path target_path"""
61
+ output_flags = ["-o", str(output_path)]
62
+ subprocess.check_call(
63
+ [
64
+ str(self._get_and_require_go_binary()),
65
+ "build",
66
+ *output_flags,
67
+ str(target_path),
68
+ ],
69
+ )
70
+
71
+ def _get_and_require_go_binary(self) -> pathlib.Path:
72
+ go = shutil.which("go")
73
+
74
+ if not go:
75
+ self.app.abort(
76
+ "Did not find the 'go' binary. You need Go to build wandb"
77
+ " from source. See https://go.dev/doc/install.",
78
+ )
79
+ raise AssertionError("unreachable")
80
+
81
+ return pathlib.Path(go)
@@ -1,13 +1,10 @@
1
1
  #!/usr/bin/env python
2
2
  """Compile proto files to python and go files."""
3
3
 
4
- import importlib.metadata
5
4
  import os
6
- import pathlib
7
5
 
8
6
  import grpc_tools # type: ignore
9
7
  from grpc_tools import protoc # type: ignore
10
- from packaging import version
11
8
 
12
9
 
13
10
  proto_root = os.path.join(os.path.dirname(grpc_tools.__file__), "_proto")
@@ -23,9 +20,9 @@ for proto_file in [
23
20
  proto_root,
24
21
  "-I",
25
22
  ".",
26
- f"--python_out=.",
27
- f"--pyi_out=.",
28
- f"--go_out=.",
23
+ "--python_out=.",
24
+ "--pyi_out=.",
25
+ "--go_out=.",
29
26
  f"divi/proto/{proto_file}",
30
27
  )
31
28
  )
@@ -42,11 +39,11 @@ for proto_file in [
42
39
  proto_root,
43
40
  "-I",
44
41
  ".",
45
- f"--python_out=.",
46
- f"--pyi_out=.",
47
- f"--grpc_python_out=.",
48
- f"--go_out=.",
49
- f"--go-grpc_out=.",
42
+ "--python_out=.",
43
+ "--pyi_out=.",
44
+ "--grpc_python_out=.",
45
+ "--go_out=.",
46
+ "--go-grpc_out=.",
50
47
  f"divi/proto/{proto_file}",
51
48
  )
52
49
  )
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes