-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: new dataclasses version of python protocol, temporarily alongside pydantic version #80
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @erohmensing and the rest of your teammates on Graphite |
4e388dc
to
c698f3e
Compare
9cff5a0
to
5f57711
Compare
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.
I haven't tested this, but it looks great. Let's merge and ship this!
docker run --rm \ | ||
--volume "${ROOT_DIR}:/${ROOT_DIR_NAME}" \ | ||
--workdir "/${ROOT_DIR_NAME}" \ | ||
python:3.8 "/${ROOT_DIR_NAME}/protocol-models/bin/generate-python-dataclasses.sh" |
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.
Should we use 3.10 here? Not sure if that would change anything at all.
@@ -0,0 +1,19 @@ | |||
Copyright (c) 2020 Airbyte |
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.
Copyright (c) 2020 Airbyte | |
Copyright (c) 2024 Airbyte |
"License :: OSI Approved :: MIT License", | ||
# Python Version Support | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.8", |
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.
Nit: We could add more python versions.
What
Generate a second version of the python protocol, by generating dataclasses instead of pydantic models. Publish this class to
airbyte_protocol_models_dc
, a temporary package.How
Publish 2 packages side by side for now. This gives us the ability to see how things go in production without doing a hard cutover, and migrate pieces off of the pydantic version incrementally (the CDK first).
We are still using
datamodel-codegen
to create the models from jsonschema, but we use a different output type and an updated version of the library for generation.