-
Notifications
You must be signed in to change notification settings - Fork 336
Description
Product
BAML
Problem Statement / Use Case
I wonder if it's too late to refine the default directory structure:
baml_client/
baml_src/
generators.baml
clients.baml
extractor1.baml
extractor2.baml
...
This is really a collection of three problems:
- nit: repetitive top level naming (baml_*)
- nit: lack of separation between baml_src config files and extraction scripts
- forced grouping of baml scripts vs arbitrary use case directories
Proposed Solution
Nit 1: it would be a little less repetitive to have the top level split like
baml/
client/
src/
Nit 2: "clients" and "generators" are qualitatively different than all the other source files, so it would be nice to separate them, something like
baml_src/
config/
generators.baml
clients.baml
extractor1.baml
extractor2.baml
...
and/or allow the extractors to go in a separate subdirectory.
Finally, it would be especially nice to support co-locating extractor.baml scripts with the source code that grows around it to support its development and usage instead of requiring them all to be in a centralized baml directory (i.e. a pythonic path-based name space instead of a global namespace). I imagine something like the following should be doable: have a baml_src/sourcefiles.baml config where users can "register" fullpaths to extractors located at arbitrary relative filepaths; then the client is still able to locate and work with them.
Alternative Solutions
No response
Additional Context
No response