Skip to content

refactor: migrate Boost.Python syntax to nanobind#86

Draft
SYMSCAE wants to merge 18 commits into
diffpy:migration-nanofrom
SYMSCAE:nb-syntax
Draft

refactor: migrate Boost.Python syntax to nanobind#86
SYMSCAE wants to merge 18 commits into
diffpy:migration-nanofrom
SYMSCAE:nb-syntax

Conversation

@SYMSCAE

@SYMSCAE SYMSCAE commented Jun 24, 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very early port with only syntax checks performed. The pickle suite naming is left but underneath it is handled differently, the final ways of pickling depends on migration for rest of the files.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an explicit behavior change (or enhancement?) in atomadapter_indexing that non-unit and negative-step slices are handled. We may need to test this on all of the packages to see if it breaks anything.

@SYMSCAE

SYMSCAE commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@sbillinge Now the syntax have been migrated and build and tests are passed. I'll keep marking the PR as draft since I found some of parts are not done elegantly, but we can start reviewing this.

@sbillinge

Copy link
Copy Markdown
Contributor

@SYMSCAE pleae can you, on a separate PR, do the updates of the pre-commit versions so we can get that passing also?

I will start to look at this. @pavoljuhas if you have time, there is more c++ reviewing here. @ycexiao @danielsirakov, if you guys have time, please could you also take a look. This is the work to migrate from boost to nanobind

@SYMSCAE

SYMSCAE commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@SYMSCAE pleae can you, on a separate PR, do the updates of the pre-commit versions so we can get that passing also?

I will start to look at this. @pavoljuhas if you have time, there is more c++ reviewing here. @ycexiao @danielsirakov, if you guys have time, please could you also take a look. This is the work to migrate from boost to nanobind

I'm working on that, but the change of docformatter breaks some things. I'll open a new PR and bring the discussion over there.

@sbillinge

Copy link
Copy Markdown
Contributor

I merged that PR so you can update main and merge it into this branch

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.

2 participants