Add template for Python interface generation#86
Add template for Python interface generation#86MicBoucinha wants to merge 14 commits intoharp-tech:mainfrom
Conversation
Co-authored-by: José Grilo <jose.grilo@research.fchampalimaud.org>
Co-authored-by: José Grilo <jose.grilo@research.fchampalimaud.org>
Co-authored-by: José Grilo <jose.grilo@research.fchampalimaud.org>
Co-authored-by: José Grilo <jose.grilo@research.fchampalimaud.org>
|
@MicBoucinha I need more context before being able to review this, there are simply too many architectural decisions here which I do not know about. Can we schedule a slot in the Harp SCM so you can present and discuss this proposal please? |
|
Sure thing, just let us know when would be the best time for that. |
Co-authored-by: José Grilo <jose.grilo@research.fchampalimaud.org>
Co-authored-by: José Grilo <jose.grilo@research.fchampalimaud.org>
Co-authored-by: José Grilo <jose.grilo@research.fchampalimaud.org>
Co-authored-by: José Grilo <jose.grilo@research.fchampalimaud.org>
Co-authored-by: José Grilo <jose.grilo@research.fchampalimaud.org>
|
Hi! We have made the following changes to the python interface generation:
Feel free to give us feedback where improvements can be done. |
Co-authored-by: José Grilo <jose.grilo@research.fchampalimaud.org>
- Update package build backend - Update examples documentation generation Co-authored-by: José Grilo <jose.grilo@research.fchampalimaud.org>
|
@MicBoucinha I have just refactored the generator project to make it easier to maintain (#90). This includes the ability to call the generators programmatically, and also a unit test suite to make sure we keep track of changes to the internal logic. Internalizing the T4 templates also allows more easily writing generator helper code directly in C# with full code completion and type checking. It would be useful to reorganize this PR to take advantage of the updated infrastructure, and also add tests for the generated Python interface. I can explain in more detail in one of the next SRM meetings. |
|
Hi @glopesdev, thanks for the heads-up. When would be the best SRM meeting for that? |
|
@MicBoucinha we can discuss today if you happen to be around, or next week also works. |
PR changes
This PR introduces automatic generation of the Python interface for a device.
The base template used is a variation of https://github.com/fpgmaas/cookiecutter-uv.
The chosen python package structure is as follows:
This PR is related to PR#3 of the
pyharprepository due to PEP420 compliance for namespace packages, since we want to have a single namespace package forharprelated packages.The generated Python interface is a direct access type of interface, which means it provides a direct mapping to the device's functionality.
The package also includes a MKDocs configuration for documentation generation, focusing currently on the API documentation. The final documentation is available at https://fchampalimaud.github.io/pyharp/, which aggregates the documentation for the
pyharppackage and all devices under theharp.devicesrepository, currently available here: https://github.com/fchampalimaud/harp.devices.