Skip to content

Commit

Permalink
Merge branch 'main' into add_time_picker
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored Aug 22, 2024
2 parents 0427bfb + 3b0d8c2 commit a8a62e2
Show file tree
Hide file tree
Showing 151 changed files with 6,035 additions and 2,553 deletions.
78 changes: 43 additions & 35 deletions .github/workflows/jupyterlite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,67 @@ name: jupyterlite
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+a[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+b[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
workflow_dispatch:
inputs:
target:
description: 'Site to build and deploy'
description: "Site to build and deploy"
type: choice
options:
- dev
- main
- dryrun
- dev
- main
- dryrun
required: true
default: dryrun
schedule:
- cron: '0 19 * * SUN'
- cron: "0 19 * * SUN"

jobs:
deploy_jupyterlite:
name: JupyterLite
pixi_lock:
name: Pixi lock
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: holoviz-dev/holoviz_tasks/pixi_lock@pixi

lite_build:
name: Build Jupyterlite
needs: [pixi_lock]
runs-on: "ubuntu-latest"
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_install@pixi
with:
environments: "lite"
install: false
download-data: false
- name: lite build
run: pixi run lite-build
- uses: actions/upload-artifact@v4
if: always()
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
name: jupyterlite
path: lite/dist/
if-no-files-found: error

lite_publish:
name: Publish Jupyterlite
runs-on: ubuntu-latest
needs: [lite_build]
steps:
- uses: actions/download-artifact@v4
with:
python-version: '3.10'
- name: Set and echo git ref
name: jupyterlite
path: lite/dist/
- name: Set output
id: vars
run: |
echo 'Deploying from ref ${GITHUB_REF#refs/*/}'
echo 'tag=${GITHUB_REF#refs/*/}' >> $GITHUB_OUTPUT
- name: Install the dependencies
run: |
python -m pip install -r ./lite/requirements.txt
- name: Build pyodide wheels for JupyterLite
run: |
python ./scripts/build_pyodide_wheels.py lite/pypi
- name: Convert content
run: |
python ./scripts/panelite/generate_panelite_content.py
- name: Build the JupyterLite site
run: |
jupyter lite build --lite-dir lite --output-dir lite/dist
run: echo "tag=${{ needs.docs_build.outputs.tag }}" >> $GITHUB_OUTPUT
- name: Upload dev
if: |
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'dev') ||
(github.event_name == 'workflow_run' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.ACCESS_TOKEN }}
external_repository: holoviz-dev/panelite-dev
Expand All @@ -65,7 +73,7 @@ jobs:
if: |
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'main') ||
(github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ secrets.ACCESS_TOKEN }}
external_repository: holoviz-dev/panelite
Expand Down
26 changes: 20 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,7 @@ jobs:
(jupyter lab --config panel/tests/ui/jupyter_server_test_config.py --port 8887 > /tmp/jupyterlab_server.log 2>&1) &
- name: Build JupyterLite
shell: pixi run -e test-ui bash -el {0}
run: |
# TODO: Make this a pixi feature/environment
python -m pip install -r ./lite/requirements.txt
python ./scripts/build_pyodide_wheels.py lite/pypi
python ./scripts/panelite/generate_panelite_content.py
jupyter lite build --lite-dir lite --output-dir lite/dist
run: pixi run -e lite lite-build
- name: Wait for JupyterLab
uses: ifaxity/wait-on-action@v1.2.1
with:
Expand Down Expand Up @@ -257,3 +252,22 @@ jobs:
- name: Test Unit
run: |
pixi run -e ${{ matrix.environment }} test-unit
type_test_suite:
name: type:${{ matrix.environment }}:${{ matrix.os }}
needs: [pre_commit, setup, pixi_lock]
runs-on: ${{ matrix.os }}
if: needs.setup.outputs.code_change == 'true'
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
environment: ["test-type"]
timeout-minutes: 120
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_install@pixi
with:
environments: ${{ matrix.environment }}
- name: Test Type
run: |
pixi run -e ${{ matrix.environment }} test-type || echo "Failed"
12 changes: 9 additions & 3 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,15 @@ representative at an online or offline event.

