glotzerlab / freud

Powerful, efficient particle trajectory analysis in scientific Python.
https://freud.readthedocs.io
BSD 3-Clause "New" or "Revised" License
280 stars 49 forks source link

Convert Locality Module to Use Nanobind #1263

Closed tommy-waltmann closed 4 months ago

tommy-waltmann commented 5 months ago

Description

This PR converts the locality module to use nanobind. It also enables the data module because it's pure python, but uses PeriodicBuffer internally.

Motivation and Context

We are removing Cython from freud, this is one of a series of PRs that accomplishes that goal.

How Has This Been Tested?

Testing has been added in the CI for newly enabled modules.

Types of changes

Checklist:

tommy-waltmann commented 4 months ago

There are some classes for histogramming in locality.py (_SpatialHistogram and _SpatialHistogram1D) that are unused by any compute in the locality module. They exist solely for the purpose of exposing common properties of classes that use binning to do their calculation. I choose to leave the conversion of those classes for a future PR because we have no way of testing them right now.

tommy-waltmann commented 4 months ago

Please ignore the clang-tidy errors on this PR, they are related to uncoverted modules.