Skip to content

feat(py): Setup python bindings project#8

Merged
aborgna-q merged 3 commits into
mainfrom
ab/setup-py-package
Aug 28, 2025
Merged

feat(py): Setup python bindings project#8
aborgna-q merged 3 commits into
mainfrom
ab/setup-py-package

Conversation

@aborgna-q

@aborgna-q aborgna-q commented Aug 27, 2025

Copy link
Copy Markdown
Collaborator

Setups a python project under impl/py, so we can publish the jeff-format package.

There are some problems with setting up dependencies, but we can merge this as-is for the moment.

The code from #3 is left unchanged apart from adding the capnp schema to a sub-dir and running automatic linters.

@aborgna-q aborgna-q marked this pull request as draft August 27, 2025 16:40
@aborgna-q aborgna-q force-pushed the ab/setup-py-package branch from 7bec1a4 to 415cb3e Compare August 27, 2025 16:42
@aborgna-q aborgna-q force-pushed the ab/setup-py-package branch from 9010181 to 05f2819 Compare August 27, 2025 16:54
@aborgna-q aborgna-q marked this pull request as ready for review August 27, 2025 17:03
@aborgna-q aborgna-q force-pushed the ab/setup-py-package branch from 62eaa3d to 0422c6a Compare August 27, 2025 17:29
@aborgna-q aborgna-q force-pushed the ab/setup-py-package branch from 0422c6a to f5ad00b Compare August 27, 2025 17:32
@aborgna-q aborgna-q merged commit d5346f3 into main Aug 28, 2025
17 checks passed
@aborgna-q aborgna-q deleted the ab/setup-py-package branch August 28, 2025 14:50
return self._inputs

return [JeffValue.from_encoding(inp, self._func) for inp in self._raw_data.inputs]
return [

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just a question, are we using different line lengths for the formatter by chance? 100 is what I usually use

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sure 👍

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just realized the whole code is in the init file, usually I wouldn't be looking for any code in those, except import related code / hacks.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this PR just set up things around the main file. See #14 for python code the restructuring

Comment thread impl/py/src/jeff/capnp.py
@@ -0,0 +1,21 @@
"""Utility functions for tket extensions."""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Docstring needs an update

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should be able to include this file in the wheel via payload data, rather than duplicating the source

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We can use force-include when building the wheels to copy the data into a local path, but that would break local testing since the file would not be there.

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.

2 participants