## 👩‍⚖️ Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
coc@holoviz.org.
Instances of abusive, harassing, or otherwise unacceptable behavior
may be reported to the community leaders responsible for enforcement
at coc@holoviz.org, which is monitored by the [CoC
subcommittee](https://panel.holoviz.org/about/people.html#CoC-Subcommittee)
or a report can be made using the NumFOCUS Code of Conduct report
form. If community leaders cannot come to a resolution about
enforcement, reports will be escalated to the NumFocus Code of Conduct
committee (conduct@numfocus.org).

All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Enjoying Panel? Show your support with a [Github star](https://github.com/holovi
<tbody>
<tr>
<td>Downloads</td>
<td><a href="https://pypistats.org/packages/panel" alt="PyPi Downloads"><img src="https://img.shields.io/pypi/dm/panel?label=pypi" /></a> <a href="https://anaconda.org/pyviz/panel" alt="Conda Downloads"><img src="https://pyviz.org/_static/cache/panel_conda_downloads_badge.svg" /></a></td>
<td><a href="https://pypistats.org/packages/panel"><img src="https://img.shields.io/pypi/dm/panel?label=pypi" alt="PyPi Downloads" /></a> <a href="https://anaconda.org/pyviz/panel"><img src="https://pyviz.org/_static/cache/panel_conda_downloads_badge.svg" alt="Conda Downloads" /></a></td>
</tr>
<tr>
<td>Build Status</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_apps():
return [
app
for app in glob("examples/gallery/**/*.ipynb", recursive=True)
if not app in DONT_SERVE
if app not in DONT_SERVE
]


Expand Down
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ coverage:
threshold: 0.5%

comment:
require_changes: yes
require_changes: true
Binary file added doc/_static/images/global-task-runner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/images/serverside-video.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/images/session-task-runner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doc/about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ If you like Panel and have built something you want to share, tweet a link or sc
:maxdepth: 2
releases
people
roadmap
```
23 changes: 23 additions & 0 deletions doc/about/people.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# People

## Project Lead

Philipp Rudiger (@philippfr)

## Maintainers

- Philipp Rudiger (@philippfr)
- Simon Hansen (@Hoxbro)
- Maxime Liquet (@maximlt)
- Marc Skov Madsen (@MarcSkovMadsen)
- Andrew Huang (@ahuang11)

## Steering Committee

The Panel project is governed by the [HoloViz steering committee](https://github.com/holoviz/holoviz/blob/main/doc/governance/org-docs/STEERING-COMMITTEE.md).

## CoC Subcommittee

- James A. Bednar (@jbednar)
- Sophia Yang (@sophiamyang)
- Philipp Rudiger (@philippjfr)
15 changes: 12 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

current_release = panel.__version__ # Current release version variable

announcement_text = f"Panel {current_release} has just been released! Check out the <a href='https://panel.holoviz.org/about/releases.html#version-1-4-0'>release notes</a> and support Panel by giving it a 🌟 on <a href='https://github.com/holoviz/panel'>Github</a>."
announcement_text = f"Panel {current_release} has just been released! Check out the <a href='https://panel.holoviz.org/about/releases.html'>release notes</a> and support Panel by giving it a 🌟 on <a href='https://github.com/holoviz/panel'>Github</a>."


html_theme_options = {
Expand Down Expand Up @@ -124,10 +124,10 @@
'layouts',
# 3 most important by expected usage. Rest alphabetically
'chat',
'custom_components',
'global',
'indicators',
'templates',
'custom_components',
],
'titles': {
'Vega': 'Altair & Vega',
Expand Down Expand Up @@ -167,10 +167,16 @@ def get_requirements():
requirements[src] = deps
return requirements


html_js_files = [
(None, {'body': '{"shimMode": true}', 'type': 'esms-options'}),
f'https://cdn.holoviz.org/panel/{js_version}/dist/bundled/reactiveesm/es-module-shims@^1.10.0/dist/es-module-shims.min.js'
]

nbsite_pyodide_conf = {
'PYODIDE_URL': f'https://cdn.jsdelivr.net/pyodide/{PYODIDE_VERSION}/full/pyodide.js',
'requirements': [bokeh_req, panel_req, 'pyodide-http'],
'requires': get_requirements()
'requires': get_requirements(),
}

templates_path += [
Expand Down Expand Up @@ -236,12 +242,15 @@ def _get_pyodide_version():
raise NotImplementedError(F"{PYODIDE_VERSION=} is not valid")

def update_versions(app, docname, source):
from panel.models.tabulator import TABULATOR_VERSION

# Inspired by: https://stackoverflow.com/questions/8821511
version_replace = {
"{{PANEL_VERSION}}" : PY_VERSION,
"{{BOKEH_VERSION}}" : BOKEH_VERSION,
"{{PYSCRIPT_VERSION}}" : PYSCRIPT_VERSION,
"{{PYODIDE_VERSION}}" : _get_pyodide_version(),
"{{TABULATOR_VERSION}}" : TABULATOR_VERSION,
}

for old, new in version_replace.items():
Expand Down
2 changes: 1 addition & 1 deletion doc/explanation/api/reactivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def submit_form(event):
user.param.watch(update_preview, 'value')
age.param.watch(update_preview, 'value')
submit.onclick(submit_form)
submit.on_click(submit_form)
pn.Row(widgets, md)
```
Expand Down
18 changes: 16 additions & 2 deletions doc/how_to/concurrency/manual_threading.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class SessionTaskRunner(pn.viewable.Viewer):

def __panel__(self):
return pn.Column(
f"## TaskRunner {id(self)}",
f"## Session TaskRunner {id(self)}",
pn.pane.Str(self.param.status),
pn.pane.Str(pn.rx("Last Result: {value}").format(value=self.param.value)),
)
Expand Down Expand Up @@ -118,6 +118,13 @@ button = pn.widgets.Button(name="Add Task", on_click=add_task, button_type="prim
pn.Column(button, task_runner).servable()
```

The application should look like:

<video muted controls loop poster="../../_static/images/session-task-runner.png" style="max-height: 400px; max-width: 100%;">
<source src="https://assets.holoviz.org/panel/how_to/concurrency/session-task-runner.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>

Since processing occurs on a separate thread, the application remains responsive to further user interactions, such as queuing new tasks.

:::{note}
Expand Down Expand Up @@ -231,7 +238,7 @@ class GlobalTaskRunner(pn.viewable.Viewer):

def __panel__(self):
return pn.Column(
f"## TaskRunner {id(self)}",
f"## Global TaskRunner {id(self)}",
self.param.seconds,
pn.pane.Str(pn.rx("Last Result: {value}").format(value=self.param.value)),
pn.pane.Str(
Expand Down Expand Up @@ -263,6 +270,13 @@ pn.Column(
).servable()
```

The application should look like:

<video muted controls loop poster="../../_static/images/global-task-runner.png" style="max-height: 400px; max-width: 100%;">
<source src="https://assets.holoviz.org/panel/how_to/concurrency/global-task-runner.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>

:::{note}

For efficient use of global threading:
Expand Down
Loading

0 comments on commit a8a62e2

Please sign in to comment.