diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index c1a819029..6089aca07 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -7,6 +7,8 @@ on: pull_request: release: types: [published] + schedule: + - cron: "0 8 * * *" jobs: build: @@ -66,7 +68,7 @@ jobs: run: | make e2e - examples: + e2e-examples: runs-on: ${{ matrix.os }} if: github.event_name != 'release' strategy: @@ -97,7 +99,35 @@ jobs: run: | make e2e-examples - deploy: + e2e-deploys: + # Only allow one `e2e-deploys` job to run at a time. (Independent of branch / PR) + concurrency: e2e-deploys + runs-on: ${{ matrix.os }} + if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && startsWith(github.head_ref, 'deploy')) }} + strategy: + matrix: + python-version: ["3.10"] + os: [ubuntu-latest] + fail-fast: false + + steps: + - uses: actions/checkout@v3 + - name: Setup py-shiny + uses: ./.github/py-shiny/setup + with: + python-version: ${{ matrix.python-version }} + + - name: Run example app tests + env: + DEPLOY_CONNECT_SERVER_URL: "https://rsc.radixu.com/" + DEPLOY_CONNECT_SERVER_API_KEY: "${{ secrets.DEPLOY_CONNECT_SERVER_API_KEY }}" + DEPLOY_SHINYAPPS_NAME: "${{ secrets.DEPLOY_SHINYAPPS_NAME }}" + DEPLOY_SHINYAPPS_TOKEN: "${{ secrets.DEPLOY_SHINYAPPS_TOKEN }}" + DEPLOY_SHINYAPPS_SECRET: "${{ secrets.DEPLOY_SHINYAPPS_SECRET }}" + run: | + make e2e-deploys + + pypi: name: "Deploy to PyPI" runs-on: ubuntu-latest if: github.event_name == 'release' @@ -133,3 +163,56 @@ jobs: with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} + + testrail-reporting-nightly: + runs-on: ${{ matrix.os }} + if: ${{ github.event_name == 'schedule' || (github.event_name == 'pull_request' && startsWith(github.head_ref, 'testrail')) }} + strategy: + matrix: + python-version: + - "3.11" + - "3.10" + - "3.9" + # - "3.8" # Testrail has errors when running on python 3.8; Skipping + os: [ubuntu-latest] + fail-fast: false + + steps: + - uses: actions/checkout@v3 + - name: Setup py-shiny + uses: ./.github/py-shiny/setup + with: + python-version: ${{ matrix.python-version }} + + - name: Install node.js + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: npm + cache-dependency-path: examples/brownian/shinymediapipe/package-lock.json + - name: Install node.js package + working-directory: examples/brownian/shinymediapipe + run: | + npm ci + + - name: Run End-to-End tests + run: | + make e2e-junit + - name: Report results to Testrail + env: + TESTRAIL_URL: "https://posit.testrail.io" + TESTRAIL_PROJECT: "Shiny-Python" + TESTRAIL_USER: "${{ secrets.TESTRAIL_USER }}" + TESTRAIL_PASSWORD: "${{ secrets.TESTRAIL_PASSWORD }}" + run: | + CURRENT_DATE="$(date +'%Y-%m-%d %H:%M:%S') Nightly tests" + trcli \ + --yes \ + --host "$TESTRAIL_URL" \ + --project "$TESTRAIL_PROJECT" \ + --username "$TESTRAIL_USER" \ + --password "$TESTRAIL_PASSWORD" \ + parse_junit \ + --file "report.xml" \ + --title "$CURRENT_DATE" \ + --close-run diff --git a/.gitignore b/.gitignore index 9ca4423b4..a1827a31b 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ parts/ sdist/ var/ wheels/ +dist/ *.egg-info/ .installed.cfg *.egg diff --git a/CHANGELOG.md b/CHANGELOG.md index eda448fd5..0e59d562c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,12 +10,109 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### New features -* Added `shiny.render.renderer_components` decorator to help create new output renderers. (#621) +### Bug fixes + +### Other changes + + +## [0.6.0] - 2023-08-08 + +### Breaking Changes +* `shiny.run` only allows positional arguments for `app`, `host`, and `port`, all other arguments must be specified with keywords. + +### New features +* `shiny run` now takes `reload-includes` and `reload-excludes` to allow you to define which files trigger a reload (#780). +* `shiny.run` now passes keyword arguments to `uvicorn.run` (#780). +* The `@output` decorator is no longer required for rendering functions; `@render.xxx` decorators now register themselves automatically. You can still use `@output` explicitly if you need to set specific output options (#747). +* Added support for integration with Quarto (#746). +* Added `shiny.render.renderer_components` decorator to help create new output renderers (#621). +* Added `shiny.experimental.ui.popover()`, `update_popover()`, and `toggle_popover()` for easy creation (and server-side updating) of [Bootstrap popovers](https://getbootstrap.com/docs/5.3/components/popovers/). Popovers are similar to tooltips, but are more persistent, and should primarily be used with button-like UI elements (e.g. `input_action_button()` or icons) (#680). +* Added CSS classes to UI input methods (#680) . +* `Session` objects can now accept an asynchronous (or synchronous) function for `.on_flush(fn=)`, `.on_flushed(fn=)`, and `.on_ended(fn=)` (#686). +* `App()` now allows `static_assets` to represent multiple paths. To do this, pass in a dictionary instead of a string (#763). +* The `showcase_layout` argument of `value_box()` now accepts one of three character values: `"left center"`, `"top right"`, `"bottom"`. (#772) +* `value_box()` now supports many new themes and styles, or fully customizable themes using the new `value_box_theme()` function. To reflect the new capabilities, we've replaced `theme_color` with a new `theme` argument. The previous argument will continue work as expected, but with a deprecation warning. (#772) + + In addition to the Bootstrap theme names (`primary` ,`secondary`, etc.), you can now use the main Boostrap colors (`purple`, `blue`, `red`, etc.). You can also choose to apply the color to the background or foreground by prepending a `bg-` or `text-` prefix to the theme or color name. Finally, we've also added new gradient themes allowing you to pair any two color names as `bg-gradient-{from}-{to}` (e.g., `bg-gradient-purple-blue`). + + These named color themes aren't limited to value boxes: because they're powered by small utility classes, you can use them anywhere within your bslib-powered UI. + +* Added `shiny.ui.showcase_bottom()`, a new `shiny.ui.value_box()` layout that places the showcase below the value box `title` and `value`, perfect for a full-bleed plot. (#772) ### Bug fixes +* `shiny run` now respects the user provided `reload-dir` argument (#765). +* Fixed #646: Wrap bare value box value in `

` tags. (#668) +* Fixed #676: The `render.data_frame` selection feature was underdocumented and buggy (sometimes returning `None` as a row identifier if the pandas data frame's index had gaps in it). With this release, the selection is consistently a tuple of the 0-based row numbers of the selected rows--or `None` if no rows are selected. (#677) +* Added tests to verify that ui input methods, ui labels, ui update (value) methods, and ui output methods work within modules (#696). +* Adjusted the `@render.plot` input type to be `object` to allow for any object (if any) to be returned (#712). +* In `layout_column_wrap()`, when `width` is a CSS unit -- e.g. `width = "400px"` or `width = "25%"` -- and `fixed_width = FALSE`, `layout_column_wrap()` will ensure that the columns are at least `width` wide, unless the parent container is narrower than `width`. (#772) + ### Other changes +* `input_action_button()` now defaults to having whitespace around it. (#758) +* `layout_sidebar()` now uses an `