Skip to content

refactor: migrate Boost.Python syntax to nanobind - #89

Draft
SYMSCAE wants to merge 25 commits into
diffpy:migration-nanofrom
SYMSCAE:nanobind-syntax
Draft

refactor: migrate Boost.Python syntax to nanobind#89
SYMSCAE wants to merge 25 commits into
diffpy:migration-nanofrom
SYMSCAE:nanobind-syntax

Conversation

@SYMSCAE

@SYMSCAE SYMSCAE commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

This PR is the initial port that migrates the original Boost.Python bindings to nanobind as mentioned in diffpy/pyobjcryst#88, noticed future improvements will be mentioned in TODOs but will be addressed in future PRs.

@SYMSCAE SYMSCAE changed the title Nanobind syntax refactor: migrate Boost.Python syntax to nanobind Jul 14, 2026
@SYMSCAE

SYMSCAE commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@sbillinge Please see if this is what we want.

@stevenhua0320

stevenhua0320 commented Jul 25, 2026

Copy link
Copy Markdown

@SYMSCAE This PR is still failing. I suspect it is because we haven't updated the dependencies for this package (libdiffpy and pyobjcryst). So, in order to make it build properly, we might need to update its dependency so that we could test whether it would work. @sbillinge We might also open migration branch on libdiffpy and pyobjcryst so that @SYMSCAE and @joeseaer would work on that.

@sbillinge

Copy link
Copy Markdown
Contributor

@SYMSCAE This PR is still failing. I suspect it is because we haven't updated the dependencies for this package (libdiffpy and pyobjcryst). So, in order to make it build properly, we might need to update its dependency so that we could test whether it would work. @sbillinge We might also open migration branch on libdiffpy and pyobjcryst so that @SYMSCAE and @joeseaer would work on that.

Migration work in those repos is on migration-nano branches. I am not sure about pyobjcryst but we can check. Please coordinate with earlier work fine by @SYMSCAE and others (I don't remember exactly)

@sbillinge

Copy link
Copy Markdown
Contributor

@SYMSCAE @stevenhua0320 we need to merge this to move the 3D PDF calculator forward. Please can we work on getting the dependency issue resolved so we can move forward? This is a bit urgent.

@stevenhua0320

Copy link
Copy Markdown

@SYMSCAE Let's first work on pyobjcryst as I believe there is a migration-nano for migration purpose. For this week you could work on that package and bug me if you are ready for the review.

@SYMSCAE

SYMSCAE commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@SYMSCAE Let's first work on pyobjcryst as I believe there is a migration-nano for migration purpose. For this week you could work on that package and bug me if you are ready for the review.

Hi Steven, I believe we don’t need to touch pyobjcryst. The only change in upstream library is libdiffpy, which is requiring a new conda release. After that we should be good to pass rest of the tests.

@joeseaer

Copy link
Copy Markdown

Hi @SYMSCAE @stevenhua0320 @sbillinge,

I have opened diffpy/libdiffpy#50, which ports ThreeDPDFCalculator onto the migration-nano branch. The full C++ test suite passes locally (218 tests).

Once #50 is merged and #89 provides a stable nanobind base, I’ll add the corresponding ThreeDPDFCalculator bindings in a follow-up PR based on the updated migration-nano branch.

Please feel free to let me know if I can help with any related issues or reviews in the meantime. I’d be happy to assist.

@sbillinge

Copy link
Copy Markdown
Contributor

@joeseaer it could help us if you could lead the nanobind migration as we are still 1 month away from being back in session and this is not the focus of @SYMSCAE and @stevengeorge128, our c++ folks, at the moment.

Basically, we want to figure out how to do the testing on libdiffpy migration-nano branch to make sure we didn't break anything (and did it in the optimal best way), then merge that into main and do a release. Then we need to do the same for diffpy.srreal. Finally we will need to take what we learned to pdffit2.

@joeseaer would you be able to take that on and report back all the steps and the results?

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.

4 participants