Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosnav committed Jan 31, 2025
2 parents bdaed27 + daa05a3 commit 9558fc3
Show file tree
Hide file tree
Showing 76 changed files with 3,687 additions and 2,209 deletions.
51 changes: 0 additions & 51 deletions .github/workflows/bats.yaml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/workflows/contract.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,73 +31,6 @@ jobs:
CONNECT_SERVER=$(python test/setup/get_ip.py)
echo "CONNECT_SERVER=$CONNECT_SERVER" >> $GITHUB_OUTPUT
bats-tests:
needs: get-connect-ip
if: ${{ github.event_name == 'schedule' || github.event.inputs.job == 'all' || github.event.inputs.job == 'bats-tests' }}
env:
FUZZBUCKET_SSH_KEY: ${{ secrets.FUZZBUCKET_SSH_KEY }}
FUZZBUCKET_URL: ${{ secrets.FUZZBUCKET_URL }}
FUZZBUCKET_CREDENTIALS: ${{ secrets.FUZZBUCKET_CREDENTIALS }}
CI: true
CONNECT_SERVER: ${{ needs.get-connect-ip.outputs.connect_ip }}
strategy:
fail-fast: false
matrix:
runs-on: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- name: python
uses: actions/setup-python@v5
with:
# use python 3.12 for bats
# there are some requirements that are not yet compatible with python 3.13
python-version: 3.12
- name: R
uses: r-lib/actions/setup-r@v2
with:
r-version: 4.3.0
- name: quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.4.549

- uses: actions/download-artifact@v4
with:
name: bin
path: bin
- uses: actions/checkout@v4
with:
repository: rstudio/connect-content
path: "test/content"
sparse-checkout: bundles
sparse-checkout-cone-mode: false
token: ${{ secrets.CONNECT_PAT }}

- name: Install deps on ubuntu
run: |
sudo apt-get install libcurl4-openssl-dev libsodium-dev libfontconfig1-dev libfribidi-dev libfontconfig1-dev libpng-dev
R -e "install.packages('renv', repos='https://packagemanager.posit.co/cran/latest')"
if: matrix.runs-on == 'ubuntu-latest'
- name: Install deps on windows
run: |
R.exe -e "install.packages('renv', repos='https://packagemanager.posit.co/cran/latest')"
if: matrix.runs-on == 'windows-latest'
- name: Install deps on macos
run: |
R -e "install.packages('renv', repos='https://packagemanager.posit.co/cran/latest')"
if: matrix.runs-on == 'macos-latest'
- name: Run Bats Tests
run: |
chmod -R +x ./bin
just bats install
just bats test common
just bats test init
just bats test deploy
vscode-ui-tests:
needs: get-connect-ip
if: ${{ github.event_name == 'schedule' || github.event.inputs.job == 'all' || github.event.inputs.job == 'vscode-ui-tests' }}
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,3 @@ jobs:
- package
uses: ./.github/workflows/upload.yaml
secrets: inherit

# Integration Tests
bats:
needs: build
secrets: inherit
uses: ./.github/workflows/bats.yaml
1 change: 0 additions & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
type: choice
options:
- all
- bats-tests
- vscode-ui-tests
jobs:
agent:
Expand Down
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,50 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.10.0]

### Added

- Added a new [Troubleshooting document](https://github.com/posit-dev/publisher/blob/main/docs/troubleshooting.md)
and a link to it in error notifications that occur during deployment. (#2562)
- Added a new [Collaboration document](https://github.com/posit-dev/publisher/blob/main/docs/collaboration.md)
describing how to collaborate on projects using the Posit Publisher. (#2383)
- Added support for deploying Gradio content to Posit Connect. (#2476, #2477)
- Inspection for Gradio entrypoint files was added to correctly determine when
it is Gradio content and setting `type = 'python-gradio'` in the generated
configuration file. (#2475)
- When deploying R content without a `lockfile` the extension now prompts the
user to install and setup `renv` then creates a `renv.lock` depending on what
is needed in their environment. (#2560)
- The Python interpreter used is now consistent across the extension and
uses the selected Python intrepter in Positron or the
[VS Code Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
defaulting to the Python on PATH when none is selected. (#2494, #2496)
- A warning has been added to the sidebar when the selected deployment has a
configuration with `type = 'unknown'` suggesting the framework be set. (#2515)
- Icons have been added to the deployment select dropdown to indicate the
deployment's server and entrypoint. (#2483)

### Fixed

- Deployment dismissal has been greatly improved. Deployments are no longer
updated as the deploy continues on Posit Connect. They instead will be set to
the dismissed state, avoiding changes after dismissal. (#2179, #2498)
- Fixed an issue where the "View Content" button could appear when a deployment
failed prior to any content being created on Posit Connect. (#2373)

### Changed

- The Python and R package files can no longer be un-checked in the Project
Files view to avoid unintended removal from the `files` attribute in the
configuration. (#2555)
- The sidebar design was unified to have similar different vertical placement in
various deployment states. (#2531)
- Warnings in the sidebar have a new look to optimize horizontal space, utilize
theme colors, and emphasize links. (#2526, #2527)
- The error when the extension could not validate credentials has been improved
to indicate that connectivity to the server could also be a problem. (#2450)

## [1.8.0]

### Added
Expand Down
8 changes: 0 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@ just cover

Once complete, a coverage report will open in your default browser.

### Integration Tests

The [Bats](https://bats-core.readthedocs.io/en/stable/) framework is used to perform integration tests. For this project we use Bats to assert integrations with native machines via the Bash shell.

```
just bats
```

## Development

### Build Tools
Expand Down
3 changes: 2 additions & 1 deletion cmd/publisher/commands/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ func (cmd *DeployCmd) Run(args *cli_types.CommonArgs, ctx *cli_types.CLIContext)
stateStore.SaveName)

rExecutable := util.Path{}
publisher, err := publish.NewFromState(stateStore, rExecutable, events.NewCliEmitter(os.Stderr, ctx.Logger), ctx.Logger)
pythonExecutable := util.Path{}
publisher, err := publish.NewFromState(stateStore, rExecutable, pythonExecutable, events.NewCliEmitter(os.Stderr, ctx.Logger), ctx.Logger)
if err != nil {
return err
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/publisher/commands/redeploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ func (cmd *RedeployCmd) Run(args *cli_types.CommonArgs, ctx *cli_types.CLIContex
stateStore.ConfigName)

rExecutable := util.Path{}
publisher, err := publish.NewFromState(stateStore, rExecutable, events.NewCliEmitter(os.Stderr, ctx.Logger), ctx.Logger)
pythonExecutable := util.Path{}
publisher, err := publish.NewFromState(stateStore, rExecutable, pythonExecutable, events.NewCliEmitter(os.Stderr, ctx.Logger), ctx.Logger)
if err != nil {
return err
}
Expand Down
5 changes: 3 additions & 2 deletions cmd/publisher/commands/requirements_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/posit-dev/publisher/internal/cli_types"
"github.com/posit-dev/publisher/internal/inspect"
"github.com/posit-dev/publisher/internal/inspect/dependencies/pydeps"
"github.com/posit-dev/publisher/internal/util"
)

Expand All @@ -34,12 +35,12 @@ func (cmd *CreateRequirementsCommand) Run(args *cli_types.CommonArgs, ctx *cli_t
if exists && !cmd.Force {
return errRequirementsFileExists
}
inspector := inspect.NewPythonInspector(absPath, cmd.Python, ctx.Logger)
inspector, _ := inspect.NewPythonInspector(absPath, cmd.Python, ctx.Logger, nil, nil)
reqs, incomplete, pythonExecutable, err := inspector.ScanRequirements(absPath)
if err != nil {
return err
}
err = inspector.WriteRequirementsFile(reqPath, reqs)
err = pydeps.WriteRequirementsFile(reqPath, reqs, util.NewAbsolutePath("bogus python executable", nil))
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/publisher/commands/requirements_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (cmd *ShowRequirementsCommand) Run(args *cli_types.CommonArgs, ctx *cli_typ
if err != nil {
return err
}
inspector := inspect.NewPythonInspector(absPath, cmd.Python, ctx.Logger)
inspector, _ := inspect.NewPythonInspector(absPath, cmd.Python, ctx.Logger, nil, nil)
reqs, incomplete, pythonExecutable, err := inspector.ScanRequirements(absPath)
if err != nil {
return err
Expand Down
10 changes: 5 additions & 5 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Install.

Download and install the VS Code extension.

- For Arm MacOS: [publisher-1.8.0-darwin-arm64.vsix](https://cdn.posit.co/publisher/releases/tags/v1.8.0/publisher-1.8.0-darwin-arm64.vsix)
- For Intel MacOS: [publisher-1.8.0-darwin-amd64.vsix](https://cdn.posit.co/publisher/releases/tags/v1.8.0/publisher-1.8.0-darwin-amd64.vsix)
- For Windows: [publisher-1.8.0-windows-amd64.vsix](https://cdn.posit.co/publisher/releases/tags/v1.8.0/publisher-1.8.0-windows-amd64.vsix)
- For Arm Linux: [publisher-1.8.0-linux-arm64.vsix](https://cdn.posit.co/publisher/releases/tags/v1.8.0/publisher-1.8.0-linux-arm64.vsix)
- For Intel Linux: [publisher-1.8.0-linux-amd64.vsix](https://cdn.posit.co/publisher/releases/tags/v1.8.0/publisher-1.8.0-linux-amd64.vsix)
- For Arm MacOS: [publisher-1.10.0-darwin-arm64.vsix](https://cdn.posit.co/publisher/releases/tags/v1.10.0/publisher-1.10.0-darwin-arm64.vsix)
- For Intel MacOS: [publisher-1.10.0-darwin-amd64.vsix](https://cdn.posit.co/publisher/releases/tags/v1.10.0/publisher-1.10.0-darwin-amd64.vsix)
- For Windows: [publisher-1.10.0-windows-amd64.vsix](https://cdn.posit.co/publisher/releases/tags/v1.10.0/publisher-1.10.0-windows-amd64.vsix)
- For Arm Linux: [publisher-1.10.0-linux-arm64.vsix](https://cdn.posit.co/publisher/releases/tags/v1.10.0/publisher-1.10.0-linux-arm64.vsix)
- For Intel Linux: [publisher-1.10.0-linux-amd64.vsix](https://cdn.posit.co/publisher/releases/tags/v1.10.0/publisher-1.10.0-linux-amd64.vsix)

To learn how to install a `.vsix` file, see the [Install from a
VSIX](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix)
Expand Down
Loading

0 comments on commit 9558fc3

Please sign in to comment.