Skip to content

Rename Python API functions to match MATLAB camelCase naming#9

Merged
stevevanhooser merged 2 commits into
claude/add-python-porting-guide-emxajfrom
claude/update-cloud-functions-python-L9MAj
Mar 10, 2026
Merged

Rename Python API functions to match MATLAB camelCase naming#9
stevevanhooser merged 2 commits into
claude/add-python-porting-guide-emxajfrom
claude/update-cloud-functions-python-L9MAj

Conversation

@stevevanhooser
Copy link
Copy Markdown
Contributor

Summary

This PR standardizes the Python API function naming to use camelCase (matching MATLAB conventions) instead of snake_case. This improves consistency across the NDI ecosystem and makes the MATLAB-to-Python mapping more intuitive.

Key Changes

API Functions Renamed

  • Datasets API: get_datasetgetDataset, create_datasetcreateDataset, update_datasetupdateDataset, delete_datasetdeleteDataset, list_datasetslistDatasets, get_branchesgetBranches
  • Documents API: get_documentgetDocument, add_documentaddDocument, update_documentupdateDocument, delete_documentdeleteDocument, list_documentslistDatasetDocuments, list_all_documentslistDatasetDocumentsAll, get_document_countcountDocuments
  • Files API: get_upload_urlgetFileUploadURL, get_bulk_upload_urlgetBulkUploadURL, put_fileputFiles, put_file_bytesputFileBytes, get_file_detailsgetFileDetails, list_fileslistFiles
  • Users API: create_usercreateUser, get_userGetUser, get_current_userme
  • Compute API: start_sessionstartSession, get_session_statusgetSessionStatus, trigger_stagetriggerStage, finalize_sessionfinalizeSession, abort_sessionabortSession, list_sessionslistSessions
  • Auth API: decode_jwtdecodeJwt, get_token_expirationgetTokenExpiration, verify_tokenverifyToken, change_passwordchangePassword, reset_passwordresetPassword, verify_userverifyUser, resend_confirmationresendConfirmation
  • Orchestration: download_datasetdownloadDataset, upload_datasetuploadDataset, sync_datasetsyncDataset, upload_single_fileuploadSingleFile
  • Sync Operations: upload_newuploadNew, download_newdownloadNew, mirror_to_remotemirrorToRemote, mirror_from_remotemirrorFromRemote, two_way_synctwoWaySync
  • Download: download_full_datasetdownloadFullDataset, download_document_collectiondownloadDocumentCollection, jsons_to_documentsjsons2documents, download_dataset_filesdownloadDatasetFiles
  • Upload: upload_document_collectionuploadDocumentCollection, zip_documents_for_uploadzipForUpload
  • Internal: list_remote_document_idslistRemoteDocumentIds, get_cloud_dataset_idgetCloudDatasetIdForLocalDataset, create_remote_dataset_doccreateRemoteDatasetDoc
  • Admin: create_batch_submissioncreateDoiBatchSubmission, convert_to_crossrefconvertCloudDatasetToCrossrefDataset, create_new_doicreateNewDOI

Documentation Updates

  • Updated MATLAB_MAPPING.md to reflect the new camelCase function names
  • Updated docstrings and comments to reference renamed functions
  • Updated test names to match new function names (e.g., test_get_dataset_metadatatest_getDataset_metadata)

Test Updates

  • Updated all test imports and function calls to use new camelCase names
  • Updated test method names to reflect the renamed functions being tested
  • Updated test fixtures and helper functions to use new naming conventions

Implementation Details

https://claude.ai/code/session_01Skj3WbRtzYBdW5uk6nazhE

claude added 2 commits March 10, 2026 18:09
…ule)

Apply the Strict Mirror Rule from PYTHON_PORTING_GUIDE.md: every Python
function name must be an identical string match to its MATLAB counterpart.
Renamed ~80+ functions across 17 source files, 6 test files, and 2 tutorials
from snake_case to camelCase. Updated MATLAB_MAPPING.md to reflect new names.

https://claude.ai/code/session_01Skj3WbRtzYBdW5uk6nazhE
Rename functions across ndi.fun.* to use MATLAB-style camelCase naming:
- utils: name2variable_name → name2variableName
- data: read_image_stack → readImageStack
- doc: all_types → allTypes, find_fuid → findFuid, etc.
- doc_table: ontology_table_row_doc_to_table → ontologyTableRowDoc2Table, etc.
- epoch: t0_t1_to_array → t0_t1cell2array
- file: md5 → MD5, date_created → dateCreated, date_updated → dateUpdated
- table: identify_matching_rows → identifyMatchingRows, etc.
- stimulus: find_mixture_name → findMixtureName, etc.
- name_utils: name_to_variable_name → name2variableName

All old snake_case names preserved as backward-compatible aliases.
New ndi.fun.plot module ported from MATLAB with bar3, multichan, stimulusTimeseries.
Updated all references in tests and tutorials.

https://claude.ai/code/session_01Skj3WbRtzYBdW5uk6nazhE
@stevevanhooser stevevanhooser merged commit 2b3e273 into claude/add-python-porting-guide-emxaj Mar 10, 2026
@stevevanhooser stevevanhooser deleted the claude/update-cloud-functions-python-L9MAj branch March 10, 2026 18:43
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