-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(tests): Add basic test for litestar
example
#148
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @sherbang - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 3 issues found
- 🟢 Complexity: all looks good
- 🟢 Docstrings: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
litestar
example
Thanks for the additional tests. To make this work on 3.8 we'll have to update the hints used in the example file. Alternately, we could limit this test to only run in the main environment if we didn't want to update the type hints. I'm good with either solution on this. Thanks again! |
The litestar example was quite broken. The pydantic models were not able to handle the UUID type from I noticed a comment in here about using pydantic models to not add confusion with DTOs, but I think that's only true for someone who is very proficient with Pydantic. There was quite a lot of code that was just converting between model types. To me, this code seems simpler, and DTOs are a good concept to learn if working with Litestar. However, I've pulled out a lot of hair in the past getting Pydantic to properly handle custom types in the past, so adding that would definitely push the Pydantic version over the edge in terms of being more complex. I'll address the python 3.8 type annotation issue tomorrow. I expect I'll take the option of limiting this test to only run on main, I just need to figure out how to do that. |
2572d66
to
cba4f5f
Compare
Documentation preview will be available shortly at https://jolt-org.github.io/advanced-alchemy-docs-preview/148 |
Pull Request Checklist
Description
This test was developed to test, and is currently failing due to #147. It seems like it would also be useful in the future to make sure that the documented example is kept up to date.
Close Issue(s)