Skip to content

Conversation

@satur9nine
Copy link
Contributor

  • Make the Python API similar to Rust and Swift for improved usability

@github-actions github-actions bot added c++ codegen Involving generating code from schema documentation Documentation python labels Nov 16, 2025
@satur9nine satur9nine force-pushed the imprv-python-iface branch 7 times, most recently from de2272c to 0c71177 Compare November 18, 2025 17:55
@jtdavis777 jtdavis777 self-requested a review November 24, 2025 12:15
@jtdavis777
Copy link
Collaborator

@satur9nine I've got this on my list! Will look it over sometime in the next few days 🤞

@satur9nine satur9nine force-pushed the imprv-python-iface branch 3 times, most recently from 77e604a to 5c7a3a2 Compare December 2, 2025 00:28
@jtdavis777
Copy link
Collaborator

@fliiiix this seems like a good improvement but as always I enjoy an extra opinion :D

@satur9nine satur9nine force-pushed the imprv-python-iface branch 2 times, most recently from f933113 to fc2bab6 Compare December 2, 2025 15:33
@fliiiix
Copy link
Contributor

fliiiix commented Dec 2, 2025

I had a quick look can you also split up this change in multiple commits but on MR is fine? (You can just force push them on this MR)
I really like the usage ✨ One thing im either not seeing or is missing is the generation of these new functions in the pyi files.

@satur9nine
Copy link
Contributor Author

satur9nine commented Dec 3, 2025

I had a quick look can you also split up this change in multiple commits but on MR is fine? (You can just force push them on this MR) I really like the usage ✨ One thing im either not seeing or is missing is the generation of these new functions in the pyi files.

OK I split it up into multiple commits. Do you know how to confirm the .pyi files are correct? I usually run mypy for files that have inline type information. Maybe it is similar for pyi files.

@satur9nine satur9nine force-pushed the imprv-python-iface branch 2 times, most recently from 44adff2 to 8882c4b Compare December 3, 2025 05:59
Make StartVector vector public since it is already being used in
generated code
Makes Python API for vectors cleaner like Rust and Swift
@fliiiix
Copy link
Contributor

fliiiix commented Dec 3, 2025

I'm away for the next few days and i didn't manage to review this in detail but it seems ok enough to get merged and if there are problems we can deal with them later 🤷

Do you know how to confirm the .pyi files are correct?

Visual inspection of the pyi file and then there is a way if they are in the correct location mypy will also pick them up. I realized when i looked again at this change that the types are now in the py file and the pyi file if im not mistaken the types should end up only in the pyi files. (I would not remove them in this MR from the py file, and i need to look up the discussion again about that topic, but i think that should be a new MR)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ codegen Involving generating code from schema documentation Documentation python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants