feat: Upwards-recursively read .braintrust.json containing BRAINTRUST_API_KEY#144
Conversation
|
There's a good chance this PR is garbage. Sorry. |
|
Luca Forstner (@lforst) Needs a rebase. |
…-api-key # Conflicts: # config/config.go # go.mod
|
Now tests fail. Looks like there's some sort of module validation thing. |
|
Stephen Belanger (@Qard) while I fix this, mind still giving a review for general direction? |
Stephen Belanger (Qard)
left a comment
There was a problem hiding this comment.
Not convinced we need to be so lenient about the format of the file. It's our own named file so we should be able to set a specific format for it, should we not?
| }, | ||
| { | ||
| name: "yaml-style dotenv assignment", | ||
| input: "BRAINTRUST_API_KEY: test-key\n", |
There was a problem hiding this comment.
Mixing with and without export seems fragile enough, but throwing YAML into the mix seems a bit questionable. We're specifically reading a file of our own custom naming, so we should have full say what the format of the contents are, should we not? Seems to me like we should just pick one form and stick to it.
There was a problem hiding this comment.
Similar to ruby, I switched the implementation to pick up a .braintrust.json file instead. Good input though.
.env.braintrust containing BRAINTRUST_API_KEY.braintrust.json containing BRAINTRUST_API_KEY
Direct port of braintrustdata/braintrust-sdk-javascript#2049
Prompt used: