|
| 1 | +# ******************************************************************************* |
| 2 | +# Copyright (c) 2026 Contributors to the Eclipse Foundation |
| 3 | +# |
| 4 | +# See the NOTICE file(s) distributed with this work for additional |
| 5 | +# information regarding copyright ownership. |
| 6 | +# |
| 7 | +# This program and the accompanying materials are made available under the |
| 8 | +# terms of the Apache License Version 2.0 which is available at |
| 9 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# SPDX-License-Identifier: Apache-2.0 |
| 12 | +# ******************************************************************************* |
| 13 | +load("@pip_ai_checker//:requirements.bzl", "requirement") |
| 14 | +load("@rules_python//python:pip.bzl", "compile_pip_requirements") |
| 15 | + |
| 16 | +exports_files( |
| 17 | + ["src/ai_checker/orchestrator.py"], |
| 18 | + visibility = ["//visibility:public"], |
| 19 | +) |
| 20 | + |
| 21 | +# Default requirements engineering guidelines |
| 22 | +filegroup( |
| 23 | + name = "default_guidelines", |
| 24 | + srcs = glob(["guidelines/*.md"]), |
| 25 | + visibility = ["//visibility:public"], |
| 26 | +) |
| 27 | + |
| 28 | +# Core AI checker library (analysis framework) |
| 29 | +py_library( |
| 30 | + name = "ai_checker_core", |
| 31 | + srcs = glob(["src/ai_checker/*.py"]), |
| 32 | + imports = ["src"], |
| 33 | + visibility = ["//visibility:public"], |
| 34 | + deps = [ |
| 35 | + "@trlc//trlc", |
| 36 | + requirement("bigtree"), |
| 37 | + requirement("pydantic"), |
| 38 | + requirement("pydot"), |
| 39 | + requirement("pyyaml"), |
| 40 | + ], |
| 41 | +) |
| 42 | + |
| 43 | +# LangChain adapter for GitHub Copilot SDK |
| 44 | +py_library( |
| 45 | + name = "copilot_langchain", |
| 46 | + srcs = [ |
| 47 | + "src/copilot_adapter/__init__.py", |
| 48 | + "src/copilot_adapter/copilot_langchain.py", |
| 49 | + ], |
| 50 | + imports = ["src"], |
| 51 | + visibility = ["//visibility:public"], |
| 52 | + deps = [ |
| 53 | + requirement("langchain-core"), |
| 54 | + requirement("github-copilot-sdk"), |
| 55 | + requirement("pydantic"), |
| 56 | + ], |
| 57 | +) |
| 58 | + |
| 59 | +# Default orchestrator (uses GitHub Copilot SDK as default AI backend) |
| 60 | +py_binary( |
| 61 | + name = "orchestrator", |
| 62 | + srcs = ["src/ai_checker/orchestrator.py"], |
| 63 | + imports = ["src"], |
| 64 | + main = "src/ai_checker/orchestrator.py", |
| 65 | + visibility = ["//visibility:public"], |
| 66 | + deps = [ |
| 67 | + ":ai_checker_core", |
| 68 | + ":copilot_langchain", |
| 69 | + requirement("langchain-core"), |
| 70 | + ], |
| 71 | +) |
| 72 | + |
| 73 | +# Run: bazel run //validation/ai_checker:requirements.update |
| 74 | +compile_pip_requirements( |
| 75 | + name = "requirements", |
| 76 | + src = "requirements.txt.in", |
| 77 | + requirements_txt = "requirements.txt", |
| 78 | +) |
0 commit comments