Skip to content

feat: support passing data to script via YAML#107

Draft
tobiasraabe wants to merge 5 commits into
mainfrom
codex/stata-mock-yaml
Draft

feat: support passing data to script via YAML#107
tobiasraabe wants to merge 5 commits into
mainfrom
codex/stata-mock-yaml

Conversation

@tobiasraabe

Copy link
Copy Markdown
Member

Summary

This PR adds the first slice of the planned YAML configuration feature: a stronger stata_mock implementation that can emulate the relevant parts of the Stata yaml package.

The mock now supports:

  • Stata /// line continuations
  • yaml read using ..., locals replace
  • custom local prefixes via prefix(...)
  • expansion of returned macros such as `r(yaml_produces)'
  • scalar-style yaml get database:host
  • metadata-style yaml get indicators:CODE, attributes(...)
  • basic yaml validate, required(...) types(...)
  • rejection of unsupported YAML syntax such as anchors and aliases

This intentionally does not add the pytask-facing serializer feature yet. The goal is to get CI signal on the mock foundation first.

Checks

  • uv run ruff check packages\stata_mock\src\stata_mock\cli.py tests\test_stata_mock.py
  • uv run pytest tests/test_stata_mock.py
  • uv run python -m compileall -q packages\stata_mock tests\test_stata_mock.py

@tobiasraabe tobiasraabe changed the title [codex] Add YAML support to Stata mock feat: support passing data to script via YAML Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant