-
Notifications
You must be signed in to change notification settings - Fork 14
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
Refactor Python bindings #151
Conversation
Hi @stubbiali ! Thanks for all the work - looks good! I'll try to give you extended feedback today or tomorrow. Could you maybe merge with master and resolve conflicts? |
Is there any other/additional way to customize the build process? Environment variables are fine, but maybe command line arguments would be more ergonomic/more explicit. |
A small thing that rubs me the wrong way is that the build directory is created in the source tree next to |
I tend to agree that command line arguments would be more elegant. The only way I know to accomplish this would be through config settings. To be honest, I've never used this feature, but to me it doesn't look like it makes the customization of the build process either more explicit or easier to read. So I would stick to environment variables, which is a more common approach. |
We could use a temporary folder as the build directory with |
closing this as it is superseded by #156 |
Profound restructuring and refining of the Python bindings. Since this effort is driven by the needs of the FVM model, the focus has primarily been on structured grids so far.
bindings/python/src/ghex
andbindings/python/src/_pyghex
;pyghex
toghex
, and all package-level configurations are dumped intopyproject.toml
;scikit-build-core
tosetuptools.build_meta
; this is mainly motivated by the flexibility provided by the latter, which allows to customize the build process using environment variables and so allows to e.g. enable GPU support and specify the transport backend;__hip_array_interface__
(introduced by Python: Add support for HIP/ROCm buffers GridTools/gridtools#1759 and feature[cartesian]: Add support for HIP/ROCm GridTools/gt4py#1278);black
formatter to all Python source files and add annotations;The code has been tested on Mac (M2 processor), Piz Daint and LUMI.