Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
- name: flake8
run: flake8 .

- name: snake_case
# check_snake_case.py owns the include/exclude rules; pass it everything
# under domino/ and it will skip paths that don't apply. Keeps CI in
# lockstep with the pre-commit hook (both invoke the same script).
run: find domino -name "*.py" | xargs python scripts/check_snake_case.py

typecheck:
name: Type check
Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,36 @@ All notable changes to the `python-domino` library will be documented in this fi
* GitHub Actions CI workflow (`.github/workflows/ci.yml`) that runs lint, type-checking, and tests on every PR and push to `master`. All checks must pass before a PR can be merged.
* `pyproject.toml` with `isort` and `black` configuration (`profile = "black"`, `target-version = ["py310"]`).

### Deprecated
The following public API parameters have been renamed to follow PEP 8 (`snake_case`).
The old names continue to work but will emit a `DeprecationWarning`. They will be
removed in the next major version.

> **Note:** these renames are Python-side only. The JSON keys sent to the
> Domino HTTP API are unchanged — the SDK still emits `commitId`, `isDirect`,
> `hardwareTierId`, etc. on the wire. The HTTP API contract is not affected.

| 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` | `runId` | `run_id` |
| `run_stop` | `saveChanges` | `save_changes` |
| `runs_status` | `runId` | `run_id` |
| `get_run_log` | `runId` | `run_id` |
| `get_run_log` | `includeSetupLog` | `include_setup_log` |
| `runs_stdout` | `runId` | `run_id` |
| `files_list` | `commitId` | `commit_id` |
| `endpoint_publish` | `commitId` | `commit_id` |
| `app_publish` | `unpublishRunningApps` | `unpublish_running_apps` |
| `app_publish` | `hardwareTierId` | `hardware_tier_id` |
| `app_publish` | `environmentId` | `environment_id` |
| `app_publish` | `externalVolumeMountIds` | `external_volume_mount_ids` |
| `app_publish` | `commitId` | `commit_id` |
| `app_publish` | `appId` | `app_id` |
| `app_unpublish` | `appId` | `app_id` |

### Changed
* Resolved all 38 pre-existing `mypy` type errors across `domino/`, bringing the codebase to a clean `mypy` pass with `--python-version=3.10`.
* Resolved all `flake8`, `isort`, and `black` formatting errors across the codebase.
Expand Down
29 changes: 25 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -525,17 +525,38 @@ Retrieve a file from the Domino server in a project from its path and commit id.

=== Apps

==== app_publish(unpublishRunningApps=True, hardwareTierId=None)
==== app_publish(unpublish_running_apps=True, hardware_tier_id=None, environment_id=None, external_volume_mount_ids=None, commit_id=None, branch=None, app_id=None)

Publish an app within a project, or republish an existing app.

* _unpublishRunningApps:_ (Defaults to True) Check for an active app instance in the current project and unpublish it before re/publishing.
* _hardwareTierId:_ (Optional) Launch the app on the specified hardware tier.
* _unpublish_running_apps:_ (Defaults to `true`) Check for an active app instance in the current project and stop it before re/publishing.
* _hardware_tier_id:_ (Optional) Launch the app on the specified hardware tier ID.
* _environment_id:_ (Optional) Launch the app with the specified environment ID.
* _external_volume_mount_ids:_ (Optional) List of external volume mount IDs to attach to the app.
* _commit_id:_ (Optional) Launch the app from a specific commit. Cannot be combined with `branch`.
* _branch:_ (Optional) Launch the app from the tip of a specific branch. Cannot be combined with `commit_id`.
* _app_id:_ (Optional) The ID of the app to publish. If omitted, the project's default app is used (or a new one is created if none exists).

==== app_unpublish()
[source,python]
----
# Publish from a specific branch
d.app_publish(branch="my-feature-branch")

# Publish from a specific commit
d.app_publish(commit_id="abc123def456")

# Publish a specific app by ID
d.app_publish(app_id="aabbccddeeff001122334457")
----

NOTE: The parameters `unpublishRunningApps`, `hardwareTierId`, `environmentId`, `externalVolumeMountIds`, `commitId`, and `appId` are deprecated and will be removed in the next major version. Use the `snake_case` equivalents listed above. These renames are Python-side only — the JSON keys sent to the Domino HTTP API are unchanged (the SDK still emits `commitId`, `hardwareTierId`, etc. on the wire). The HTTP API contract is not affected.

==== app_unpublish(app_id=None)

Stop the running app in the project.

* _app_id:_ (Optional) The ID of the app to stop. If omitted, the project's default app is used.

=== Jobs

==== job_start(command, commit_id=None, hardware_tier_name=None, environment_id=None, on_demand_spark_cluster_properties=None, compute_cluster_properties=None, external_volume_mounts=None, title=None):
Expand Down
52 changes: 46 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -534,21 +534,61 @@ Retrieve a file from the Domino server in a project from its path and commit id.

## Apps

### app_publish(unpublishRunningApps=True, hardwareTierId=None)
### app_publish(unpublish_running_apps=True, hardware_tier_id=None, environment_id=None, external_volume_mount_ids=None, commit_id=None, branch=None, app_id=None)

Publish an app within a project, or republish an existing app.

- *unpublishRunningApps:* (Defaults to True) Check for an active app
instance in the current project and unpublish it before
- *unpublish_running_apps:* (Defaults to `True`) Check for an active
app instance in the current project and stop it before
re/publishing.

- *hardwareTierId:* (Optional) Launch the app on the specified
hardware tier.
- *hardware_tier_id:* (Optional) Launch the app on the specified
hardware tier ID.

### app_unpublish()
- *environment_id:* (Optional) Launch the app with the specified
environment ID.

- *external_volume_mount_ids:* (Optional) List of external volume
mount IDs to attach to the app.

- *commit_id:* (Optional) Launch the app from a specific commit.
Cannot be combined with `branch`.

- *branch:* (Optional) Launch the app from the tip of a specific
branch. Cannot be combined with `commit_id`.

- *app_id:* (Optional) The ID of the app to publish. If omitted, the
project's default app is used (or a new one is created if none
exists).

```python
# Publish from a specific branch
d.app_publish(branch="my-feature-branch")

# Publish from a specific commit
d.app_publish(commit_id="abc123def456")

# Publish a specific app by ID
d.app_publish(app_id="aabbccddeeff001122334457")
```

> **Note:** The parameters `unpublishRunningApps`, `hardwareTierId`,
> `environmentId`, `externalVolumeMountIds`, `commitId`, and `appId`
> are deprecated and will be removed in the next major version.
> Use the `snake_case` equivalents listed above.
>
> These renames are Python-side only — the JSON keys sent to the
> Domino HTTP API are unchanged (the SDK still emits `commitId`,
> `hardwareTierId`, etc. on the wire). The HTTP API contract is
> not affected.

### app_unpublish(app_id=None)

Stop the running app in the project.

- *app_id:* (Optional) The ID of the app to stop. If omitted, the
project's default app is used.

## Jobs

### job_start(command, commit_id=None, hardware_tier_name=None, environment_id=None, on_demand_spark_cluster_properties=None, compute_cluster_properties=None, external_volume_mounts=None, title=None, main_repo_git_ref=None):
Expand Down
Loading
Loading