Skip to content

Python Extension#71

Merged
stevengj merged 38 commits intoNanoComp:masterfrom
Luochenghuang:master
Nov 29, 2024
Merged

Python Extension#71
stevengj merged 38 commits intoNanoComp:masterfrom
Luochenghuang:master

Conversation

@Luochenghuang
Copy link
Copy Markdown
Contributor

@Luochenghuang Luochenghuang commented Nov 15, 2024

Closes #70

  • Adds swig interface libctlgeom.i file.
  • Adds the python wrapper on top of the SWIG wrapper for more pythonic user experience.
  • Adds query vectorization.
  • Adds tests for the python wrapper.
  • Adds build script that automatically generate Python bindings using SWIG, compile the extension module, and Install the package using pip.
  • Adds the setup.py file for pip installation.
  • Adds the extension readme.
  • Adds a demo Jupyter Notebook.

This is to simplify the creation and manipulation of swig objects.
…a crash.

improve memory management of the MATERIAL_TYPE
…les.

Previously usr/local/include was used, which is undesirable.
@Luochenghuang Luochenghuang marked this pull request as ready for review November 15, 2024 22:37
Comment thread python/ctlgeom.py Outdated
Comment thread python/setup.py Outdated
@stevengj
Copy link
Copy Markdown
Collaborator

See #70 (comment), which I meant to post on this PR.

@Luochenghuang
Copy link
Copy Markdown
Contributor Author

Luochenghuang commented Nov 20, 2024

See #70 (comment), which I meant to post on this PR.

Great, thank you! I pulled your automake build into this PR. I also made some tweaks. Let me know if they make sense to you.

Comment thread configure.ac Outdated
Comment thread utils/python/__init__.py Outdated
Comment thread doc/docs/Installation.md Outdated
Comment thread doc/docs/Installation.md Outdated
Import libctlgeom as a module instead of import all names from
libctlgeom
Comment thread doc/docs/Installation.md
make
make install
```
Please follow the [instructions here](../../utils/python/README.md) to install the python extension.
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.

this needs to be an http to github … I don't think readthedocs will let you link outside the docs directory?

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.

let's merge this and then you can do a PR to make a proper link once it is merged and appears on github.

@stevengj stevengj merged commit 88e4254 into NanoComp:master Nov 29, 2024
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.

Python API for libctlgeom?

3 participants