Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
.venv
venv
.orbit
htmlcov
26 changes: 26 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
common --enable_bzlmod
common --announce_rc
common --color=yes
common --terminal_columns=120

build --verbose_failures
build --experimental_repository_cache_hardlinks
build --experimental_convenience_symlinks=ignore

test --test_output=errors
test --test_summary=terse

build:remote-gcp-dev --remote_executor=grpc://127.0.0.1:8980
build:remote-gcp-dev --remote_timeout=3600
build:remote-gcp-dev --remote_download_toplevel
build:remote-gcp-dev --remote_default_exec_properties=container-image=docker://gcr.io/cloud-marketplace/google/rbe-ubuntu24-04@sha256:70a81b361f88e9bc3668e6f7f1a45e7036f15fdf073aede238d9b64c548cc0c0
build:remote-gcp-dev --host_platform=//bazel/platforms:linux_x86_64
build:remote-gcp-dev --platforms=//bazel/platforms:linux_x86_64
build:remote-gcp-dev --extra_execution_platforms=//bazel/platforms:linux_x86_64
build:remote-gcp-dev --spawn_strategy=remote
build:remote-gcp-dev --strategy=Genrule=remote
build:remote-gcp-dev --strategy=PyCompile=remote
build:remote-gcp-dev --jobs=32
test:remote-gcp-dev --test_output=errors

try-import %workspace%/.bazelrc.user
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9.1.0
5 changes: 5 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
self-hosted-runner:
labels:
- blacksmith-4vcpu-ubuntu-2404
- evalops-orbit-agent-rbe
- bazel-rbe
69 changes: 69 additions & 0 deletions .github/workflows/bazel-rbe.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Bazel RBE

on:
pull_request:
paths:
- ".bazel*"
- ".github/actionlint.yaml"
- ".github/workflows/bazel-rbe.yml"
- "BUILD.bazel"
- "MODULE.bazel"
- "MODULE.bazel.lock"
- "bazel/**"
- "evals/**"
- "orbit_agent/**"
- "playbooks/**"
- "requirements-dev.lock"
- "scripts/run-bazel-rbe.sh"
- "tests/**"
push:
branches: [main]
paths:
- ".bazel*"
- ".github/actionlint.yaml"
- ".github/workflows/bazel-rbe.yml"
- "BUILD.bazel"
- "MODULE.bazel"
- "MODULE.bazel.lock"
- "bazel/**"
- "evals/**"
- "orbit_agent/**"
- "playbooks/**"
- "requirements-dev.lock"
- "scripts/run-bazel-rbe.sh"
- "tests/**"
workflow_dispatch:

permissions:
contents: read

jobs:
smoke:
if: github.event_name == 'workflow_dispatch' || vars.BAZEL_RBE_ENABLED == 'true'
runs-on:
- self-hosted
- evalops-orbit-agent-rbe
- bazel-rbe
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@de0facc42343c4c3d0f2fb3f1f251f9f7e3ce75b # v6.0.2

- name: Set up Go for Bazel tools
uses: actions/setup-go@4a3601d38874680202d6939c4edd8cf679bd637a # v6.4.0
with:
go-version: "1.26.3"

- name: Install Bazel tools
env:
GOBIN: ${{ runner.temp }}/go-bin
run: |
go install github.com/bazelbuild/bazelisk@latest
go install github.com/bazelbuild/buildtools/buildifier@latest
echo "${GOBIN}" >> "${GITHUB_PATH}"

- name: Run Bazel checks
run: make bazel-check

- name: Run Bazel RBE smoke
run: make bazel-rbe-smoke
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ build/
# Local data
.orbit/

# Bazel
/bazel-*

# IDE
.idea/
.vscode/
Expand Down
37 changes: 37 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
load("@pypi//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_library", "py_test")

RUNTIME_DEPS = [
requirement("dspy-ai"),
requirement("Flask"),
requirement("Flask-Limiter"),
requirement("pydantic"),
requirement("PyYAML"),
requirement("python-dotenv"),
requirement("requests"),
requirement("rich"),
requirement("twilio"),
requirement("typer"),
]

py_library(
name = "orbit_agent",
srcs = glob(["orbit_agent/**/*.py"]),
data = glob([
"evals/**/*.yaml",
"playbooks/**/*.yaml",
]),
imports = ["."],
visibility = ["//visibility:public"],
deps = RUNTIME_DEPS,
)

py_test(
name = "pytest",
srcs = glob(["tests/**/*.py"]),
main = "tests/pytest_main.py",
deps = [
":orbit_agent",
requirement("pytest"),
],
)
22 changes: 22 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module(
name = "evalops_orbit_agent",
version = "0.0.0",
)

bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "rules_python", version = "1.7.0")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
is_default = True,
python_version = "3.11",
)
use_repo(python, "python_3_11")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.11",
requirements_lock = "//:requirements-dev.lock",
)
use_repo(pip, "pypi")
Loading