Closed ffMathy closed 10 months ago
I will finish this and submit for review when the PR #26 and #25 are merged. This one is the glue that will bind it all together. It'll be great!
This is done now. Hmmm, since this includes #26 and #25, perhaps it just makes sense to review this all at once? Up to you.
Too many things to keep track of at the same time to review them simultaneously. But you could setup this one to point to the #26 branch (But that would have to be done in your repository), if you want me to be able to review this one before #26 is merged.
Yeah sure. One at a time is okay too 🙏
@gismya this one has also been resolved conflict-wise and is ready to merge!
Oh, and as part of this, I also spotted that in a prior PR I was all of a sudden using Python naming convention for the emitted types and object types. I changed that here too for consistency.
I hope that's OK.
Any chance this will make it before Christmas? It is the last PR we need to do something epic on our side.
Sorry for the delay, I've gone in to start looking at it a few times, but I get stuck in that I don't quite follow what's going on. Could you add further explanations of the PR to help me along?
Yeah sure @gismya! Which parts need elaboration? The purpose, or what the code is doing? Or maybe something else?
What is being emitted, and the use case for it. I'm not intimately familiar with the project schemas.
Ah, fair enough. I'll do my best.
The schemas decide which types can be assigned to particular object types, and also decide which statuses are available for those types.
By providing this information at runtime and compile time, there are various things we want to achieve with this:
Imagine how great it would be if an entity's custom attributes were strong-typed. Or maybe strong-typing parent
more efficiently (by looking at which objects can be parents of other objects). All of this is achievable with this emitted code.
And because it's tree-shakeable, it's not a problem for the runtime bundle size if not used.
Does that help?
Thank you @gismya! We also hope we can contribute back soon and show how this can be useful in practice. Looking forward to it! ❤️
By the way @gismya. One more ask. Can you make a release to NPM also? Just so we can get all these PRs out also.
The work was on its way to release - there were some changes with linting and time zones for the tests that needed to be fixed. I must also determine why the test suite is not running for outside contributors on their PRs, but that's a later question.
It's been released now.
Thanks @gismya!
As for the failing PR, usually that's because something needs access to secrets, and secrets are not included for PRs by default.
Thats changeable in the repo setttings. Perhaps there's other interesting settings there too?
Thanks @gismya!
As for the failing PR, usually that's because something needs access to secrets, and secrets are not included for PRs by default.
Thats changeable in the repo setttings. Perhaps there's other interesting settings there too?
Unfortunately it looks like secrets aren't passed to forked repositories, so not entirely sure what we can do to make them work for you. I think we need to run them ourselves.
Ah okay. But in that case, you can retry the build manually and it'll work.
I guess it makes sense from a security standpoint.
Builds on top of #26 and #25 to add strong-typed schema and associations.
Changes
Test