Skip to content

Feat: Macro typing coercion#2041

Merged
tobymao merged 16 commits intoSQLMesh:mainfrom
z3z1ma:feat/typed-macros
Feb 6, 2024
Merged

Feat: Macro typing coercion#2041
tobymao merged 16 commits intoSQLMesh:mainfrom
z3z1ma:feat/typed-macros

Conversation

@z3z1ma
Copy link
Contributor

@z3z1ma z3z1ma commented Jan 29, 2024

A spike at allowing users to explicitly define types for macro arguments. This makes the interface a little bit nicer since you know exactly what you are gonna get. The implementation is a proof of concept at where we may add this functionality.

Thoughts?

@z3z1ma z3z1ma force-pushed the feat/typed-macros branch from f1824ce to e97a9e2 Compare January 29, 2024 19:17
@z3z1ma
Copy link
Contributor Author

z3z1ma commented Jan 29, 2024

Test failures unrelated to my change AFAICT

Rebased on main after ryans merges and everythings passing

@tobymao
Copy link
Contributor

tobymao commented Jan 30, 2024

can you update the documentation to indicate this new behavior of type annotations?

@z3z1ma z3z1ma force-pushed the feat/typed-macros branch 3 times, most recently from 0bce05e to 6199210 Compare February 1, 2024 03:23
@z3z1ma z3z1ma requested a review from tobymao February 1, 2024 03:23
@z3z1ma z3z1ma force-pushed the feat/typed-macros branch 2 times, most recently from f1bb463 to 8c21a86 Compare February 1, 2024 06:38
@tobymao
Copy link
Contributor

tobymao commented Feb 1, 2024

one last small suggestion.

can we get a lot more tests, basically covering the gamut of coercisions and docs? thanks @z3z1ma !

after comprehensive tests and docs this is good to go

@z3z1ma
Copy link
Contributor Author

z3z1ma commented Feb 1, 2024

cool thanks for help @tobymao you rock. i will get to the tests and docs tomorrow

@z3z1ma z3z1ma force-pushed the feat/typed-macros branch from dd682bc to 62f7115 Compare February 1, 2024 20:01
@z3z1ma z3z1ma force-pushed the feat/typed-macros branch from 2534cc8 to 30658cb Compare February 1, 2024 21:57
@z3z1ma
Copy link
Contributor Author

z3z1ma commented Feb 1, 2024

@tobymao I added tests that hit every code path I think, I might add another 1 or 2. But otherwise going to focus on the docs.

@z3z1ma z3z1ma requested a review from tobymao February 5, 2024 20:48
Copy link
Contributor

@tobymao tobymao left a comment

Choose a reason for hiding this comment

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

amazing

@tobymao tobymao merged commit 61451e2 into SQLMesh:main Feb 6, 2024
eakmanrq added a commit that referenced this pull request Feb 6, 2024
eakmanrq added a commit that referenced this pull request Feb 6, 2024
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.

2 participants