Multi-project discovery, validation, and metadata extraction
Location: infrastructure/project/
Quick Reference: Modules Guide | API Reference
- Project Discovery: Automatically finds valid projects by scanning for
manuscript/config.yaml - Structure Validation: Verifies project directories have required
src/,tests/,manuscript/structure - Metadata Extraction: Reads project configuration (title, authors, DOI, testing thresholds)
- Multi-Project Support: Enables N independent projects within a single repository
from pathlib import Path
from infrastructure.project import discover_projects
# Discover all projects under projects/
projects = discover_projects(Path("."))
for project in projects:
print(f"{project.name}: {project.path}")from pathlib import Path
from infrastructure.project import validate_project_structure
result = validate_project_structure(Path("projects/code_project"))
if result.is_valid:
print("Project structure is valid")
else:
print(f"Issues: {result.issues}")from pathlib import Path
from infrastructure.project import get_project_metadata
metadata = get_project_metadata(Path("projects/code_project"))
print(f"Title: {metadata.title}")
print(f"Authors: {metadata.authors}")A directory is a valid project if and only if:
- It exists as a subdirectory of
projects/ - It contains
manuscript/config.yaml - It does not start with
_or.
Projects in projects_in_progress/ and projects_archive/ are not discovered.
| Symbol | Type | Purpose |
|---|---|---|
ProjectInfo |
Dataclass | Project metadata container |
discover_projects |
Function | Find all valid projects |
get_project_metadata |
Function | Extract config.yaml metadata |
validate_project_structure |
Function | Verify directory structure |
- Modules Guide — Module overview
- Multi-Project Management — Multi-project workflows
- Infrastructure AGENTS.md — Machine-readable API spec