Skip to content

Commit

Permalink
Merge branch 'main' into drop_fn_session_param
Browse files Browse the repository at this point in the history
* main: (185 commits)
  Resolve path to file when running Shiny Express apps (#1442)
  Fix changelog formatting
  test(conftest): Refactor conftest and controls to be imported as shiny.test module (#1413)
  `make install` shouldn't assume it has `setuptools` (#1437)
  test(browsers): Unskip webkit tests (#1431)
  chore: update shiny-vscode extension ID (#1434)
  Add setuptools as an install requirement in Python 3.12 and above (#1435)
  Bump version to 0.10.2.9000
  v0.10.2 release candidate
  Use `output_code()` and `render.code()` (#1421)
  Fix: spinners only show for a split second (#1429)
  Bump version to 0.10.1.9000
  Bump version to 0.10.1
  Update CHANGELOG.md (#1419)
  Update cpu info example
  bug(CI): Only update the shiny submodule when making the dev docs (#1417)
  Update shiny CSS (#1415)
  Bump version to 0.10.0.9000 for development
  Bump version to 0.10.0
  Update shiny JS/CSS assets (#1406)
  ...
  • Loading branch information
schloerke committed Jun 3, 2024
2 parents e5e7525 + bd685bb commit a3f4605
Show file tree
Hide file tree
Showing 482 changed files with 26,719 additions and 14,828 deletions.
30 changes: 30 additions & 0 deletions .github/py-shiny/pytest-browsers/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Custom merge queue browsers'
description: 'Trim down pytest browsers for any github event other than merge_group.'
inputs:
all-browsers:
description: 'Force all pytest browsers to used when testing'
required: false
default: 'false'
outputs:
browsers:
description: 'pytest browsers to use'
value: ${{ steps.browsers.outputs.browsers }}
runs:
using: "composite"
steps:
- name: Determine browsers to use
shell: bash
id: browsers
run: |
if [ "${{ inputs.all-browsers }}" == "true" ]; then
echo "Using all browsers!"
exit 0
fi
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "Using chrome browser only!"
echo 'browsers=PYTEST_BROWSERS="--browser chromium"' >> "$GITHUB_OUTPUT"
fi
echo "No custom pytest browsers!"
exit 0
3 changes: 1 addition & 2 deletions .github/py-shiny/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
python-version:
description: 'Python version to use'
required: false
default: "3.11"
default: "3.12"
runs:
using: "composite"
steps:
Expand All @@ -25,7 +25,6 @@ runs:
shell: bash
run: |
pip install https://github.com/rstudio/py-htmltools/tarball/main
pip install https://github.com/posit-dev/py-shinylive/tarball/main
make install-deps
- name: Install
Expand Down
69 changes: 57 additions & 12 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
@@ -1,67 +1,112 @@
name: Build API docs
name: Build API docs and Shinylive for GitHub Pages

on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
merge_group:

jobs:
build:
build-docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.12"]
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Upgrade pip
run: python -m pip install --upgrade pip

# =====================================================
# API docs
# =====================================================
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.3.340
version: 1.4.549

- name: Install dependencies
run: |
cd docs
make ../venv
. ../venv/bin/activate && pip install https://github.com/posit-dev/py-htmltools/tarball/main https://github.com/posit-dev/py-shinylive/tarball/main
make deps
- name: Run quartodoc
run: |
cd docs
make quartodoc
# =====================================================
# Shinylive
# =====================================================
- name: Check out shinylive
if: github.ref == 'refs/heads/main'
uses: actions/checkout@v4
with:
repository: rstudio/shinylive
ref: main
path: shinylive-repo

- name: Update shinylive's copy of shiny and htmltools
if: github.ref == 'refs/heads/main'
run: |
cd shinylive-repo
make submodules
make submodules-pull-shiny
make submodules-pull-htmltools
- name: Build shinylive
if: github.ref == 'refs/heads/main'
run: |
cd shinylive-repo
make all
# TODO-future; Install updated shinylive assets via updated py-shinylive pkg

# =====================================================
# Build site
# =====================================================

- name: Build site
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'merge_group' || startsWith(github.head_ref, 'docs') }}
run: |
cd docs
make site
# =====================================================
# Deploy
# =====================================================

- name: Move built API docs and shinylive to single directory
if: github.ref == 'refs/heads/main'
run: |
mkdir deploy
mv docs/_site deploy/docs
mv shinylive-repo/_shinylive deploy/shinylive
- name: Upload site artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v1
with:
path: "docs/_site"

path: "deploy"

deploy:
if: github.ref == 'refs/heads/main'
needs: build
needs: build-docs

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
Expand Down
Loading

0 comments on commit a3f4605

Please sign in to comment.