an.project#
Project init/load/save — the on-disk anatomy of an an project.
Layout (from spec §11):
my-scene/ ├── an.toml ├── scene.md ├── ir/scene.json ├── assets/{characters,props,environments,voices,styles,sounds}/ ├── artifacts/{audio,visemes,shots,previews}/ ├── output/ └── .an/{decisions.jsonl,verifier_runs/,memory.md}
Module Attributes
A render report records what a render on THIS machine found — warnings, exception text — so it is per-machine output, not project source (an#254). |
|
Probe frames and contact sheets ( |
|
What a project's |
Functions
|
Create a fresh an project at |
|
Add |
|
Add |
|
Load an existing project. |
|
Persist a Project's current scene back to disk (md + json). |
Classes
|
A loaded an project: directory + mall + current scene. |
- an.project.PROBES_GITIGNORE: tuple[str, ...] = ('artifacts/probes/',)#
Probe frames and contact sheets (
an probe,an library sheet, an#347): looks at work in progress, which may show private-study material.
- an.project.PROJECT_GITIGNORE: tuple[str, ...] = ('artifacts/render_reports/', 'artifacts/probes/')#
What a project’s
.gitignorekeeps out of version control (an initadds each line a.gitignorelacks, never removing one).
- class an.project.Project(root, mall, scene)[source]#
Bases:
objectA loaded an project: directory + mall + current scene.
- an.project.RENDER_REPORTS_GITIGNORE: tuple[str, ...] = ('artifacts/render_reports/',)#
A render report records what a render on THIS machine found — warnings, exception text — so it is per-machine output, not project source (an#254).
- an.project.init(project_dir, *, name=None, force=False)[source]#
Create a fresh an project at
project_dir.Idempotent unless the directory already contains a non-empty
scene.md; passforce=Trueto overwrite. Returns the absolute project root. The project’s.gitignoregainsPROJECT_GITIGNORE(lines it lacks).- Return type:
- an.project.keep_out_of_git(pdir, lines)[source]#
Add
linesto an OLDER project’s.gitignore(anan initfrom before they existed left them out) — conservatively: never a line whose folder the file already says anything about (a project may have chosen to commit its reports,!artifacts/render_reports/), never through a symlink (a shared ignore file), and never creating a.gitignorein a project that is not in a git work tree.- Return type:
- an.project.keep_reports_out_of_git(pdir)[source]#
Add
RENDER_REPORTS_GITIGNOREto an older project’s.gitignorethe first time a render writes a report (an#309), bykeep_out_of_git()’s rules.- Return type:
- an.project.load(project_dir, *, check_kinds=True)[source]#
Load an existing project. Reconciles scene.md / ir/scene.json first.
Registers the installed genres first (
an.genres.load(), ADR 0001 decision 3: discovery is explicit, and loading a project is one of the places it happens), so the scene’s genre kinds — the cut-out genre’splay,expressionandcharacter— read as their own models.Then refuses a scene that names an action kind, entity kind or renderer nothing registered (
an.ir.validate.require_registered_kinds()): the schema holds those asstr(ADR 0001 decision 2), so without this a typo’dkind: enviromentwould load and render silently without its backdrop.check_kinds=Falseis foran validate, which reports them as findings instead.- Return type: