diff --git a/.github/ISSUE_TEMPLATE/issue-template.md b/.github/ISSUE_TEMPLATE/issue-template.md index 09ed3eb34a..903498fc80 100644 --- a/.github/ISSUE_TEMPLATE/issue-template.md +++ b/.github/ISSUE_TEMPLATE/issue-template.md @@ -1,17 +1,16 @@ --- name: Issue Template about: An issue template. -title: '' -labels: '' -assignees: '' - +title: "" +labels: "" +assignees: "" --- Description for the issue. ### Related Issues -- +- ```[tasklist] ### Acceptance Criteria diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index aa64e22996..fe3f1e382c 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,34 +2,41 @@ ## Intent + ## Type of Change + -* - [ ] Bug Fix -* - [ ] New Feature -* - [ ] Breaking Change -* - [ ] Documentation -* - [ ] Refactor -* - [ ] Tooling +- - [ ] Bug Fix +- - [ ] New Feature +- - [ ] Breaking Change +- - [ ] Documentation +- - [ ] Refactor +- - [ ] Tooling ## Approach + ## Automated Tests + ## Directions for Reviewers + ## Checklist + + - [ ] I have updated [CHANGELOG.md](../CHANGELOG.md) to cover notable changes. diff --git a/.github/workflows/bats.yaml b/.github/workflows/bats.yaml index 9a1d237b4a..a8b9147ee4 100644 --- a/.github/workflows/bats.yaml +++ b/.github/workflows/bats.yaml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 with: repository: rstudio/connect-content - path: 'test/content' + path: "test/content" sparse-checkout: bundles sparse-checkout-cone-mode: false token: ${{ secrets.CONNECT_PAT }} @@ -56,7 +56,7 @@ jobs: - uses: actions/checkout@v4 with: repository: rstudio/connect-content - path: 'test/content' + path: "test/content" sparse-checkout: bundles sparse-checkout-cone-mode: false token: ${{ secrets.CONNECT_PAT }} diff --git a/.github/workflows/contract.yaml b/.github/workflows/contract.yaml index 3c97a26ae9..539ce7d08c 100644 --- a/.github/workflows/contract.yaml +++ b/.github/workflows/contract.yaml @@ -35,7 +35,7 @@ jobs: - uses: actions/checkout@v4 with: repository: rstudio/connect-content - path: 'test/content' + path: "test/content" sparse-checkout: bundles sparse-checkout-cone-mode: false token: ${{ secrets.CONNECT_PAT }} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 7e38ee8f5e..5ea9b8433f 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -6,21 +6,21 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: extractions/setup-just@v2 - - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' - cache-dependency-path: '**/package-lock.json' - - run: just npm-install - - run: just check-format + - uses: actions/checkout@v4 + - uses: extractions/setup-just@v2 + - uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "npm" + cache-dependency-path: "**/package-lock.json" + - run: just npm-install + - run: just check-format - - run: just vscode deps - - run: just vscode lint + - run: just vscode deps + - run: just vscode lint - - run: just web install - - run: just web lint + - run: just web install + - run: just web lint - - run: just test/cy install - - run: just test/cy lint + - run: just test/cy install + - run: just test/cy lint diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 717b6e3e8d..3e8342e909 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -33,7 +33,7 @@ jobs: - archive - package uses: ./.github/workflows/upload.yaml - with: + with: nightly: true secrets: inherit diff --git a/.github/workflows/ui.yaml b/.github/workflows/ui.yaml index 1b33f60a5c..758f6f1251 100644 --- a/.github/workflows/ui.yaml +++ b/.github/workflows/ui.yaml @@ -23,7 +23,6 @@ jobs: - run: just cy install - run: just cy test - # Videos are captured whether the suite fails or passes - name: Save videos uses: actions/upload-artifact@v4 diff --git a/.github/workflows/upload.yaml b/.github/workflows/upload.yaml index 3bfb245ae6..e47515bb10 100644 --- a/.github/workflows/upload.yaml +++ b/.github/workflows/upload.yaml @@ -1,15 +1,15 @@ name: Upload on: workflow_call: - inputs: - nightly: - description: 'Is this a nightly upload?' + inputs: + nightly: + description: "Is this a nightly upload?" required: false default: false type: boolean permissions: id-token: write # This is required for requesting the JWT - contents: read # This is required for actions/checkout + contents: read # This is required for actions/checkout jobs: upload: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index ee69f11433..06b4484ccd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,25 +25,30 @@ Deployment Records and Configurations can now be created, opened, and in the case of Configurations edited directly via the Extension's views. ### Added + - Include links to documentation and feedback channel (#1140) - Add comments to deployment records indicating they should not editted by users (#1092) - Deployment staged logs view in the bottom VSCode panel - Ability to select a Configuration when deploying ### Changed + - Use relative paths for the configuration `entrypoint` for Quarto projects (#960) ### Fixed + - Fix being unable to ignore subdirectories in `.positignore` (#1117) - Improve error serialization with errors from Connect or networking (#1074) - Fixed cases where an unnamed `.toml` deployment record was created (#1076, #1113) ### Removed + - Stand-alone webview opened via an Editor button on files ## [1.0.alpha2] ### Added + - VSCode extension package includes the publisher binary (#737) - `publisher init` recognizes Quarto projects (jupyter and markdown engines only) (#814) - `publisher init` recognizes Bottle and Pycnic apps as WSGI/Flask variants (#794) @@ -53,12 +58,14 @@ case of Configurations edited directly via the Extension's views. - Deployment history includes the URLs where the deployed content can be accessed (#742), error information if the deployment failed (#747), and the date/time the deployment was created (#639, #836, #839) ### Changed + - Require the user to choose an account, if they have more than one (#636) - Use CONNECT_SERVER and CONNECT_API_KEY environment variables if they are defined and no account is selected (#722) - Deployment names in the UI are now case-insensitive (#808) - Record new deployments immediately, instead of waiting until Deploy is clicked (#773, #775, #776, #777) ### Fixed + - Improve UI navigation, especially when going back or viewing progress/logs (#788, #824) - Enable copy/paste in the VSCode publisher window (#612) - Enable command palette in the VSCode publisher window (#633) @@ -66,6 +73,7 @@ case of Configurations edited directly via the Extension's views. - Improve messages for TOML parsing/validation errors (#631) ### Removed + - Light/dark mode selection menu when running in VSCode (#804) ## [1.0.alpha1] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 161759ea88..69b7db06a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,6 @@ - [Pre-Releases](#pre-releases) - [Release Lifecycle](#release-lifecycle) - The get this project up and running on your local machine, execute the following Just commands: ```console @@ -74,7 +73,7 @@ just run ## Testing -This project follows the guidance written by *Ham Vocke* in the *[The Practical Test Pyramid](https://martinfowler.com/articles/practical-test-pyramid.html).* Please read the article for a detailed overview of different test types and how they are utilized. +This project follows the guidance written by _Ham Vocke_ in the _[The Practical Test Pyramid](https://martinfowler.com/articles/practical-test-pyramid.html)._ Please read the article for a detailed overview of different test types and how they are utilized. ### Unit Tests @@ -122,13 +121,12 @@ Execute `just -l` for a list of available commands and documentation. When executing commands the following variables are accepted to change behavior. -| Variable | Default | Type | Description | -|----------|---------|------|----------------------------------------------------------------------------------------------------------| -| CI | false | bool | Enable CI mode. When set to true, multi-platform builds are enabled. | -| DEBUG | false | bool | Enable DEBUG mode. When set to true, `set +x` is enabled for all Justfile targets. | -| DOCKER | false | bool | Enable DOCKER mode. When set to true, all Justfile targets are executed in Docker. | -| MODE | dev | enum | When set to `dev`, development is enabled. All other values disable development mode. | - +| Variable | Default | Type | Description | +| -------- | ------- | ---- | ------------------------------------------------------------------------------------- | +| CI | false | bool | Enable CI mode. When set to true, multi-platform builds are enabled. | +| DEBUG | false | bool | Enable DEBUG mode. When set to true, `set +x` is enabled for all Justfile targets. | +| DOCKER | false | bool | Enable DOCKER mode. When set to true, all Justfile targets are executed in Docker. | +| MODE | dev | enum | When set to `dev`, development is enabled. All other values disable development mode. | #### Behavior in GitHub Actions @@ -137,7 +135,7 @@ When running in GitHub Actions, the env variable `CI` is set to `true` by GitHub This mode can be reproduced on your local machine by setting `CI=true`. | Variable | Default | -|----------|---------| +| -------- | ------- | | DOCKER | true | | MODE | prod | @@ -155,7 +153,6 @@ To start a release create a semver compatible tag. _For this example, we will use the tag `v0.0.dev0`. This tag already exists, so you will not be able run the following commands verbatim._ - **Step 1** Create a proper SemVer compatible tag. Consult the [SemVer specification](https://semver.org/spec/v2.0.0.html) if you are unsure what this means. @@ -209,7 +206,6 @@ An beta pre-release. Created to support closed external user testing. `N` starts *https://peps.python.org/pep-0440/#pre-releases* - **`X.Y.rcN`** An release-candidate pre-release. Created to support open external user testing. `N` starts at **1** and increments by 1 (`X.Y.rc1`, `X.Y.rc2`, ..., `X.Y.rcN`). diff --git a/build/docker-compose.yml b/build/docker-compose.yml index 9abd229bbe..6502387225 100644 --- a/build/docker-compose.yml +++ b/build/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3' +version: "3" services: connect: diff --git a/docs/cli.md b/docs/cli.md index a16a588535..8e1358b61f 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -23,7 +23,7 @@ The client auto-detects the type of content in `DIRECTORY`. For Python apps, `publisher` looks for a single Python source file in the directory to be the entrypoint. If there are multiple python files, one of them -must be named `app.py`, `api.py`, `main.py`, or `streamlit_app.py`. +must be named `app.py`, `api.py`, `main.py`, or `streamlit_app.py`. For Quarto projects, `publisher` looks for a .qmd file with the same name as the project directory, or for a single .qmd file to be the entrypoint. @@ -60,7 +60,6 @@ creates a record of the deployment in `.posit/publish/deployments/${NAME}.toml` ([schema](https://cdn.posit.co/publisher/schemas/posit-publishing-record-schema-v3.json)). `DIRECTORY` is optional, and defaults to the current directory. - It is OK to rename deployment files as long as they live in `.posit/publish/deployments` and have a `.toml` suffix. Deleting a deployment file is also OK, and will cause `publisher` to forget about that deployment. diff --git a/docs/index.md b/docs/index.md index 0e84bf89b5..81ccc87e05 100644 --- a/docs/index.md +++ b/docs/index.md @@ -5,57 +5,59 @@ Python projects, and Quarto projects using Python. Support for R projects is planned for a later release. Key concepts: -* Publisher provides a binary with a CLI and an API server. There is also a VSCode - extension that presents a UI within the VSCode left activity panel. -* Deployment options are set via a configuration file in `.posit/publish/`. -* Records of where you have deployed are kept in `.posit/publish/deployments`. -* Accounts/credentials are currently read from rsconnect and rsconnect-python. +- Publisher provides a binary with a CLI and an API server. There is also a VSCode + extension that presents a UI within the VSCode left activity panel. +- Deployment options are set via a configuration file in `.posit/publish/`. +- Records of where you have deployed are kept in `.posit/publish/deployments`. +- Accounts/credentials are currently read from rsconnect and rsconnect-python. ## Features Supported features: -* Deploy projects to Connect -* UI available via VSCode extension -* Deploy using CLI -* Configuration-file based workflow -* Configuration schema enables editing with the [Even Better TOML +- Deploy projects to Connect +- UI available via VSCode extension +- Deploy using CLI +- Configuration-file based workflow +- Configuration schema enables editing with the [Even Better TOML VSCode](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml) extension -* Exclude files from deployment with `.positignore` files (like `.gitignore`) -* Python content: APIs, applications, and notebooks -* Automatic detection of client Python and Quarto version -* Automatic creation of a minimal requirements.txt file if needed, by scanning imports and mapping them to package names/versions installed in the local Python library path. -* Deploy Quarto documents (using the `jupyter` and `markdown` engines only) -* Collaborate via git, or by downloading a source bundle from Connect -* Uses existing publishing accounts from `rsconnect` and `rsconnect-python` -* Pre-flight checking of settings before deploying to Connect -* Verification that deployed apps can successfully start +- Exclude files from deployment with `.positignore` files (like `.gitignore`) +- Python content: APIs, applications, and notebooks +- Automatic detection of client Python and Quarto version +- Automatic creation of a minimal requirements.txt file if needed, by scanning imports and mapping them to package names/versions installed in the local Python library path. +- Deploy Quarto documents (using the `jupyter` and `markdown` engines only) +- Collaborate via git, or by downloading a source bundle from Connect +- Uses existing publishing accounts from `rsconnect` and `rsconnect-python` +- Pre-flight checking of settings before deploying to Connect +- Verification that deployed apps can successfully start What's not supported yet but is on our to-do list: -* Deploy to servers other than Connect (shinyapps.io, Cloud, etc) -* Manage the list of accounts and provide an import function for existing +- Deploy to servers other than Connect (shinyapps.io, Cloud, etc) +- Manage the list of accounts and provide an import function for existing accounts -* R content such as Shiny, R Markdown, and Quarto (with the `knitr` engine) -* Automatic detection of R version and dependencies -* Show more information in the UI such as changes since last deployment -* Inject secrets as environment variables -* More metadata such as tags, thumbnail image, etc -* Configure permissions for sharing -* Option to export a `manifest.json` for compatibility with prior tool -* Schedule reports -* Streamlined `update deployment` command in VSCode command palette -* Support VSCode windows with multiple workspaces, or deploy from a +- R content such as Shiny, R Markdown, and Quarto (with the `knitr` engine) +- Automatic detection of R version and dependencies +- Show more information in the UI such as changes since last deployment +- Inject secrets as environment variables +- More metadata such as tags, thumbnail image, etc +- Configure permissions for sharing +- Option to export a `manifest.json` for compatibility with prior tool +- Schedule reports +- Streamlined `update deployment` command in VSCode command palette +- Support VSCode windows with multiple workspaces, or deploy from a subdirectory of the workspace -* Better error handling - +- Better error handling ## Installation + See the [Installation](installation.md) page. ## Getting Started + There are two ways to deploy content. -* [publisher cli](cli.md) -* [Posit Publisher extension in Positron + VSCode](vscode.md) + +- [publisher cli](cli.md) +- [Posit Publisher extension in Positron + VSCode](vscode.md) diff --git a/docs/installation.md b/docs/installation.md index 0a5aeb00c9..93de72ae03 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -47,16 +47,16 @@ The script explains what it does and then pauses before it does it. 1. Once downloaded, extract the archive file (e.g., unzip or untar). 1. Install the executable in a location available on your `PATH` (e.g., `/usr/local/bin`). - 1. To view locations on your PATH, invoke `/bin/bash -c "echo $PATH"` from - your terminal or shell prompt. - 1. In most cases, the correct installation location is `/usr/local/bin` on - macOS and Linux operating systems. - 1. Use the following command to install and set the correct permissions on - Linux or macOS: - 1. `sudo install -o root -g wheel -m 0755 ./bin/publisher /usr/local/bin`. - Replace `/usr/local/bin` with your preferred installation directory. - Otherwise, you may need to allow access manually after first invocation. - + 1. To view locations on your PATH, invoke `/bin/bash -c "echo $PATH"` from + your terminal or shell prompt. + 1. In most cases, the correct installation location is `/usr/local/bin` on + macOS and Linux operating systems. + 1. Use the following command to install and set the correct permissions on + Linux or macOS: + 1. `sudo install -o root -g wheel -m 0755 ./bin/publisher /usr/local/bin`. + Replace `/usr/local/bin` with your preferred installation directory. + Otherwise, you may need to allow access manually after first invocation. + ## Optional: Install Quarto If you plan on deploying Quarto content having Quarto installed will allow @@ -114,6 +114,7 @@ publisher The following operating systems are supported. ### macOS + - macOS 12 (Monterey) - macOS 13 (Ventura) - macOS 14 (Sonoma) diff --git a/docs/vscode.md b/docs/vscode.md index 0a8e8cf598..0c3b5b6082 100644 --- a/docs/vscode.md +++ b/docs/vscode.md @@ -4,9 +4,9 @@ ### Opening the UI -In VSCode, open the folder containing the project you want to deploy. In this version of *Posit Publisher*, the project must be in the top level directory. +In VSCode, open the folder containing the project you want to deploy. In this version of _Posit Publisher_, the project must be in the top level directory. -Open the *Posit Publisher* UI by clicking the icon in the activity bar. +Open the _Posit Publisher_ UI by clicking the icon in the activity bar. ![](https://cdn.posit.co/publisher/assets/img/icon.png) @@ -47,16 +47,16 @@ Once you have configuration and requirements files, you are ready to deploy. Cli ![](https://cdn.posit.co/publisher/assets/img/add-deployment.png) You'll be prompted for several pieces of information: -* A name for the deployment, which will appear in the Deployments view. -* A credential to use during deployment, if you have more than one credential defined. -* A Yes/No choice asking whether you want to deploy now, or wait until later. For now, click Yes. -* A choice of which configuration to use, if you answered Yes to deploy now and have more than one configuration defined. + +- A name for the deployment, which will appear in the Deployments view. +- A credential to use during deployment, if you have more than one credential defined. +- A Yes/No choice asking whether you want to deploy now, or wait until later. For now, click Yes. +- A choice of which configuration to use, if you answered Yes to deploy now and have more than one configuration defined. If you open the bottom panel in VSCode and click Posit Publisher Logs, you'll see the deployment logs: ![](https://cdn.posit.co/publisher/assets/img/deployment-logs.png) - Deployments appear in the Deployment view. The icon indicates whether the content has been successfully deployed. Not deployed yet: @@ -77,7 +77,7 @@ Clicking the deploy icon next to a deployment will deploy a new version of the c ### Credentials -In the current release, *Posit Publisher* acquires credentials from the RStudio IDE/rsconnect package and rsconnect-python. Additionally, if the environment variables `CONNECT_SERVER` and `CONNECT_API_KEY` are set, +In the current release, _Posit Publisher_ acquires credentials from the RStudio IDE/rsconnect package and rsconnect-python. Additionally, if the environment variables `CONNECT_SERVER` and `CONNECT_API_KEY` are set, an additional credential named `env` will be created. These are shown in the Credentials view. To add or remove account credentials, use rsconnect or [rsconnect-python](https://docs.posit.co/rsconnect-python/#remembering-server-information). @@ -87,8 +87,9 @@ These are shown in the Credentials view. To add or remove account credentials, u ### Files and Exclusions The Deployment Files view shows a list of the files in your project directory, divided into two lists: -* Included Files shows the files that will be included in your deployment and sent to the server as part of the uploaded content. You can exclude a file by clicking the icon to the right of the filename. -* Excluded Files shows the files in your project that will not be included in the deployment. The tooltip on an excluded file will indicate the reason it was excluded. + +- Included Files shows the files that will be included in your deployment and sent to the server as part of the uploaded content. You can exclude a file by clicking the icon to the right of the filename. +- Excluded Files shows the files in your project that will not be included in the deployment. The tooltip on an excluded file will indicate the reason it was excluded. Exclusions are managed through a `.positignore` file in the root directory of your project. It is in the same format as a [`.gitignore` file](https://git-scm.com/docs/gitignore); however, negated patterns are not yet supported. @@ -102,6 +103,6 @@ This view contains links to this documentation and other resources. ### `posit.publisher.executable.path` -By default, the extension uses the bundled Posit Publisher binary executable. To override this behavior, configure the `posit.publisher.executable.path` property in your *User* or *Workspace* settings. +By default, the extension uses the bundled Posit Publisher binary executable. To override this behavior, configure the `posit.publisher.executable.path` property in your _User_ or _Workspace_ settings. ![](https://cdn.posit.co/publisher/assets/img/settings.png) diff --git a/internal/schema/schemas/draft/posit-publishing-record-schema-v3.json b/internal/schema/schemas/draft/posit-publishing-record-schema-v3.json index fb8d647832..5494eb0194 100644 --- a/internal/schema/schemas/draft/posit-publishing-record-schema-v3.json +++ b/internal/schema/schemas/draft/posit-publishing-record-schema-v3.json @@ -4,12 +4,7 @@ "type": "object", "additionalProperties": false, "description": "Posit Publishing Record", - "required": [ - "$schema", - "server-url", - "id", - "configuration-name" - ], + "required": ["$schema", "server-url", "id", "configuration-name"], "properties": { "$schema": { "type": "string", @@ -26,26 +21,18 @@ "type": "string", "format": "uri", "description": "URL of the server where this content was deployed.", - "examples": [ - "https://connect.example.com" - ] + "examples": ["https://connect.example.com"] }, "server-type": { "type": "string", "description": "Type of server", - "enum": [ - "connect" - ], - "examples": [ - "connect" - ] + "enum": ["connect"], + "examples": ["connect"] }, "id": { "type": "string", "description": "Unique ID of this deployment.", - "examples": [ - "de2e7bdb-b085-401e-a65c-443e40009749" - ] + "examples": ["de2e7bdb-b085-401e-a65c-443e40009749"] }, "client-version": { "type": "string", @@ -55,31 +42,23 @@ "type": "string", "format": "date-time", "description": "Date and time the deployment was created.", - "examples": [ - "2024-01-19T09:33:33.131481-05:00" - ] + "examples": ["2024-01-19T09:33:33.131481-05:00"] }, "deployed-at": { "type": "string", "format": "date-time", "description": "Date and time of the last deployment to the server.", - "examples": [ - "2024-01-19T09:33:33.131481-05:00" - ] + "examples": ["2024-01-19T09:33:33.131481-05:00"] }, "configuration-name": { "type": "string", "description": "Name of the configuration that was used during deployment.", - "examples": [ - "production" - ] + "examples": ["production"] }, "bundle-id": { "type": "string", "description": "ID of the uploaded file bundle.", - "examples": [ - "123" - ] + "examples": ["123"] }, "bundle-url": { "type": "string", @@ -130,15 +109,10 @@ "files": { "type": "array", "items": { - "type": [ - "string" - ] + "type": ["string"] }, "description": "Project-relative paths of the files that were included in the deployment.", - "examples": [ - "app.py", - "model/weights.csv" - ] + "examples": ["app.py", "model/weights.csv"] } } } diff --git a/internal/schema/schemas/draft/posit-publishing-schema-v3.json b/internal/schema/schemas/draft/posit-publishing-schema-v3.json index 059883263c..f780e1a912 100644 --- a/internal/schema/schemas/draft/posit-publishing-schema-v3.json +++ b/internal/schema/schemas/draft/posit-publishing-schema-v3.json @@ -4,11 +4,7 @@ "type": "object", "additionalProperties": false, "description": "Posit Publishing Configuration", - "required": [ - "$schema", - "type", - "entrypoint" - ], + "required": ["$schema", "type", "entrypoint"], "properties": { "$schema": { "type": "string", @@ -41,40 +37,29 @@ "rmd-shiny", "rmd" ], - "examples": [ - "quarto" - ] + "examples": ["quarto"] }, "entrypoint": { "type": "string", "description": "Name of the primary file containing the content. For Python flask, dash, fastapi, and python-shiny projects, this specifies the object within the file in module:object format. See the documentation at https://docs.posit.co/connect/user/publishing-cli-apps/#publishing-rsconnect-python-entrypoint.", - "examples": [ - "app.py", - "report.qmd" - ] + "examples": ["app.py", "report.qmd"] }, "title": { "type": "string", "pattern": "^[^\t\n\f\r]{3,1000}$|", "description": "Title for this content. If specified, it must be a single line containing between 3 and 1000 characters.", - "examples": [ - "Quarterly Sales Report" - ] + "examples": ["Quarterly Sales Report"] }, "description": { "type": "string", "pattern": "^[^\t\f\r]*$", "description": "Description for this content. It may span multiple lines and be up to 4000 characters.", - "examples": [ - "This is the quarterly sales report, broken down by region." - ] + "examples": ["This is the quarterly sales report, broken down by region."] }, "thumbnail": { "type": "string", "description": "Path to thumbnail preview image for this content.", - "examples": [ - "images/thumbnail.jpg" - ] + "examples": ["images/thumbnail.jpg"] }, "validate": { "type": "boolean", @@ -86,51 +71,32 @@ "description": "List of tags to apply to this deployment. When publishing to Connect, tags must be pre-defined by an administrator.", "items": { "type": "string", - "examples": [ - "sales", - "quarterly", - "regional" - ] + "examples": ["sales", "quarterly", "regional"] } }, "python": { "type": "object", "additionalProperties": false, "description": "Python language and dependencies.", - "required": [ - "version" - ], + "required": ["version"], "properties": { "version": { "type": "string", "description": "Python version. The server must have a matching Python major/minor version in order to run the content.", - "examples": [ - "3.11.3", - "3.11" - ] + "examples": ["3.11.3", "3.11"] }, "package-file": { "type": "string", "description": "File containing package dependencies. The file must exist and be listed under 'files'. The default is 'requirements.txt'.", "default": "requirements.txt", - "examples": [ - "requirements.txt" - ] + "examples": ["requirements.txt"] }, "package-manager": { "type": "string", "default": "pip", - "enum": [ - "pip", - "conda", - "pipenv", - "poetry", - "none" - ], + "enum": ["pip", "conda", "pipenv", "poetry", "none"], "description": "Package manager that will install the dependencies. If package-manager is none, dependencies are assumed to be pre-installed on the server. The default is 'pip'.", - "examples": [ - "pip" - ] + "examples": ["pip"] } } }, @@ -138,36 +104,25 @@ "type": "object", "additionalProperties": false, "description": "R language and dependencies.", - "required": [ - "version" - ], + "required": ["version"], "properties": { "version": { "type": "string", "description": "R version. The server will use the nearest R version to run the content.", - "examples": [ - "4.3.1" - ] + "examples": ["4.3.1"] }, "package-file": { "type": "string", "default": "renv.lock", "description": "File containing package dependencies. The file must exist and be listed under 'files'.", - "examples": [ - "renv.lock" - ] + "examples": ["renv.lock"] }, "package-manager": { "type": "string", "default": "renv", - "enum": [ - "renv", - "none" - ], + "enum": ["renv", "none"], "description": "Package manager that will install the dependencies. If package-manager is none, dependencies will be assumed to be pre-installed on the server.", - "examples": [ - "renv" - ] + "examples": ["renv"] } } }, @@ -175,32 +130,20 @@ "type": "object", "additionalProperties": false, "description": "Quarto version required to run the content.", - "required": [ - "version" - ], + "required": ["version"], "properties": { "version": { "type": "string", "description": "Quarto version. The server must have a similar Quarto version in order to run the content.", - "examples": [ - "1.4" - ] + "examples": ["1.4"] }, "engines": { "type": "array", "description": "List of Quarto engines required for this content.", "items": { "type": "string", - "enum": [ - "knitr", - "jupyter", - "markdown" - ], - "examples": [ - "knitr", - "jupyter", - "markdown" - ] + "enum": ["knitr", "jupyter", "markdown"], + "examples": ["knitr", "jupyter", "markdown"] } } } @@ -208,9 +151,7 @@ "environment": { "type": "object", "additionalProperties": { - "type": [ - "string" - ] + "type": ["string"] }, "description": "Environment variable/value map. All values must be strings. Secrets such as API keys or tokens should not be stored here.", "examples": [ @@ -222,14 +163,10 @@ "secrets": { "type": "array", "items": { - "type": [ - "string" - ] + "type": ["string"] }, "description": "Names of secrets that should be injected as environment variables.", - "examples": [ - "API_KEY" - ] + "examples": ["API_KEY"] }, "schedules": { "type": "array", @@ -237,25 +174,17 @@ "items": { "type": "object", "additionalProperties": false, - "required": [ - "start", - "recurrence" - ], + "required": ["start", "recurrence"], "properties": { "start": { "type": "string", "description": "Time for the first run of the content.", - "examples": [ - "2023-10-25T08:00:00Z" - ] + "examples": ["2023-10-25T08:00:00Z"] }, "recurrence": { "type": "string", "description": "Recurrence scheme for the content, in cron or iCalendar RRULE format.", - "examples": [ - "FREQ=MONTHLY;INTERVAL=3", - "0 2 * * *" - ] + "examples": ["FREQ=MONTHLY;INTERVAL=3", "0 2 * * *"] } } } @@ -269,14 +198,8 @@ "type": "string", "default": "acl", "description": "Type of access control. 'public' make the deployment public (no login required), with no login required. 'all-users' allows all logged-in users to access the content. 'acl' (the default) allows only specific users and groups to access the content.", - "enum": [ - "public", - "all-users", - "acl" - ], - "examples": [ - "all-users" - ] + "enum": ["public", "all-users", "acl"], + "examples": ["all-users"] }, "users": { "type": "array", @@ -284,39 +207,28 @@ "items": { "type": "object", "additionalProperties": false, - "anyOf": [ - { "required": ["id"] }, - { "required": ["guid"] } - ], + "anyOf": [{ "required": ["id"] }, { "required": ["guid"] }], "properties": { "id": { "type": "string", "description": "Unique ID from the authentication provider that identifies this user. This may be a username, LDAP CN/DN, email address, etc. depending on the provider.", - "examples": [ - "jqpublic" - ] + "examples": ["jqpublic"] }, "guid": { "type": "string", "description": "Unique identifier assigned by Connect. When deploying to the same server, this will determine the user who is granted access. When deploying to a different server, the provider-id will be used to look up the user.", - "examples": [ - "cd2e7cef-a195-512e-b76d-554f4f5a239c" - ] + "examples": ["cd2e7cef-a195-512e-b76d-554f4f5a239c"] }, "name": { "type": "string", "description": "User's name. This field is informational only.", - "examples": [ - "John Q. Public" - ] + "examples": ["John Q. Public"] }, "permissions": { "type": "string", "description": "Permission level assigned to this user.", "enum": ["viewer", "editor", "owner"], - "examples": [ - "viewer" - ] + "examples": ["viewer"] } } } @@ -327,40 +239,29 @@ "items": { "type": "object", "additionalProperties": false, - "anyOf": [ - { "required": ["id"] }, - { "required": ["guid"] } - ], + "anyOf": [{ "required": ["id"] }, { "required": ["guid"] }], "properties": { "id": { "type": "string", "description": "Unique ID from the authentication provider that identifies this group. For groups created by Connect, this will be the group name. This may be a group name, LDAP CN/DN, etc. depending on the provider.", - "examples": [ - "Data Science Team" - ] + "examples": ["Data Science Team"] }, "guid": { "type": "string", "description": "Unique identifier assigned by Connect. When deploying to the same server, this will determine the user who is granted access. When deploying to a different server, the provider-id will be used to look up the user.", - "examples": [ - "8b4fde3e-f995-4894-bc02-ae47538262ff" - ] + "examples": ["8b4fde3e-f995-4894-bc02-ae47538262ff"] }, "name": { "type": "string", "description": "Group name. This field is informational only.", - "examples": [ - "Data Science Team" - ] + "examples": ["Data Science Team"] }, "permissions": { "type": "string", "default": "viewer", "description": "Permission level assigned to this group.", "enum": ["viewer", "editor", "owner"], - "examples": [ - "editor" - ] + "examples": ["editor"] } } } @@ -376,9 +277,7 @@ "run-as": { "type": "string", "description": "The system username under which the content should be run. Must be an existing user in the allowed group. You must be an administrator to set this value.", - "examples": [ - "rstudio-connect" - ] + "examples": ["rstudio-connect"] }, "run-as-current-user": { "type": "boolean", @@ -396,69 +295,53 @@ "minimum": 0, "maximum": 2592000, "description": "Maximum number of seconds allowed without data sent or received across a client connection. A value of `0` means connections will never time-out (not recommended).", - "examples": [ - 5 - ] + "examples": [5] }, "read-timeout": { "type": "integer", "minimum": 0, "maximum": 2592000, "description": "Maximum number of seconds allowed without data received from a client connection. A value of `0` means a lack of client (browser) interaction never causes the connection to close.", - "examples": [ - 30 - ] + "examples": [30] }, "init-timeout": { "type": "integer", "minimum": 0, "maximum": 2592000, "description": "The maximum number of seconds allowed for an interactive application to start. Posit Connect must be able to connect to a newly launched application before this threshold has elapsed.", - "examples": [ - 60 - ] + "examples": [60] }, "idle-timeout": { "type": "integer", "minimum": 0, "maximum": 2592000, "description": "The maximum number of seconds a worker process for an interactive application to remain alive after it goes idle (no active connections).", - "examples": [ - 120 - ] + "examples": [120] }, "max-processes": { "type": "integer", "minimum": 1, "description": "Specifies the total number of concurrent processes allowed for a single interactive application.", - "examples": [ - 5 - ] + "examples": [5] }, "min-processes": { "type": "integer", "minimum": 0, "description": "Specifies the minimum number of concurrent processes allowed for a single interactive application.", - "examples": [ - 1 - ] + "examples": [1] }, "max-connections": { "type": "integer", "minimum": 1, "description": "Specifies the maximum number of client connections allowed to an individual process. Incoming connections which will exceed this limit are routed to a new process or rejected.", - "examples": [ - 50 - ] + "examples": [50] }, "load-factor": { "type": "number", "minimum": 0, "maximum": 1, "description": "Controls how aggressively new processes are spawned. The valid range is between 0.0 and 1.0.", - "examples": [ - 0.5 - ] + "examples": [0.5] } } }, @@ -471,79 +354,59 @@ "type": "integer", "minimum": 0, "description": "The number of AMD GPUs that will be allocated by Kubernetes to run this content.", - "examples": [ - 0 - ] + "examples": [0] }, "cpu-limit": { "type": "number", "minimum": 0, "description": "The maximum amount of compute power this content will be allowed to consume when executing or rendering, expressed in CPU Units, where 1.0 unit is equivalent to 1 physical or virtual core. Fractional values are allowed. If the process tries to use more CPU than allowed, it will be throttled.", - "examples": [ - 1 - ] + "examples": [1] }, "cpu-request": { "type": "number", "minimum": 0, "description": "The minimum amount of compute power this content needs when executing virtual core. Fractional values are allowed.", - "examples": [ - 0.5 - ] + "examples": [0.5] }, "image-name": { "type": "string", "pattern": "^[^\t\n\b\f\r ]*$", "description": "Name of the target container image.", - "examples": [ - "posit/connect-runtime-python3.11-r4.3" - ] + "examples": ["posit/connect-runtime-python3.11-r4.3"] }, "memory-limit": { "type": "integer", "minimum": 0, "description": "The maximum amount of RAM this content will be allowed to consume when executing or rendering, expressed in bytes. If the process tries to use more memory than allowed, it will be terminated", - "examples": [ - "100000000" - ] + "examples": ["100000000"] }, "memory-request": { "type": "integer", "minimum": 0, "description": "The minimum amount of RAM this content needs when executing or rendering, expressed in bytes.", - "examples": [ - "20000000" - ] + "examples": ["20000000"] }, "nvidia-gpu-limit": { "type": "integer", "minimum": 0, "description": "The number of NVIDIA GPUs that will be allocated by Kubernetes to run this content.", - "examples": [ - 0 - ] + "examples": [0] }, "service-account-name": { "type": "string", "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", "description": "The name of the Kubernetes service account that is used to run this content. It must adhere to Kubernetes service account naming rules. You must be an administrator to set this value.", - "examples": [ - "posit-connect-content" - ] + "examples": ["posit-connect-content"] }, "r-environment-management": { "type": "boolean", "description": "Enables or disables R environment management. When false, Posit Connect will not install R packages and instead assume that all required packages are present in the container image.", - "examples": [ - true - ] + "examples": [true] }, "py-environment-management": { "type": "boolean", "description": "Enables or disables Python environment management. When false, Posit Connect will not install Python packages and instead assume that all required packages are present in the container image.", - "examples": [ - true - ] + "examples": [true] } } } @@ -567,56 +430,36 @@ ] } }, - "required": [ - "type" - ] + "required": ["type"] }, "then": { - "required": [ - "python" - ] + "required": ["python"] } }, { "if": { "properties": { "type": { - "enum": [ - "r-plumber", - "r-shiny", - "rmd-shiny", - "rmd" - ] + "enum": ["r-plumber", "r-shiny", "rmd-shiny", "rmd"] } }, - "required": [ - "type" - ] + "required": ["type"] }, "then": { - "required": [ - "r" - ] + "required": ["r"] } }, { "if": { "properties": { "type": { - "enum": [ - "quarto-shiny", - "quarto" - ] + "enum": ["quarto-shiny", "quarto"] } }, - "required": [ - "type" - ] + "required": ["type"] }, "then": { - "required": [ - "quarto" - ] + "required": ["quarto"] } } ] diff --git a/internal/schema/schemas/posit-publishing-record-schema-v3.json b/internal/schema/schemas/posit-publishing-record-schema-v3.json index 3fcd4717bc..e56b697932 100644 --- a/internal/schema/schemas/posit-publishing-record-schema-v3.json +++ b/internal/schema/schemas/posit-publishing-record-schema-v3.json @@ -4,10 +4,7 @@ "type": "object", "additionalProperties": false, "description": "Posit Publishing Record", - "required": [ - "$schema", - "server-url" - ], + "required": ["$schema", "server-url"], "properties": { "$schema": { "type": "string", @@ -24,26 +21,18 @@ "type": "string", "format": "uri", "description": "URL of the server where this content was deployed.", - "examples": [ - "https://connect.example.com" - ] + "examples": ["https://connect.example.com"] }, "server-type": { "type": "string", "description": "Type of server", - "enum": [ - "connect" - ], - "examples": [ - "connect" - ] + "enum": ["connect"], + "examples": ["connect"] }, "id": { "type": "string", "description": "Unique ID of this deployment.", - "examples": [ - "de2e7bdb-b085-401e-a65c-443e40009749" - ] + "examples": ["de2e7bdb-b085-401e-a65c-443e40009749"] }, "client-version": { "type": "string", @@ -53,31 +42,23 @@ "type": "string", "format": "date-time", "description": "Date and time the deployment was created.", - "examples": [ - "2024-01-19T09:33:33.131481-05:00" - ] + "examples": ["2024-01-19T09:33:33.131481-05:00"] }, "deployed-at": { "type": "string", "format": "date-time", "description": "Date and time of the last deployment to the server.", - "examples": [ - "2024-01-19T09:33:33.131481-05:00" - ] + "examples": ["2024-01-19T09:33:33.131481-05:00"] }, "configuration-name": { "type": "string", "description": "Name of the configuration that was used during deployment.", - "examples": [ - "production" - ] + "examples": ["production"] }, "bundle-id": { "type": "string", "description": "ID of the uploaded file bundle.", - "examples": [ - "123" - ] + "examples": ["123"] }, "bundle-url": { "type": "string", @@ -132,15 +113,10 @@ "files": { "type": "array", "items": { - "type": [ - "string" - ] + "type": ["string"] }, "description": "Project-relative paths of the files that were included in the deployment.", - "examples": [ - "app.py", - "model/weights.csv" - ] + "examples": ["app.py", "model/weights.csv"] } } } diff --git a/internal/schema/schemas/posit-publishing-schema-v3.json b/internal/schema/schemas/posit-publishing-schema-v3.json index e03fd4b4bc..b3db2be596 100644 --- a/internal/schema/schemas/posit-publishing-schema-v3.json +++ b/internal/schema/schemas/posit-publishing-schema-v3.json @@ -4,11 +4,7 @@ "type": "object", "additionalProperties": false, "description": "Posit Publishing Configuration", - "required": [ - "$schema", - "type", - "entrypoint" - ], + "required": ["$schema", "type", "entrypoint"], "properties": { "$schema": { "type": "string", @@ -41,33 +37,24 @@ "rmd-shiny", "rmd" ], - "examples": [ - "quarto" - ] + "examples": ["quarto"] }, "entrypoint": { "type": "string", "description": "Name of the primary file containing the content. For Python flask, dash, fastapi, and python-shiny projects, this specifies the object within the file in module:object format. See the documentation at https://docs.posit.co/connect/user/publishing-cli-apps/#publishing-rsconnect-python-entrypoint.", - "examples": [ - "app.py", - "report.qmd" - ] + "examples": ["app.py", "report.qmd"] }, "title": { "type": "string", "pattern": "^[^\t\n\f\r]{3,1000}$|", "description": "Title for this content. If specified, it must be a single line containing between 3 and 1000 characters.", - "examples": [ - "Quarterly Sales Report" - ] + "examples": ["Quarterly Sales Report"] }, "description": { "type": "string", "pattern": "^[^\t\f\r]*$", "description": "Description for this content. It may span multiple lines and be up to 4000 characters.", - "examples": [ - "This is the quarterly sales report, broken down by region." - ] + "examples": ["This is the quarterly sales report, broken down by region."] }, "validate": { "type": "boolean", @@ -78,37 +65,25 @@ "type": "object", "additionalProperties": false, "description": "Python language and dependencies.", - "required": [ - "version" - ], + "required": ["version"], "properties": { "version": { "type": "string", "description": "Python version. The server must have a matching Python major/minor version in order to run the content.", - "examples": [ - "3.11.3", - "3.11" - ] + "examples": ["3.11.3", "3.11"] }, "package-file": { "type": "string", "description": "File containing package dependencies. The file must exist and be listed under 'files'. The default is 'requirements.txt'.", "default": "requirements.txt", - "examples": [ - "requirements.txt" - ] + "examples": ["requirements.txt"] }, "package-manager": { "type": "string", "default": "pip", - "enum": [ - "pip", - "none" - ], + "enum": ["pip", "none"], "description": "Package manager that will install the dependencies. If package-manager is none, dependencies will not be installed.", - "examples": [ - "pip" - ] + "examples": ["pip"] } } }, @@ -116,36 +91,25 @@ "type": "object", "additionalProperties": false, "description": "R language and dependencies.", - "required": [ - "version" - ], + "required": ["version"], "properties": { "version": { "type": "string", "description": "R version. The server will use the nearest R version to run the content.", - "examples": [ - "4.3.1" - ] + "examples": ["4.3.1"] }, "package-file": { "type": "string", "default": "renv.lock", "description": "File containing package dependencies. The file must exist and be listed under 'files'.", - "examples": [ - "renv.lock" - ] + "examples": ["renv.lock"] }, "package-manager": { "type": "string", "default": "renv", - "enum": [ - "renv", - "none" - ], + "enum": ["renv", "none"], "description": "Package manager that will install the dependencies. If package-manager is none, dependencies will be assumed to be pre-installed on the server.", - "examples": [ - "renv" - ] + "examples": ["renv"] } } }, @@ -153,32 +117,20 @@ "type": "object", "additionalProperties": false, "description": "Quarto version required to run the content.", - "required": [ - "version" - ], + "required": ["version"], "properties": { "version": { "type": "string", "description": "Quarto version. The server must have a similar Quarto version in order to run the content.", - "examples": [ - "1.4" - ] + "examples": ["1.4"] }, "engines": { "type": "array", "description": "List of Quarto engines required for this content.", "items": { "type": "string", - "enum": [ - "knitr", - "jupyter", - "markdown" - ], - "examples": [ - "knitr", - "jupyter", - "markdown" - ] + "enum": ["knitr", "jupyter", "markdown"], + "examples": ["knitr", "jupyter", "markdown"] } } } @@ -186,9 +138,7 @@ "environment": { "type": "object", "additionalProperties": { - "type": [ - "string" - ] + "type": ["string"] }, "description": "Environment variable/value map. All values must be strings. Secrets such as API keys or tokens should not be stored here.", "examples": [ @@ -206,9 +156,7 @@ "run-as": { "type": "string", "description": "The system username under which the content should be run. Must be an existing user in the allowed group. You must be an administrator to set this value.", - "examples": [ - "rstudio-connect" - ] + "examples": ["rstudio-connect"] }, "run-as-current-user": { "type": "boolean", @@ -226,69 +174,53 @@ "minimum": 0, "maximum": 2592000, "description": "Maximum number of seconds allowed without data sent or received across a client connection. A value of `0` means connections will never time-out (not recommended).", - "examples": [ - 5 - ] + "examples": [5] }, "read-timeout": { "type": "integer", "minimum": 0, "maximum": 2592000, "description": "Maximum number of seconds allowed without data received from a client connection. A value of `0` means a lack of client (browser) interaction never causes the connection to close.", - "examples": [ - 30 - ] + "examples": [30] }, "init-timeout": { "type": "integer", "minimum": 0, "maximum": 2592000, "description": "The maximum number of seconds allowed for an interactive application to start. Posit Connect must be able to connect to a newly launched application before this threshold has elapsed.", - "examples": [ - 60 - ] + "examples": [60] }, "idle-timeout": { "type": "integer", "minimum": 0, "maximum": 2592000, "description": "The maximum number of seconds a worker process for an interactive application to remain alive after it goes idle (no active connections).", - "examples": [ - 120 - ] + "examples": [120] }, "max-processes": { "type": "integer", "minimum": 1, "description": "Specifies the total number of concurrent processes allowed for a single interactive application.", - "examples": [ - 5 - ] + "examples": [5] }, "min-processes": { "type": "integer", "minimum": 0, "description": "Specifies the minimum number of concurrent processes allowed for a single interactive application.", - "examples": [ - 1 - ] + "examples": [1] }, "max-connections": { "type": "integer", "minimum": 1, "description": "Specifies the maximum number of client connections allowed to an individual process. Incoming connections which will exceed this limit are routed to a new process or rejected.", - "examples": [ - 50 - ] + "examples": [50] }, "load-factor": { "type": "number", "minimum": 0, "maximum": 1, "description": "Controls how aggressively new processes are spawned. The valid range is between 0.0 and 1.0.", - "examples": [ - 0.5 - ] + "examples": [0.5] } } }, @@ -301,79 +233,59 @@ "type": "integer", "minimum": 0, "description": "The number of AMD GPUs that will be allocated by Kubernetes to run this content.", - "examples": [ - 0 - ] + "examples": [0] }, "cpu-limit": { "type": "number", "minimum": 0, "description": "The maximum amount of compute power this content will be allowed to consume when executing or rendering, expressed in CPU Units, where 1.0 unit is equivalent to 1 physical or virtual core. Fractional values are allowed. If the process tries to use more CPU than allowed, it will be throttled.", - "examples": [ - 1 - ] + "examples": [1] }, "cpu-request": { "type": "number", "minimum": 0, "description": "The minimum amount of compute power this content needs when executing virtual core. Fractional values are allowed.", - "examples": [ - 0.5 - ] + "examples": [0.5] }, "image-name": { "type": "string", "pattern": "^[^\t\n\b\f\r ]*$", "description": "Name of the target container image.", - "examples": [ - "posit/connect-runtime-python3.11-r4.3" - ] + "examples": ["posit/connect-runtime-python3.11-r4.3"] }, "memory-limit": { "type": "integer", "minimum": 0, "description": "The maximum amount of RAM this content will be allowed to consume when executing or rendering, expressed in bytes. If the process tries to use more memory than allowed, it will be terminated", - "examples": [ - "100000000" - ] + "examples": ["100000000"] }, "memory-request": { "type": "integer", "minimum": 0, "description": "The minimum amount of RAM this content needs when executing or rendering, expressed in bytes.", - "examples": [ - "20000000" - ] + "examples": ["20000000"] }, "nvidia-gpu-limit": { "type": "integer", "minimum": 0, "description": "The number of NVIDIA GPUs that will be allocated by Kubernetes to run this content.", - "examples": [ - 0 - ] + "examples": [0] }, "service-account-name": { "type": "string", "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", "description": "The name of the Kubernetes service account that is used to run this content. It must adhere to Kubernetes service account naming rules. You must be an administrator to set this value.", - "examples": [ - "posit-connect-content" - ] + "examples": ["posit-connect-content"] }, "r-environment-management": { "type": "boolean", "description": "Enables or disables R environment management. When false, Posit Connect will not install R packages and instead assume that all required packages are present in the container image.", - "examples": [ - true - ] + "examples": [true] }, "py-environment-management": { "type": "boolean", "description": "Enables or disables Python environment management. When false, Posit Connect will not install Python packages and instead assume that all required packages are present in the container image.", - "examples": [ - true - ] + "examples": [true] } } } @@ -397,56 +309,36 @@ ] } }, - "required": [ - "type" - ] + "required": ["type"] }, "then": { - "required": [ - "python" - ] + "required": ["python"] } }, { "if": { "properties": { "type": { - "enum": [ - "r-plumber", - "r-shiny", - "rmd-shiny", - "rmd" - ] + "enum": ["r-plumber", "r-shiny", "rmd-shiny", "rmd"] } }, - "required": [ - "type" - ] + "required": ["type"] }, "then": { - "required": [ - "r" - ] + "required": ["r"] } }, { "if": { "properties": { "type": { - "enum": [ - "quarto-shiny", - "quarto" - ] + "enum": ["quarto-shiny", "quarto"] } }, - "required": [ - "type" - ] + "required": ["type"] }, "then": { - "required": [ - "quarto" - ] + "required": ["quarto"] } } ] diff --git a/test/bats/package.json b/test/bats/package.json index cdd6badb28..b9397406f6 100644 --- a/test/bats/package.json +++ b/test/bats/package.json @@ -4,7 +4,7 @@ "deploy": "bats -r -T -t ./contract/deploy.bats", "accounts": "bats -r -T -t ./contract/accounts.bats", "common": "bats -r -T -t ./cli/common.bats", - "init":"bats -r -T -t ./cli/init.bats" + "init": "bats -r -T -t ./cli/init.bats" }, "devDependencies": { "bats": "^1.10.0", diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 900eee70e4..90e04671e0 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -1,7 +1,6 @@ -version: '3.2' +version: "3.2" services: - rsconnect: image: rstudio/rstudio-connect-preview:dev-jammy-daily restart: always diff --git a/test/sample-content/fastapi-simple/meta.yaml b/test/sample-content/fastapi-simple/meta.yaml index d421eb4af8..8e4c79d913 100644 --- a/test/sample-content/fastapi-simple/meta.yaml +++ b/test/sample-content/fastapi-simple/meta.yaml @@ -1,7 +1,7 @@ tags: -- api -- fastapi -- python -- dev-env -- small-dev-env -- all + - api + - fastapi + - python + - dev-env + - small-dev-env + - all diff --git a/test/sample-content/multi-type/meta.yaml b/test/sample-content/multi-type/meta.yaml index 7020a54de1..341a4039d0 100644 --- a/test/sample-content/multi-type/meta.yaml +++ b/test/sample-content/multi-type/meta.yaml @@ -1,4 +1,4 @@ description: A simple Quarto project. tags: -- quarto -- dev-env + - quarto + - dev-env diff --git a/test/sample-content/quarto-proj-none/meta.yaml b/test/sample-content/quarto-proj-none/meta.yaml index 7020a54de1..341a4039d0 100644 --- a/test/sample-content/quarto-proj-none/meta.yaml +++ b/test/sample-content/quarto-proj-none/meta.yaml @@ -1,4 +1,4 @@ description: A simple Quarto project. tags: -- quarto -- dev-env + - quarto + - dev-env diff --git a/test/sample-content/quarto-proj-py/README.md b/test/sample-content/quarto-proj-py/README.md index 7c6e0a04e1..d8a5974027 100644 --- a/test/sample-content/quarto-proj-py/README.md +++ b/test/sample-content/quarto-proj-py/README.md @@ -6,8 +6,8 @@ A minimal Quarto project with a Python code block and the Jupyter runtime. - The RStudio IDE project and Quarto project were created using the IDE. This is the default project with Python/Jupyter. - The `manifest.json` was pulled from the source bundle after using push-button deployment in the IDE. - - It was manually edited to remove `.Rprofile` and `packrat.lock`, which are (at time of writing, 2022-02-09) automatically added by the IDE. - - Also removed the R `packages` object from the manifest. By default, in the IDE, Python-only Quarto projects use `reticulate`, but this isn't necessary. + - It was manually edited to remove `.Rprofile` and `packrat.lock`, which are (at time of writing, 2022-02-09) automatically added by the IDE. + - Also removed the R `packages` object from the manifest. By default, in the IDE, Python-only Quarto projects use `reticulate`, but this isn't necessary. - Uses Python 3.8.12. ## Notes diff --git a/test/sample-content/quarto-proj-py/_quarto.yml b/test/sample-content/quarto-proj-py/_quarto.yml index 16f71b80fa..d610f65330 100644 --- a/test/sample-content/quarto-proj-py/_quarto.yml +++ b/test/sample-content/quarto-proj-py/_quarto.yml @@ -2,4 +2,3 @@ project: title: "the-title-is-quarto-proj-py" editor: visual - diff --git a/test/sample-content/quarto-proj-py/meta.yaml b/test/sample-content/quarto-proj-py/meta.yaml index d07b077f5c..2500cc773e 100644 --- a/test/sample-content/quarto-proj-py/meta.yaml +++ b/test/sample-content/quarto-proj-py/meta.yaml @@ -1,4 +1,4 @@ description: A simple Quarto project. tags: -- quarto -- python + - quarto + - python diff --git a/test/sample-content/quarto-project/_quarto.yml b/test/sample-content/quarto-project/_quarto.yml index f3cda0baf6..8ea2bc6244 100644 --- a/test/sample-content/quarto-project/_quarto.yml +++ b/test/sample-content/quarto-project/_quarto.yml @@ -1,5 +1,2 @@ project: title: "quarto-project" - - -