Commit graph

3 commits

Author SHA1 Message Date
David Arnold
fef569e284
refactor: simplify bencher (#28694)
* chore: flatten bencher class layout

* chore: rename bencher to clarify

* docs: add file level docstrings
2024-12-07 14:10:03 +00:00
David Arnold
c5b7910ded
fix: improve bencher (#28693) 2024-12-07 12:53:17 +00:00
David Arnold
3d71f594d8
refactor: bench class inauguration (#28158)
* feat: Add bench layout classes and configuration handler

Bench layout: (`frappe.bench`)

- Layout by env variable, e.g. FRAPPE_BENCH_PATH, FRAPPE_SITES_PATH, etc
- Detecting modules and apps by the presence of a sentinel .frappe file
- Site is scoped by frappe.local.site_name (thread safe)

Config handler: (`frappe.bench.sites{,.site}.config`)

- Optional config registry for better discovery; warning if not specced
- Env variable overload with `FRAPPE_` prefix

* chore: type frappe.config

* chore: type frappe.bencher

* chore: py310 compat
2024-12-06 19:07:34 +01:00