Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Support local configuration, not only global

未关闭
#161 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
ruby
领域
backend

调研方向

先从链接的 .plan/.PLAN.md 部分和 README 中当前的初始化文档开始,然后定位 Braintrust.init 入口点和全局状态处理。完成的标准是 SDK 同时支持文档所述的全局初始化和显式的本地实例,并且 README 中描述了本地用法和行为。

由索引模型根据 Issue 内容生成。

描述

The plan mentions supporting both global and local state.

https://github.com/braintrustdata/braintrust-sdk-ruby/blob/1929a2069bb7f6f0fa3106300bbf9f3fbc8b03c9/.plan/.PLAN.md?plain=1#L16-L28

This is a very good pattern.

But currently, only global seems to be supported. At least that's all that's in the readme.

Also, if you support local state, I would suggest the traditional class pattern with new (idiomatic ruby):

# Simple case - sets global state (default)
Braintrust.init(
  api_key: ENV['BRAINTRUST_API_KEY'],
  project: "my-project"
)

# Explicit state (for testing, multi-tenant)
braintrust_instance = Braintrust.new(
  api_key: "key",
  project: "project",
  set_global: false
)

(the one in the plan is even broken, it wouldn't work at all as mentioned in the plan)

主要语言
Ruby
星标
9
派生
10
平均合并
3 天 43 分钟
30 天内合并 PR
9

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

braintrustdata/braintrust-sdk-ruby 的其他 Issue

查看 braintrustdata/braintrust-sdk-ruby 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。