Skip to content

Add NDJSON events to init-derived - #47

Merged
hannesill merged 2 commits into
mainfrom
add-init-derived-ndjson-events
May 30, 2026
Merged

Add NDJSON events to init-derived#47
hannesill merged 2 commits into
mainfrom
add-init-derived-ndjson-events

Conversation

@hannesill

Copy link
Copy Markdown
Owner

Summary

  • add --json and --events ndjson support to m4 init-derived
  • emit derived materialization lifecycle and per-table progress events
  • document the new command and cover JSON/NDJSON CLI behavior in tests

Tests

  • uv run pytest tests/core/derived/test_cli.py tests/test_cli.py -q
  • uv run ruff check src/m4/cli.py src/m4/core/derived/materializer.py tests/core/derived/test_cli.py
  • uv run ruff format --check src/m4/cli.py src/m4/core/derived/materializer.py tests/core/derived/test_cli.py
  • git diff --check

Note: the pre-commit full pytest hook was run during commit and failed on tests/test_mcp_server.py::TestModalityChecking::test_set_dataset_returns_supported_tools_snapshot because the environment reported BigQuery instead of DuckDB. The focused tests for this change passed.

hannesill added 2 commits May 30, 2026 15:06
Extend init-derived with JSON and NDJSON output so automation can observe derived table materialization progress. Emit per-table derived events from the materializer and cover list/materialization output in CLI tests.

Behavioral implication: init-derived now accepts --json and --events ndjson; existing human-readable output remains unchanged.
Update the package __version__ value for the next patch release and make the MCP set_dataset snapshot test pin DuckDB in its isolated environment.

Behavioral impact: runtime behavior is unchanged beyond reporting version 0.5.1; the test setup now matches the client backend resolution path.
@hannesill
hannesill merged commit bd22381 into main May 30, 2026
6 checks passed
@hannesill
hannesill deleted the add-init-derived-ndjson-events branch May 30, 2026 13:22
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