oct.scaffold package#
oct.scaffold — project-scaffolding helpers.
The CLI entry point (oct.cli.scaffold()) is a thin dispatcher; the
real work lives in oct.scaffold.oct_scaffold.run_scaffold().
- class oct.scaffold.ScaffoldResult(created: list[Path] = <factory>, skipped: list[Path] = <factory>, messages: list[str] = <factory>, venv_path: Path | None = None)[source]#
Bases:
objectStructured output from
run_scaffold().- created#
Paths (directories + files) that were created.
- Type:
list[pathlib.Path]
- skipped#
Paths that already existed and were not overwritten.
- Type:
list[pathlib.Path]
- messages#
Informational strings the caller may render — warnings, tips, or dry-run descriptions.
- Type:
list[str]
- venv_path#
The
.venv/that was created, orNonewheninclude_venv=False.- Type:
pathlib.Path | None
- created: list[Path]#
- messages: list[str]#
- skipped: list[Path]#
- venv_path: Path | None = None#
- oct.scaffold.run_scaffold(name: str, base_dir: Path, *, dry_run: bool = False, include_venv: bool = True) ScaffoldResult[source]#
Create a new Option C project under
base_dir / name.- Parameters:
name – Project name (becomes the top-level directory).
base_dir – Parent directory — the project is created at
base_dir / name.dry_run – When True, describe what would happen without touching the filesystem.
include_venv – When True, create a
.venv/at the project root using the stdlibvenvmodule.
- Returns:
Structured result. Always returns; never raises for existing files (they are recorded in
skipped).- Return type: