Skip to content

SQL == CSV For YAML Generation - #72

Merged
eloise-nebula merged 10 commits into
mainfrom
compare_sql_to_yaml
Aug 19, 2026
Merged

SQL == CSV For YAML Generation#72
eloise-nebula merged 10 commits into
mainfrom
compare_sql_to_yaml

Conversation

@eloise-nebula

Copy link
Copy Markdown
Collaborator

This branch adds a regression test verifying that the SQL→YAML pipeline produces output equivalent to the existing CSV + meme pipeline, along with the fixes needed to make that comparison hold.

  • Added tests/test_db_to_yaml.py::test_compare_yaml, which builds device/area data from both pipelines and asserts they match.
  • Added use_meme/suppress_warnings options to YAMLGenerator/YAMLWriter, plus a new directory_service.verify_address(), so PV lookups can run against the local DB instead of live meme calls during tests.
  • pmt_metadata was removed because the information is now available in oracle.
  • Fixed area filtering and dict key ordering in db_to_yaml.build() and beampath whitespace handling in YAMLGenerator, which were causing mismatches between the two pipelines' output.

Once this PR is merged, slac_db.db_to_yaml.get_device() will be able to fully replace YAML files for all devices.

@williamColocho williamColocho left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No comments. Looks good to me.

@kabanaty kabanaty left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Eloise, this all looks good to me. We'll find out quickly after the summer downtime if the PMT metadata is working correctly but as of now I think it will be fine. Thanks for the hard work!

@eloise-nebula
eloise-nebula merged commit 1dcbe4a into main Aug 19, 2026
6 checks passed
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.

3 participants