Skip to content

rename camelCase params to snake_case with deprecation shims#267

Open
domino-blake wants to merge 9 commits into
masterfrom
blake/pr-renames
Open

rename camelCase params to snake_case with deprecation shims#267
domino-blake wants to merge 9 commits into
masterfrom
blake/pr-renames

Conversation

@domino-blake
Copy link
Copy Markdown
Contributor

@domino-blake domino-blake commented Apr 22, 2026

What does this PR do?

Renames 18 public API parameters from camelCase to snake_case to comply with PEP 8.
Old names continue to work and emit a DeprecationWarning pointing callers to the
new name — no hard breaking changes in this PR.

Renamed parameters

Method Old name New name
runs_start / runs_start_blocking isDirect is_direct
runs_start / runs_start_blocking commitId commit_id
runs_start / runs_start_blocking publishApiEndpoint publish_api_endpoint
run_stop saveChanges save_changes
runs_status runId run_id
get_run_log includeSetupLog include_setup_log
runs_stdout runId run_id
files_list commitId commit_id
endpoint_publish modelId / modelVersionId model_id / model_version_id
app_publish unpublishRunningApps / hardwareTierId / environmentId / externalVolumeMountIds / commitId / appId snake_case equivalents

Tests

  • Adds tests/test_deprecations.py with full coverage: every old name raises
    DeprecationWarning, every new name is accepted silently.

Note for reviewers

These are technically breaking in a future major version (old names will eventually
be removed). The deprecation shims give callers time to migrate. Happy to discuss
the timeline for removal if needed.

Testing

  • 18 new tests in tests/test_deprecations.py

  • All existing tests continue to pass (they use the old names, which still work)

  • Unit tests passing

  • Deprecation warnings added for all renamed params

  • CHANGELOG updated

  • README updated

@domino-blake domino-blake changed the title refactor: rename camelCase params to snake_case with deprecation shims rename camelCase params to snake_case with deprecation shims Apr 22, 2026
@domino-blake
Copy link
Copy Markdown
Contributor Author

Once #265 merges, need to change this to target master

@ddl-bira-ignacio
Copy link
Copy Markdown
Contributor

issue: The table says endpoint_publish renames modelId/modelVersionId, but the actual diff renames commitId to commit_id. Looks like the table just needs a small fix.

Comment thread domino/domino.py Outdated
DeprecationWarning,
stacklevel=2,
)
is_direct = kwargs.pop("isDirect")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

issue: If someone passes both is_direct=... and isDirect=... in the same call, the old name silently wins here because kwargs gets popped after binding. Might be worth raising a ValueError when both are provided so nobody gets surprised.

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.

silent override is fixed. b45ea77

Comment thread domino/domino.py
tier=None,
publishApiEndpoint=None,
publish_api_endpoint=None,
**kwargs,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

question: What's the idea behind adding kwargs here? it looks like the method only uses well known names. We should probably adopt that instead.
if it's just to deal with parameter naming, then i'd suggest putting a deprecation warning and do a full replace in the next release

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.

The **kwargs is purely the deprecation mechanism — every method that has it is using it to absorb the old camelCase name without breaking existing callers

Comment thread .github/workflows/ci.yml Outdated

- name: snake_case
run: |
find domino -name "*.py" \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: The find/grep combo here seems different than what the pre-commit hook does

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.

fixed by moving the filtering rules into check_snake_case.py itself, so both CI and pre-commit invoke the same 9987404

Comment thread domino/domino.py
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

note: Just want to call out that these renames are Python-side only -- the JSON keys going over the wire are still camelCase. Might be worth a quick note in the README or changelog so users don't think the API contract changed.

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.

Added a note in CHANGELOG.md, README.md, and README.adoc explicitly calling out that these renames are Python-side only bd1785b

@domino-blake domino-blake changed the base branch from blake/pr-quality to master May 12, 2026 15:04
…both theheading and parameter list

- Documented all 7 parameters (including the 4 that were already there but undocumented: environment_id, external_volume_mount_ids, commit_id, branch, app_id)
- Added code examples showing the three common new use cases (branch, commit, specific app ID)
- Added a deprecation note pointing callers from the old camelCase names to the new ones
- Updated app_unpublish() to document its app_id parameter (which was also previously undocumented)
- Updated app_publish() to include branch and commit_id when publishing
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