Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMPAT: Bokeh 3.6 and add minimal test for Bokeh 3.5 #7322

Merged
merged 18 commits into from
Sep 27, 2024
Merged
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
environment: ["test-core"]
environment: ["test-core", "test-minimal"]
timeout-minutes: 120
steps:
- uses: holoviz-dev/holoviz_tasks/pixi_install@v0
Expand Down
11 changes: 7 additions & 4 deletions panel/tests/ui/widgets/test_tabulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from panel.layout.base import Column
from panel.models.tabulator import _TABULATOR_THEMES_MAPPING
from panel.tests.util import get_ctrl_modifier, serve_component, wait_until
from panel.util import BOKEH_GE_3_6
from panel.widgets import Select, Tabulator, TextInput

pytestmark = pytest.mark.ui
Expand Down Expand Up @@ -366,10 +367,12 @@ def test_tabulator_formatters_bokeh_string(page, df_mixed):

serve_component(page, widget)

expect(page.locator('text="A"')).to_have_attribute(
"style",
"font-weight: bold; text-align: center; color: rgb(255, 0, 0);"
)
if BOKEH_GE_3_6:
style = "font-weight: bold; text-align: center; color: red;"
else:
style = "font-weight: bold; text-align: center; color: rgb(255, 0, 0);"

expect(page.locator('text="A"')).to_have_attribute("style", style)


def test_tabulator_formatters_bokeh_html_multiple_columns(page, df_mixed):
Expand Down
1 change: 1 addition & 0 deletions panel/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
log = logging.getLogger('panel.util')

bokeh_version = Version(Version(bokeh.__version__).base_version)
BOKEH_GE_3_6 = bokeh_version >= Version('3.6')

PARAM_NAME_PATTERN = re.compile(r'^.*\d{5}$')

Expand Down
14 changes: 10 additions & 4 deletions pixi.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "panel"
channels = ["pyviz/label/dev", "bokeh", "conda-forge"]
channels = ["pyviz/label/dev", "bokeh/label/rc", "conda-forge"]
platforms = ["linux-64", "osx-arm64", "osx-64", "win-64"]

[activation.env]
Expand All @@ -16,6 +16,7 @@ test-311 = ["py311", "test-core", "test", "example", "test-example", "test-unit-
test-312 = ["py312", "test-core", "test", "example", "test-example", "test-unit-task"]
test-ui = ["py312", "test-core", "test", "test-ui"]
test-core = ["py313", "test-core", "test-unit-task"]
test-minimal = ["py313", "test-core", "test-unit-task", "test-minimal"]
hoxbro marked this conversation as resolved.
Show resolved Hide resolved
test-type = ["py311", "type"]
docs = ["py311", "example", "doc"]
build = ["py311", "build"]
Expand All @@ -28,7 +29,7 @@ nomkl = "*"
pip = "*"
# Required
bleach = "*"
bokeh = ">=3.5.0,<3.6.0"
bokeh = ">=3.5.0,<3.7.0"
linkify-it-py = "*"
markdown = "*"
markdown-it-py = "*"
Expand All @@ -52,7 +53,7 @@ python = "3.11.*"
python = "3.12.*"

[feature.py313]
channels = ["pyviz/label/dev", "conda-forge/label/python_rc", "conda-forge"]
channels = ["pyviz/label/dev", "bokeh/label/rc", "conda-forge/label/python_rc", "conda-forge"]

[feature.py313.dependencies]
python = "3.13.*"
Expand Down Expand Up @@ -113,6 +114,10 @@ pytest-github-actions-annotate-failures = "*"
pytest-rerunfailures = "*"
pytest-xdist = "*"

[feature.test-minimal.dependencies]
# Lower pin required dependencies
bokeh = "3.5.*"

[feature.test.dependencies]
# Optional dependencies - recommended
holoviews = ">=1.16.0"
Expand All @@ -139,6 +144,7 @@ textual = "*"

[feature.test.pypi-dependencies]
bokeh-fastapi = "~=0.1.0a0"
bokeh = ">=3.6.0rc1"

[feature.test-unit-task.tasks] # So it is not showing up in the test-ui environment
test-unit = 'pytest panel/tests -n logical --dist loadgroup'
Expand All @@ -152,7 +158,7 @@ test-example = 'pytest -n logical --dist loadscope --nbval-lax examples'
nbval = "*"

[feature.test-ui]
channels = ["pyviz/label/dev", "bokeh", "microsoft", "conda-forge"]
channels = ["pyviz/label/dev", "bokeh/label/rc", "microsoft", "conda-forge"]

[feature.test-ui.dependencies]
playwright = { version = "*", channel = "microsoft" }
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [
"hatchling",
"hatch-vcs",
"param >=2.1.0",
"bokeh >=3.5.0,<3.6.0",
"bokeh >=3.5.0,<3.7.0",
"pyviz_comms >=0.7.4",
"requests",
"packaging",
Expand Down Expand Up @@ -48,7 +48,7 @@ classifiers = [
]

dependencies = [
'bokeh >=3.5.0,<3.6.0',
'bokeh >=3.5.0,<3.7.0',
'param >=2.1.0,<3.0',
'pyviz_comms >=2.0.0',
'markdown',
Expand Down
Loading