Skip to content

Conversation

@ajpotts
Copy link
Contributor

@ajpotts ajpotts commented Dec 23, 2025

Standardize Public API Naming & Add Deprecation Shims

Summary

This PR standardizes Arkouda’s public Python API to PEP 8–compliant snake_case naming, while preserving backward compatibility through explicit deprecation shims. The goal is to modernize the API surface, unblock stricter linting (Ruff N802), and provide a clear, low-risk migration path for users.

No user-facing functionality is removed in this PR.


Key Changes

1. Snake_case canonical APIs

The following camelCase public APIs have been replaced with snake_case equivalents and updated throughout the codebase:

Dtype / scalar helpers

  • isSupportedIntis_supported_int
  • isSupportedFloatis_supported_float
  • isSupportedNumberis_supported_number
  • isSupportedBoolis_supported_bool
  • isSupportedDType / isSupportedDtypeis_supported_dtype

Logger API

  • getArkoudaLoggerget_arkouda_logger
  • getArkoudaClientLoggerget_arkouda_client_logger
  • enableVerboseenable_verbose
  • disableVerbosedisable_verbose
  • ArkoudaLogger.changeLogLevelchange_log_level
  • ArkoudaLogger.getHandlerget_handler

Client dtypes

  • BitVectorizerbit_vectorizer

Random (legacy)

  • globalGeneratorExistsglobal_generator_exists
  • getGlobalGeneratorget_global_generator

2. Backward-compatible deprecation shims

All legacy camelCase names are retained as thin wrapper aliases that:

  • Emit a DeprecationWarning
  • Forward directly to the new snake_case implementation

This ensures existing user code continues to work unchanged while providing a clear upgrade signal.


3. Ruff configuration cleanup

  • Removed global suppression of N802
  • Explicitly allow legacy camelCase names via [lint.pep8-naming].ignore-names
  • This keeps naming exceptions explicit, intentional, and auditable

4. Internal cleanups (non-user-facing)

  • Renamed internal helpers such as _matmul2D → _matmul2d
  • Standardized internal logger construction
  • Updated tests to use canonical snake_case APIs

Compatibility & Migration

  • No breaking changes in this PR
  • Users may continue using camelCase APIs short-term
  • Deprecation warnings guide migration to snake_case
  • Legacy names can be safely removed in a future major/minor release

Rationale

This change:

  • Aligns Arkouda with Python ecosystem conventions (NumPy, pandas, SciPy)
  • Enables stricter linting without global rule suppression
  • Clarifies the long-term public API surface
  • Reduces maintenance burden by eliminating naming ambiguity

Closes #5216: remove camelCase

@ajpotts ajpotts force-pushed the 5216_remove_camelCase branch from b4fa3ef to ec204ef Compare December 23, 2025 21:15
@ajpotts ajpotts changed the title Closes #5213: add TypeGuards to dtypes module Closes #5216: remove camelCase Dec 23, 2025
@ajpotts ajpotts force-pushed the 5216_remove_camelCase branch 3 times, most recently from b8aa312 to 308230f Compare December 23, 2025 23:37
@ajpotts ajpotts marked this pull request as ready for review December 24, 2025 11:45
@ajpotts ajpotts force-pushed the 5216_remove_camelCase branch from 308230f to cae187e Compare December 29, 2025 18:07
@ajpotts ajpotts force-pushed the 5216_remove_camelCase branch from cae187e to bed84c3 Compare January 5, 2026 20:50
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.

remove camelCase

1 participant