-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: nested types, use dataclass_wizard to deserialize/serialize types #21
Conversation
G4Vi
commented
Dec 30, 2024
•
edited
Loading
edited
- Switch to dataclass wizard
- Get greet mcp run servlet running
- fix crash when running bindgen test
- get all bindgen tests passing
wooo! |
template/prepare.sh
Outdated
@@ -41,4 +41,14 @@ if ! command_exists extism-py; then | |||
exit 1 | |||
fi | |||
|
|||
# fetch dataclass wizard | |||
if [ ! -d dataclass-wizard-0.33.0 ]; then | |||
curl -O https://files.pythonhosted.org/packages/0a/2a/6ae6638cd5ca919b73d393cdb4a4e53c8c3dcacc003a79d9480ecad46798/dataclass-wizard-0.33.0.tar.gz |
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.
We're already using uv
in pyproject.toml
to manage dependencies - is there a reason not to do that for these as well?
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.
No, I was just unfamiliar with the dep management. Does it look right in a545a0e ? I had to specify a narrow python version to make sure it will match with the PYTHONPATH
in xtp.toml
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.
That looks good - We should also be able to detect the path using something like:
PYTHONPATH=$(uv run python3 -c "import sys; print(sys.path[-1])")
To avoid requiring a specific python version - but since uv
also manages the required python versions it might not be a huge deal either way.
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.
Thanks, I tried that out and can't seem to embed the command in the toml so maybe we keep the hardcoding for now?
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.
Yeah that works for me! If it comes up again we can figure out a more generic solution.