Project scaffolding and configuration module — the foundation everything else builds on.
Set up the Python project structure: pyproject.toml (with dependencies: httpx, pyyaml, rich; dev-deps: pytest, pytest-mock), virtual environment, librofm_downloader/ package with __init__.py, tests/ directory tree, tests/fixtures/ for API response JSON samples, and a CHANGELOG.md following Keep a Changelog.
Build the config module that:
Loads config.yaml (committed) and secrets.yaml (gitignored)
Deep-merges secrets over config (secrets win on conflict)
Validates all required fields are present
Rejects with a clear error if librofm.username or librofm.password are found in config.yaml
Applies sensible defaults for optional fields (e.g., format defaults to m4b_mp3_fallback, output dir to ./audiobooks)
Returns a typed config object (dataclass or TypedDict)
No other modules yet — this slice is purely project structure + config loading/validation.
Acceptance criteria
pyproject.toml exists with runtime deps (httpx, pyyaml, rich) and test deps (pytest, pytest-mock)
Virtual environment set up and dependencies install cleanly
librofm_downloader/ package created with __init__.py
librofm_downloader/config.py loads and validates config.yaml + secrets.yaml
Secrets deep-merge override works (secret value beats config value)
Script exits with clear error if credentials found in config.yaml
Script exits with clear error if required fields missing
Defaults applied for optional fields (format, output dir, download_extras, download_covers)
CHANGELOG.md created (Keep a Changelog format, initial Unreleased section)
tests/test_config.py with ~25 tests covering: valid YAML, missing fields, invalid format values, secrets merge, cred rejection, defaults, edge cases
All tests pass
Blocked by
None - can start immediately
## Parent
#1
## What to build
Project scaffolding and configuration module — the foundation everything else builds on.
Set up the Python project structure: `pyproject.toml` (with dependencies: httpx, pyyaml, rich; dev-deps: pytest, pytest-mock), virtual environment, `librofm_downloader/` package with `__init__.py`, `tests/` directory tree, `tests/fixtures/` for API response JSON samples, and a `CHANGELOG.md` following [Keep a Changelog](https://keepachangelog.com/).
Build the **config** module that:
- Loads `config.yaml` (committed) and `secrets.yaml` (gitignored)
- Deep-merges secrets over config (secrets win on conflict)
- Validates all required fields are present
- **Rejects with a clear error** if `librofm.username` or `librofm.password` are found in `config.yaml`
- Applies sensible defaults for optional fields (e.g., format defaults to `m4b_mp3_fallback`, output dir to `./audiobooks`)
- Returns a typed config object (dataclass or TypedDict)
No other modules yet — this slice is purely project structure + config loading/validation.
## Acceptance criteria
- [ ] `pyproject.toml` exists with runtime deps (httpx, pyyaml, rich) and test deps (pytest, pytest-mock)
- [ ] Virtual environment set up and dependencies install cleanly
- [ ] `librofm_downloader/` package created with `__init__.py`
- [ ] `librofm_downloader/config.py` loads and validates `config.yaml` + `secrets.yaml`
- [ ] Secrets deep-merge override works (secret value beats config value)
- [ ] Script exits with clear error if credentials found in `config.yaml`
- [ ] Script exits with clear error if required fields missing
- [ ] Defaults applied for optional fields (format, output dir, download_extras, download_covers)
- [ ] `CHANGELOG.md` created (Keep a Changelog format, initial Unreleased section)
- [ ] `tests/test_config.py` with ~25 tests covering: valid YAML, missing fields, invalid format values, secrets merge, cred rejection, defaults, edge cases
- [ ] All tests pass
## Blocked by
None - can start immediately
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Parent
#1
What to build
Project scaffolding and configuration module — the foundation everything else builds on.
Set up the Python project structure:
pyproject.toml(with dependencies: httpx, pyyaml, rich; dev-deps: pytest, pytest-mock), virtual environment,librofm_downloader/package with__init__.py,tests/directory tree,tests/fixtures/for API response JSON samples, and aCHANGELOG.mdfollowing Keep a Changelog.Build the config module that:
config.yaml(committed) andsecrets.yaml(gitignored)librofm.usernameorlibrofm.passwordare found inconfig.yamlm4b_mp3_fallback, output dir to./audiobooks)No other modules yet — this slice is purely project structure + config loading/validation.
Acceptance criteria
pyproject.tomlexists with runtime deps (httpx, pyyaml, rich) and test deps (pytest, pytest-mock)librofm_downloader/package created with__init__.pylibrofm_downloader/config.pyloads and validatesconfig.yaml+secrets.yamlconfig.yamlCHANGELOG.mdcreated (Keep a Changelog format, initial Unreleased section)tests/test_config.pywith ~25 tests covering: valid YAML, missing fields, invalid format values, secrets merge, cred rejection, defaults, edge casesBlocked by
None - can start immediately