Skip to content
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

WIP: Create Python bindings using pybind11 #163

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cmacmackin
Copy link
Contributor

@cmacmackin cmacmackin commented Mar 10, 2023

Description

This is a quick attempt to implement some Python bindings using pybind11. There are plenty of things which need tidying up or improving, but it shows what is possible. It took me about a day of work to produce this.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • Requires documentation updates

Testing

No rigorous tests have been written yet.

The file python/test_bindings.py is a very simple script which shows NESO can be run from Python. It requires you to place the compiled library somewhere on your PYTHONPATH.

Please describe the tests that you ran to verify your changes and provide instructions for reproducibility. Please also list any relevant details for your test configuration.

  • Test Foo in /test/path/to/file_for_test_Foo.cpp
  • Description of test Foo
  • Test Bar in /test/path/to/file_for_test_Bar.cpp
  • Description of test Bar

Test Configuration:

  • OS: Linux Mint 21 (Ubuntu 22.04)
  • SYCL implementation: hipSYCL
  • MPI details: MPICH
  • Hardware: CPU (Intel Icelake)

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any new dependencies are automatically built for users via cmake
  • I have used understandable variable names
  • I have run clang-format against my *.hpp and *.cpp changes
  • I have run cmake-format against my changes to CMakeLists.txt
  • I have run black against changes to *.py
  • I have made corresponding changes to the documentation
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

@jwscook jwscook marked this pull request as draft March 22, 2023 12:35
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.

1 participant