dbt-labs / dbt-semantic-interfaces

The shared semantic layer definitions that dbt-core and MetricFlow use.
Apache License 2.0
66 stars 13 forks source link

Make all `*Reference` classes orderable #295

Closed plypaul closed 1 month ago

plypaul commented 2 months ago

Description

This PR makes all *Reference classes order-able to make it easier to provide a consistent order for test / logging purposes.

Checklist

plypaul commented 1 month ago

Looks reasonable. Are there any tests we could add? I guess that'd be more a test of dataclass though than these classes themselves...

My first thought following your comment was that I also feel it would be more of a dataclass unit test. I explored programatic ways to avoid having brittle, hand-written cases, and nothing good came up. I'm going to merge this since it has been sitting for a bit, and if something comes up, we can revisit.