Skip to content

Commit df3f1d0

Browse files
committed
Merge branch 'main' into shiny-theme-followup
* main: (26 commits) Use a renderer generator to create sync/async render methods with full typing (#621) docs: Add Tooltip section in experimental (#673) Bump version to 0.5.1 Add missing sidebar stylesheet dep (#667) GitHub action cleanup (#662) Add a triage label to issues created by non-maintainers (#647) Bump version to 0.5.0.9000 Model score example (#650) Fix malformed changelog entry Update CHANGELOG.md for data frame filters (#654) Bump version to 0.5.0 Allow ui.update_slider to handle non-numeric values (#649) Add updated path to examples (#645) Bump griffe version Update README Fix jumpy cursor in numeric filter (#640) Build API docs (#633) Pyright: ignore docs dir Filtering feature for data grid/table (#592) Add E2E tests for accordion and autoresize (#601) ...
2 parents ea52b3b + da69ea0 commit df3f1d0

File tree

100 files changed

+24597
-1281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+24597
-1281
lines changed

.github/workflows/build-docs.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build API docs
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: ["main"]
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.11"]
15+
fail-fast: false
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Upgrade pip
26+
run: python -m pip install --upgrade pip
27+
28+
- name: Install Quarto
29+
uses: quarto-dev/quarto-actions/setup@v2
30+
with:
31+
version: 1.3.340
32+
33+
- name: Install dependencies
34+
run: |
35+
cd docs
36+
make deps
37+
38+
- name: Run quartodoc
39+
run: |
40+
cd docs
41+
make quartodoc
42+
43+
- name: Build site
44+
run: |
45+
cd docs
46+
make site

.github/workflows/create-issue.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Issue Management
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
triage_or_add_to_project:
9+
runs-on: ubuntu-latest
10+
11+
env:
12+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
14+
steps:
15+
- name: Check if the issue creator is a maintainer
16+
id: check_maintainer
17+
run: |
18+
IS_ADMIN=`gh api /repos/rstudio/py-shiny/collaborators/${{ github.event.issue.user.login }}/permission --jq='.user.permissions.admin'`
19+
echo "is_maintainer=$IS_ADMIN" >> "$GITHUB_OUTPUT"
20+
21+
- name: Apply "needs triage" label to issues created by non-maintainers
22+
if: steps.check_maintainer.outputs.is_maintainer == 'false'
23+
run: |
24+
gh issue edit ${{ github.event.issue.number }} --add-label "needs-triage" --repo ${{ github.repository }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,5 @@ docs/source/reference/
107107

108108
.DS_Store
109109
.Rproj.user
110+
111+
/.luarc.json

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
### New features
1212

13+
* Added `shiny.render.renderer_components` decorator to help create new output renderers. (#621)
14+
15+
### Bug fixes
16+
17+
### Other changes
18+
19+
20+
## [0.5.1] - 2023-08-08
21+
22+
### Bug fixes
23+
24+
* Fixed #666: Added missing sidebar stylesheet dependency. (#667)
25+
26+
27+
## [0.5.0] - 2023-08-01
28+
29+
### New features
30+
31+
* The new fast-scrolling data table/grid feature (`ui.output_data_frame`/`render.data_frame`) now has a filtering feature. To enable, pass the argument `filters=True` to the `render.DataTable` or `render.DataGrid` constructors. (#592)
1332
* `shiny run` now takes a `--reload-dir <DIR>` argument that indicates a directory `--reload` should (recursively) monitor for changes, in addition to the app's parent directory. Can be used more than once. (#353)
1433
* The default theme has been updated to use Bootstrap 5 with custom Shiny style enhancements. (#624)
34+
* Added experimental UI `tooltip()`, `update_tooltip()`, and `toggle_tooltip()` for easy creation (and server-side updating) of [Bootstrap tooltips](https://getbootstrap.com/docs/5.2/components/tooltips/) (a way to display additional information when focusing (or hovering over) a UI element). (#629)
1535

1636

1737
### Bug fixes
1838

39+
* Using `update_slider` to update a slider's value to a `datetime` object or other non-numeric value would result in an error. (#649)
40+
1941
### Other changes
2042

2143
* Documentation updates. (#591)

docs/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
_site/
2+
api/
3+
_inv/
4+
_sidebar.yml
5+
/.quarto/
6+
objects.json

docs/Makefile

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
.PHONY: help Makefile
2+
.DEFAULT_GOAL := help
3+
4+
define BROWSER_PYSCRIPT
5+
import os, webbrowser, sys
6+
7+
from urllib.request import pathname2url
8+
9+
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
10+
endef
11+
export BROWSER_PYSCRIPT
12+
13+
define PRINT_HELP_PYSCRIPT
14+
import re, sys
15+
16+
for line in sys.stdin:
17+
match = re.match(r'^([a-zA-Z1-9_-]+):.*?## (.*)$$', line)
18+
if match:
19+
target, help = match.groups()
20+
print("%-20s %s" % (target, help))
21+
endef
22+
export PRINT_HELP_PYSCRIPT
23+
24+
BROWSER := python -c "$$BROWSER_PYSCRIPT"
25+
26+
# Use venv from parent
27+
VENV = ../venv
28+
PYBIN = $(VENV)/bin
29+
30+
# Any targets that depend on $(VENV) or $(PYBIN) will cause the venv to be
31+
# created. To use the venv, python scripts should run with the prefix $(PYBIN),
32+
# as in `$(PYBIN)/pip`.
33+
$(VENV):
34+
python3 -m venv $(VENV)
35+
36+
$(PYBIN): $(VENV)
37+
38+
39+
help:
40+
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
41+
42+
deps: $(PYBIN) ## Install build dependencies
43+
$(PYBIN)/pip install pip --upgrade
44+
$(PYBIN)/pip install -e ..[doc]
45+
46+
quartodoc: ## Build qmd files for API docs
47+
. $(PYBIN)/activate \
48+
&& quartodoc interlinks \
49+
&& quartodoc build --config _quartodoc.yml --verbose
50+
51+
site: ## Build website
52+
. $(PYBIN)/activate \
53+
&& quarto render
54+
55+
serve: ## Build website and serve
56+
. $(PYBIN)/activate \
57+
&& quarto preview --port 8080
58+
59+
clean: ## Clean build artifacts
60+
rm -rf _inv api _site .quarto

docs/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Shiny for Python API docs
2+
=========================
3+
4+
This directory contains files to generate Shiny for Python API documentation, using [Quartodoc](https://machow.github.io/quartodoc/get-started/overview.html) and [Quarto](https://quarto.org/).
5+
6+
## Building the docs
7+
8+
To build the docs, first install the Python dependencies and Quarto extensions:
9+
10+
```bash
11+
# Install build dependencies
12+
make deps
13+
```
14+
15+
After those dependencies are installed, build the .qmd files for Shiny, using quartodoc. This will go in the `api/` directory:
16+
17+
```bash
18+
make quartodoc
19+
```
20+
21+
Then build the web site using Quarto:
22+
23+
```bash
24+
make site
25+
```
26+
27+
Alternatively, running `make serve` will build the docs, and serve them locally, and watch for changes to the .qmd files:
28+
29+
```bash
30+
make serve
31+
```
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.html
2+
*.pdf
3+
*_files/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
title: Interlinks
2+
author: Michael Chow
3+
version: 1.0.0
4+
quarto-required: ">=1.2.0"
5+
contributes:
6+
filters:
7+
- interlinks.lua

0 commit comments

Comments
 (0)