Skip to content

More general python codegen #1053

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

Merged
merged 4 commits into from
Jun 23, 2025
Merged

More general python codegen #1053

merged 4 commits into from
Jun 23, 2025

Conversation

ponyisi
Copy link
Collaborator

@ponyisi ponyisi commented May 8, 2025

Allow the function signature

run_query(file_path, output_path: Path)

in addition to

run_query(file_path)

so Python transformers can create arbitrary ROOT file output.

@BenGalewsky
Copy link
Contributor

I don't understand how this works? How does the sidecar know to pick up the user specified file?

@ponyisi
Copy link
Collaborator Author

ponyisi commented May 9, 2025

@BenGalewsky The sidecar tells the codegen shim what file name to produce. This PR introduces a route where user code can just directly produce this file, instead of returning an awkward array which the codegen shim then writes to that file.

Copy link
Collaborator

@gordonwatts gordonwatts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The if statements here are getting quite complex. I don't think we have any tests for this. Is this getting to the point we need those?

@ponyisi ponyisi force-pushed the more-general-python-codegen branch from 53bd138 to 87dfa6f Compare June 20, 2025 20:37
@BenGalewsky BenGalewsky self-requested a review June 23, 2025 20:03
Copy link
Contributor

@BenGalewsky BenGalewsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with this now....

@ponyisi ponyisi merged commit 1ee88e2 into develop Jun 23, 2025
75 checks passed
@ponyisi ponyisi deleted the more-general-python-codegen branch June 23, 2025 21:22
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.

4 participants