generated from coulomb/repo-seed
WP-0001 (Foundation & LEVEL1 Core):
- manifest model (FR-100), MD→DOCX builder (FR-200), DOCX→MD importer
(FR-300/400), template family registry (FR-600), drift detector (FR-700),
CLI wiring, pre-commit config, CI skeleton, regression harness
WP-0002 (Service Interfaces & Workflow Orchestration):
- REST service via FastAPI (FR-900): /health, /version, /capabilities,
/templates, /styles, /validate, /build, /import, /compare,
/templates/register, /workflows/{name}, /evidence/{run_id}
- Evidence & report store (FR-1400): JSON-backed, per-run, retrievable
through all interfaces, classification (pass/warnings/failed)
- Composite workflow orchestration (FR-1300): single-file-roundtrip,
multi-file-roundtrip, release-regression, family-switch-build
- MCP server via FastMCP (FR-1000): all tools + resources
- CLI additions: `markidocx serve`, `markidocx workflow`, `markidocx mcp`
- Interface parity tests: CLI / REST / MCP produce equivalent results
135 tests passing, ruff + mypy clean.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
63 lines
1.3 KiB
Python
63 lines
1.3 KiB
Python
"""Shared test fixtures for markidocx tests."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import textwrap
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
SIMPLE_MARKDOWN = textwrap.dedent("""\
|
|
# Hello World
|
|
|
|
This is a paragraph with **bold** and *italic* text.
|
|
|
|
## Section One
|
|
|
|
- Item one
|
|
- Item two
|
|
- Item three
|
|
|
|
### Subsection
|
|
|
|
Some text with a [link](https://example.com) and `inline code`.
|
|
|
|
## Section Two
|
|
|
|
| Column A | Column B | Column C |
|
|
|----------|----------|----------|
|
|
| row1a | row1b | row1c |
|
|
| row2a | row2b | row2c |
|
|
|
|
1. First ordered item
|
|
2. Second ordered item
|
|
3. Third ordered item
|
|
""")
|
|
|
|
SIMPLE_MANIFEST_YAML = textwrap.dedent("""\
|
|
project:
|
|
name: "Test Document"
|
|
feature_level: level1
|
|
family: article
|
|
|
|
sources:
|
|
- path: doc.md
|
|
|
|
output:
|
|
dir: ./dist
|
|
|
|
metadata:
|
|
title: "Test Document"
|
|
author: "Test Author"
|
|
date: "2026-01-01"
|
|
""")
|
|
|
|
|
|
@pytest.fixture()
|
|
def tmp_project(tmp_path: Path) -> Path:
|
|
"""Create a minimal project directory with a manifest and source file."""
|
|
(tmp_path / "doc.md").write_text(SIMPLE_MARKDOWN, encoding="utf-8")
|
|
(tmp_path / "manifest.yaml").write_text(SIMPLE_MANIFEST_YAML, encoding="utf-8")
|
|
(tmp_path / "dist").mkdir()
|
|
return tmp_path
|