Problem
The codebase currently has inconsistent spelling between British "centre" and American "center", creating confusion for users and inconsistency in the API.
British spelling currently used:
Site.centre property (core base class)
DynamicVoronoiSite._centre_coords, .calculate_centre()
- Builder methods:
with_spherical_sites(centres=...), with_polyhedral_sites(centre_species=...)
- Internal tools:
get_coordination_indices(centre_species=...)
American spelling currently used:
ReferenceBasedSites.create_polyhedral_sites(center_species=...) (public, released)
ReferenceBasedSites.create_dynamic_voronoi_sites(center_species=...)
- Recently updated:
PolyhedralSite(reference_center=...), DynamicVoronoiSite(reference_center=...)
Arguments for Standardising on American Spelling
- Ecosystem consistency: PyMatGen (our primary dependency) uses American spelling throughout its API
- Python ecosystem standard: NumPy, SciPy, Matplotlib, and virtually all scientific Python libraries use "center"
- International accessibility: American spelling is more familiar to the global Python developer community
- Future-proofing: New users will expect American spelling based on ecosystem conventions
- Minimal breaking changes: The analysis below shows limited public API impact
Breaking Change Analysis
Public API breaking changes:
- Builder methods:
centre_species → center_species, centres → centers
- Impact: LOW - Builder API is relatively new with limited adoption
Non-breaking changes (using aliases):
Site.centre → add Site.center alias, keep centre with deprecation warning
- Impact: NONE - existing code continues to work
Internal changes (no user impact):
get_coordination_indices(centre_species=...) → center_species (not intended as public API)
- Internal methods and attributes
Proposed Solution
Core Properties
- Add
Site.center property as alias to Site.centre
- Add deprecation warning to
Site.centre
- Update
DynamicVoronoiSite methods: calculate_centre() → calculate_center(), _centre_coords → _center_coords
Builder API
- Update builder method parameters:
centre_species → center_species, centres → centers
- Update factory function parameters to match
Internal Tools
- Update
get_coordination_indices(centre_species=...) → center_species
- Update other internal utilities
Documentation
- Search and replace "centre" → "center" in all docstrings, comments, and documentation
- Update examples to use American spelling
- Document breaking changes in release notes
Benefits
- Consistency: Single spelling convention throughout the API
- Developer experience: Matches expectations from other Python scientific libraries
- Maintainability: Reduces cognitive load when developing and reviewing code
- Ecosystem integration: Better alignment with PyMatGen and broader Python ecosystem
Problem
The codebase currently has inconsistent spelling between British "centre" and American "center", creating confusion for users and inconsistency in the API.
British spelling currently used:
Site.centreproperty (core base class)DynamicVoronoiSite._centre_coords,.calculate_centre()with_spherical_sites(centres=...),with_polyhedral_sites(centre_species=...)get_coordination_indices(centre_species=...)American spelling currently used:
ReferenceBasedSites.create_polyhedral_sites(center_species=...)(public, released)ReferenceBasedSites.create_dynamic_voronoi_sites(center_species=...)PolyhedralSite(reference_center=...),DynamicVoronoiSite(reference_center=...)Arguments for Standardising on American Spelling
Breaking Change Analysis
Public API breaking changes:
centre_species→center_species,centres→centersNon-breaking changes (using aliases):
Site.centre→ addSite.centeralias, keepcentrewith deprecation warningInternal changes (no user impact):
get_coordination_indices(centre_species=...)→center_species(not intended as public API)Proposed Solution
Core Properties
Site.centerproperty as alias toSite.centreSite.centreDynamicVoronoiSitemethods:calculate_centre()→calculate_center(),_centre_coords→_center_coordsBuilder API
centre_species→center_species,centres→centersInternal Tools
get_coordination_indices(centre_species=...)→center_speciesDocumentation
Benefits