This directory contains the CLI plugin wrapper scripts for the dr-apps tool.
To build the CLI plugin package:
make cli-pluginThis will:
- Build a Python wheel from the repository
- Find the wheel and extract the version from its filename
- Create a
dist/plugin-staging/directory with:- The wheel file
- Platform-specific wrapper scripts (
dr-apps.shanddr-apps.ps1) - A
manifest.jsonwith the wheel version
To publish a new version of the plugin:
-
Update the version in
setup.cfg(e.g.,version = 11.2.0) -
Build the plugin:
make clean make cli-plugin
-
Clone or checkout the DataRobot CLI repository where the plugin index is maintained:
git clone <cli-repo-url> cd <cli-repo>
-
Publish the plugin from your dr-apps directory:
make publish-cli-plugin PLUGIN_PUBLISH_FLAGS="--plugins-dir /path/to/cli-repo/docs/plugins --index /path/to/cli-repo/docs/plugins/index.json" -
Commit and push the changes in the CLI repo:
cd /path/to/cli-repo git add docs/plugins/ git commit -m "Add dr-apps plugin v11.2.0" git push
The plugin will be available at docs/plugins/index.json in the CLI repository.
If you need more control, you can use the individual commands:
# Build the plugin
make cli-plugin
# Package it (creates a .tar.xz archive)
make package-cli-plugin PLUGIN_PACKAGE_FLAGS="-o /path/to/output"
# Publish to the index
make publish-cli-plugin PLUGIN_PUBLISH_FLAGS="--plugins-dir /path/to/plugins --index /path/to/index.json"The generated plugin directory contains:
dr-apps.sh- Unix/Linux/macOS wrapper scriptdr-apps.ps1- Windows PowerShell wrapper scriptdrapps-{version}-py3-none-any.whl- Python wheel packagemanifest.json- Plugin metadata
The wrapper scripts use uv to execute the bundled wheel package. The scripts:
- Check for
uvavailability and provide installation instructions if missing - Handle the
--dr-plugin-manifestflag for CLI integration - Use their own directory (
$SCRIPT_DIR) to locate the wheel file - Execute
drappsviauv run --with <wheel-path>
uvmust be installed to use the plugin- Python 3.9+ is required