Refactor configuration handling to use directory-per-resource layout
- Introduced `_write_castle_config` function to scatter nested config into separate YAML files for programs, services, and jobs. - Updated `castle_root` fixture to utilize the new config writing method. - Added tests for configuration aggregation and scattering in `test_health.py`. - Removed legacy unit handling from `manifest.py` and refactored related code in `config.py`. - Updated documentation to reflect new configuration directory structure. - Removed obsolete unit tests related to unit expansion.
This commit is contained in:
@@ -6,12 +6,11 @@ with code in this repository.
|
||||
## Overview
|
||||
|
||||
Castle is a personal software platform — a monorepo of independent projects
|
||||
(services, tools, libraries) managed by the `castle` CLI. The registry
|
||||
(`castle.yaml`) has three top-level sections:
|
||||
(services, tools, libraries) managed by the `castle` CLI. The registry config is split into three directories under your config root:
|
||||
|
||||
- **`programs:`** — Software catalog (source, behavior, stack, system_dependencies, build)
|
||||
- **`services:`** — Long-running daemons (run, expose, proxy, systemd)
|
||||
- **`jobs:`** — Scheduled tasks (run, cron schedule, systemd timer)
|
||||
- **`programs/`** — Software catalog (source, behavior, stack, system_dependencies, build)
|
||||
- **`services/`** — Long-running daemons (run, expose, proxy, systemd)
|
||||
- **`jobs/`** — Scheduled tasks (run, cron schedule, systemd timer)
|
||||
|
||||
Each program has a **stack** (development toolchain: python-fastapi,
|
||||
python-cli, react-vite) and a **behavior** (runtime role: daemon, tool,
|
||||
|
||||
Reference in New Issue
Block a user