Skip to content
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

Merged
merged 7 commits into from
Jan 3, 2025

Conversation

G4Vi
Copy link
Contributor

@G4Vi G4Vi commented Dec 30, 2024

  • Switch to dataclass wizard
  • Get greet mcp run servlet running
  • fix crash when running bindgen test
  • get all bindgen tests passing

@G4Vi G4Vi marked this pull request as ready for review January 3, 2025 21:02
@G4Vi G4Vi requested review from zshipko and bhelx as code owners January 3, 2025 21:02
@bhelx
Copy link
Contributor

bhelx commented Jan 3, 2025

wooo!

@@ -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
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@G4Vi G4Vi mentioned this pull request Jan 3, 2025
@G4Vi G4Vi merged commit 8121f34 into main Jan 3, 2025
1 check passed
@G4Vi G4Vi deleted the gavin/20241230-fix-nested-types branch January 3, 2025 22:54
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.

3 participants