Skip to content

[Not for Review] Test that semantic_manifest.json parses to expected PydanticSemanticManifest#394

Draft
courtneyholcomb wants to merge 2 commits intopatricky/generate_example_json_for_new_fieldsfrom
court/test-json
Draft

[Not for Review] Test that semantic_manifest.json parses to expected PydanticSemanticManifest#394
courtneyholcomb wants to merge 2 commits intopatricky/generate_example_json_for_new_fieldsfrom
court/test-json

Conversation

@courtneyholcomb
Copy link
Contributor

@courtneyholcomb courtneyholcomb commented Aug 25, 2025

A test to ensure that a given semantic_manifest.json successfully parses & passes validations. This is intended to support development of YAML & JSON in other repos. When you're at the point of having a semantic_manifest.json and need to test that it is valid, follow the steps below.

To run the test:

  1. Checkout this branch locally.
  2. Copy your semantic_manifest.json file into a file within this repo.
  3. Run export SEMANTIC_MANIFEST_JSON_PATH=<path to your file, starting after dbt-semantic-interfaces>
  4. Run hatch run dev-env:pytest tests/validations/test_metrics.py::test_semantic_manifest_json_parsing_matches_fixture

If helpful, for added thoroughness, you can aim to build a semantic manifest that will parse to match the one in the fake_semantic_manifest test fixture. This would be a fairly manual process requiring writing test YAML that should mirror that semantic manifest by combing through all the attributes in that semantic manifest, but it might help test thoroughness (ensuring no attributes were overlooked). If you decide to go that route, uncomment the assertion in tests/validations/test_metrics.py at the very bottom of the file (lines 1906-1908). Then follow the steps above.

@cla-bot cla-bot bot added the cla:yes label Aug 25, 2025
@dbt-labs dbt-labs deleted a comment from github-actions bot Aug 25, 2025
@theyostalservice theyostalservice force-pushed the patricky/generate_example_json_for_new_fields branch 2 times, most recently from 59afe6d to 29e2eca Compare August 28, 2025 17:48
@courtneyholcomb courtneyholcomb changed the base branch from patricky/generate_example_json_for_new_fields to main August 28, 2025 20:53
@courtneyholcomb courtneyholcomb changed the base branch from main to patricky/generate_example_json_for_new_fields September 4, 2025 17:31
@courtneyholcomb courtneyholcomb force-pushed the patricky/generate_example_json_for_new_fields branch from 68e1218 to 0fa65fd Compare September 22, 2025 23:39
@courtneyholcomb courtneyholcomb force-pushed the court/test-json branch 2 times, most recently from 01e4b5f to a5de505 Compare September 22, 2025 23:49
@dbt-labs dbt-labs deleted a comment from github-actions bot Sep 22, 2025
@courtneyholcomb courtneyholcomb changed the title Test that semantic_manifest.json parses to expected PydanticSemanticManifest [Not for Review] Test that semantic_manifest.json parses to expected PydanticSemanticManifest Sep 23, 2025
@courtneyholcomb courtneyholcomb changed the title [Not for Review] Test that semantic_manifest.json parses to expected PydanticSemanticManifest [Not for Review] Test that semantic_manifest.json parses to expected PydanticSemanticManifest Sep 23, 2025
@courtneyholcomb courtneyholcomb force-pushed the patricky/generate_example_json_for_new_fields branch from 0fa65fd to 709477c Compare September 23, 2025 23:10
…ticSemanticManifest

This is intended to support development of YAML & JSON in other repos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant