Skip to content

rename camelCase params to snake_case with deprecation shims#267

Merged
domino-blake merged 9 commits into
masterfrom
blake/pr-renames
May 19, 2026
Merged

rename camelCase params to snake_case with deprecation shims#267
domino-blake merged 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
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
@domino-blake domino-blake changed the base branch from blake/pr-quality to master May 12, 2026 15:04
Comment thread domino/domino.py
return run_response

def run_stop(self, runId, saveChanges=True):
def run_stop(self, run_id=_UNSET, save_changes=_UNSET, **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.

suggestion: run_stop with no args now silently passes None as job_id instead of raising, as it would before. It might be worth putting code that checks if there's a valid run id passed in

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 check on 9a24604

@domino-blake domino-blake merged commit 6b0059d into master May 19, 2026
5 checks passed
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