posit-dev / posit-dev/connectapi

Support cookbook in `connectapi`: Creating Execution Environments

Open
#348 0 comments 0 reactions 1 assignee View on GitHub

@toph-allen is already working on this.

Since Dec 9, 2024.

cookbook
Dominant language
R
Stars
54
Forks
27
Avg merge
1d 3m
Merged PRs (30d)
1

Description

library(connectapi)

CONTAINER_REGISTRY = "myorg/myrepo"

client = connect()

create_environment(
  title = "Custom Image Classifier",
  description = "My custom image classifier",
  cluster_name = "Kubernetes",
  name = paste0(CONTAINER_REGISTRY, "/image-classifier:jammy"),
  matching = "exact",
  r_version = "4.2.3",
  r_path = "/opt/R/4.2.3/bin/R",
  python_version = "3.9.14",
  python_path = "/opt/python/3.9.14/python"
)

A JSON object representing the environment is returned.

create_execution_environment(title = "Project alpha", description = , ...)

Accept many things, but at the very outset covert to a single type.

It's reasonable that if you know a version, you can guess the path. Like 4.2.3, guess the path?

What if it's a vector of versions?

Could just have just separate parameters for python, quarto, r, tensorflow. list(list(path = "opt/234/r", version = "234"), list(path = "opt/567/r", version = "567")).


Probably want to just do the simple implementation of the API and then add possible syntactic sugar on top of it later.

Complete #313 first so that it can return the ExecutionEnv class.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.