Skip to content

Commit

Permalink
Backports for 3.1.1 (#13103)
Browse files Browse the repository at this point in the history
* Fix tiny error in doc code-block (#12973)

* Add a ref for LegendLocation (#12939)

* Temporarily disable docker_from_wheel test in CI (#12963)

* Update In-kind sponsors list (#13054)

* Update In-kind sponsors list

* Update README.md

* Update first_steps_1.rst (#13084)

* Update first_steps_1.rst

* Update docs/bokeh/source/docs/first_steps/first_steps_1.rst

Co-authored-by: Timo Cornelius Metzger <39711796+tcmetzger@users.noreply.github.com>

* Update first_steps_1.rst

Made the changes suggested!

* Update docs/bokeh/source/docs/first_steps/first_steps_1.rst

Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>

* Update first_steps_1.rst

Follow up edits

---------

Co-authored-by: Timo Cornelius Metzger <39711796+tcmetzger@users.noreply.github.com>
Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>

* Allow `static/` symlinks in `BOKEH_ACTION=install pip install -e .` (#13065)

* Disable user select globally when dragging slider handles (#13082)

* Add tests for custom arrayable functions (#12892)

* Add tests for custom arrayable functions

* add more tests for arrayable

* fix ESLint error

* fix another ESLint error

* List installed software and versions in CI (#12899)

* List installed software in CI

* Don't require npm@8, install most recent one

* Allow to correctly sort international strings in DataTable (#12900)

* Don't assign model's name to HTMLElement.name (#12901)

* Use CSS-safe IDs in generated HTML (#12902)

* Use CSS-safe IDs in generated HTML

* Generate DOM elements with unique IDs in load_notebook()

* Don't double stroke in diagonal hatch patterns (#12903)

* Add bokehjs example for grid band patterns

* Don't double stroke in diagonal hatch patterns

* Update visual baselines

* updated commands with correct links to executable (#12910)

changed examples/app/slider.py to examples/server/app/sliders.py 

transform_markers.py is updated here but shows as marker_map here
https://docs.bokeh.org/en/latest/docs/dev_guide/setup.html

* Copy files if symlinking fails in 'pack' build task (#12928)

* Document lack of serialization support for decimal.Decimal under Serializer class (#12935)

* Add message in Serializer docstring addressing lack of support for decimal.Decimal.

* Remove trailing whitespace

* Remove trailing whitespace

* Delete test file

* Upload latest docs more cleanly (#12955)

* Upload latest docs more cleanly

* Missing return type

* Check for git tags before build (#12962)

* Check for git tags during build

* Update setup.py

Co-authored-by: Mateusz Paprocki <mattpap@gmail.com>

---------

Co-authored-by: Mateusz Paprocki <mattpap@gmail.com>

* Added troubleshooting for issue #13001 (#13002)

* Added troubleshooting for issue #13001

* update

* updated ReadMe file of examples folder (#13066)

* updated ReadMe file of examples folder

* Update examples/README.md

Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>

* Update examples/README.md

Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>

* Update examples/README.md

Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>

* removed intergration section from readme

* added linebreaks

* fixed widespace issues

* trimmed trailing widespace

---------

Co-authored-by: Bryan Van de Ven <bryan@bokeh.org>

* Fix race conditions related to layout resize and updates (#13100)

* Fix a race condition between plot and canvas resize

* Ignore child model/view state inconsistencies for now

* Notify ready after render and layout is done

* Add a regression test for issue #13104

* manual eslint patch

* Make autocompleteinput.py example work with Pandas 2.0 (#13057)

* fix baseline

* Added metadata to line_on_off.py (#13003)

* Added metadata to line_on_off.py

* update

* update

* update

* update

* Tile source metadata (#13026)

* added accessible color palette

* Delete latex_schrodinger.png

* Delete latex_schrodinger@2x.png

* Add new thumbnails for updated palette

* Add metadata to text.py

* Revert changes from ths branch

* Update tile_source.py

* fix consistency & linter issues

* fix broken docs refs (#13086)

* fix broken docs refs

* pin sphinx to 5.3

* sphinx pin for 3.8

* Use libmamba solver in CI (#13061)

* Use libmamba solver in CI

* Disable "Post prepare environment" on Windows

* Correctly resolve custom host and port with server resources (#13041)

* Correctly resolve custom host and port with server resources

* Use pathlib.Path instead of a comment

* Fix argument types in _bundle_extensions()

* Remove support for BaseResources

* Add a release note

* Add support for Resources.clone()

* Include settings.dev in Resources.dev

Allows to specify:

BOKEH_DEV=true BOKEH_RESOURCES=server python ...

instead of:

BOKEH_DEV=true BOKEH_RESOURCES=server-dev python ...

* Fix `MultiRootStaticHandler` after PR #13041 (#13070)

* Fix MultiRootStaticHandler after PR #13041

* Work around unawaited async function calls

* Fix bokeh.sphinxext.util after PR #13041 (#13062)

* Increase the number of iterations in CSS safe ID generator (#13035)

* Add dropdowns to contributor docs troubleshooting (#13009)

* Simpler WebGL line shaders (#13039)

* Simplify webgl line shaders

* Update baseline images

* Add new image tests

* Add Path.is_relative_to() polyfill for Python 3.8

* [BUG] Fix broken link to tools guide (#13109)

* [BUG] Fix broken link to tools guide

#13108

* [BUG] Fix broken link to tools guide

#13108

---------

Co-authored-by: Ian Thomas <ianthomas23@gmail.com>
Co-authored-by: Timo Cornelius Metzger <39711796+tcmetzger@users.noreply.github.com>
Co-authored-by: Victoria Adesoba <victoria@makepath.com>
Co-authored-by: Mateusz Paprocki <mattpap@gmail.com>
Co-authored-by: Timon Jurschitsch <103483059+DerTimonius@users.noreply.github.com>
Co-authored-by: Sooter Saalu <53571625+Soot3@users.noreply.github.com>
Co-authored-by: Ben Russell <bprussell80@protonmail.com>
Co-authored-by: Azaya <99359668+Azaya89@users.noreply.github.com>
Co-authored-by: Medhavi Singh <78318301+Med16-11@users.noreply.github.com>
Co-authored-by: Chinmay <chinmay.cc.06@gmail.com>
Co-authored-by: Kshitiz Gupta <Kshitiz305@live.com>
  • Loading branch information
12 people committed May 4, 2023
1 parent 6aef0ae commit 088cee9
Show file tree
Hide file tree
Showing 104 changed files with 1,189 additions and 756 deletions.
51 changes: 49 additions & 2 deletions .github/workflows/bokeh-ci.yml
Expand Up @@ -27,7 +27,18 @@ jobs:
with:
miniconda-version: 'latest'
activate-environment: bk-test
environment-file: conda/environment-build.yml
run-post: ${{ runner.os != 'Windows' }}

- name: Install libmamba solver
shell: bash -l {0}
run: |
conda install -q -n base conda-libmamba-solver
conda config --set solver libmamba
- name: Update bk-test environment
shell: bash -l {0}
run: |
conda env update -q -n bk-test -f conda/environment-build.yml
- name: Install node modules
run: bash scripts/ci/install_node_modules.sh
Expand Down Expand Up @@ -91,6 +102,11 @@ jobs:
source-tree: 'keep'
sampledata: 'cache'

- name: List installed software
run: |
conda info
conda list
- name: Run codebase checks
run: pytest --color=yes tests/codebase

Expand All @@ -113,7 +129,6 @@ jobs:
sampledata: 'cache'

- name: Install chromium
if: runner.os == 'Linux'
run: |
if [[ "$(chromium --version | cut -d' ' -f2)" = "$CHROME_VER" ]]; then
echo "Using pre-installed version of chromium"
Expand All @@ -126,6 +141,12 @@ jobs:
sudo snap install $CHROME_REV.snap
fi
- name: List installed software
run: |
conda info
conda list
chromium --version
- name: Start chrome headless
working-directory: ./bokehjs
run: node make test:spawn:headless # starts chrome in the background on port 9222
Expand Down Expand Up @@ -166,6 +187,11 @@ jobs:
source-tree: 'delete'
sampledata: 'cache'

- name: List installed software
run: |
conda info
conda list
- name: Run tests
run: pytest -v --cov=bokeh --cov-report=xml --tb=short --driver chrome --color=yes tests/integration

Expand Down Expand Up @@ -202,6 +228,11 @@ jobs:
- name: Ensure Python version
run: if [[ ! "$(python --version | cut -d' ' -f2)" == "${{ matrix.python-version }}"* ]]; then exit 1; fi

- name: List installed software
run: |
conda info
conda list
- name: Test defaults
run: pytest tests/test_defaults.py

Expand Down Expand Up @@ -238,6 +269,11 @@ jobs:
source-tree: 'delete'
sampledata: 'none' # no sampledata for minimal tests

- name: List installed software
run: |
conda info
conda list
- name: Run tests
run: pytest -m "not sampledata" --cov=bokeh --cov-report=xml --color=yes tests/unit

Expand All @@ -262,6 +298,11 @@ jobs:
source-tree: 'delete'
sampledata: 'download' # test at least one real download

- name: List installed software
run: |
conda info
conda list
- name: Build docs
run: bash scripts/ci/build_docs.sh

Expand All @@ -288,10 +329,16 @@ jobs:
- name: Install downstream packages
run: bash scripts/ci/install_downstream_packages.sh

- name: List installed software
run: |
conda info
conda list
- name: Run tests
run: bash scripts/ci/run_downstream_tests.sh

docker_from_wheel:
if: ${{ false }} # temporarily disable
needs: build
runs-on: ubuntu-latest
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bokeh-release-build.yml
Expand Up @@ -49,8 +49,8 @@ jobs:

- name: Post install status
run: |
echo "$(which node) @ $(node --version)"
echo "$(which npm) @ $(npm --version)"
echo "node $(node --version)"
echo "npm $(npm --version)"
conda info
conda list
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/bokehjs-ci.yml
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Upgrade npm
shell: bash
run: |
npm install --location=global npm@8
npm install --location=global npm
- name: Install chromium
if: runner.os == 'Linux'
Expand All @@ -57,6 +57,23 @@ jobs:
run: |
npm ci --no-progress
- name: List installed software
working-directory: ./bokehjs
shell: bash
run: |
echo "node $(node --version)"
echo "npm $(npm --version)"
if [ "$RUNNER_OS" == "Linux" ]; then
chromium --version
elif [ "$RUNNER_OS" == "Windows" ]; then
# TODO: this hangs; version is reported in tests
# c:/Program\ Files/Google/Chrome/Application/chrome.EXE --version
echo "Chromium ??? (see tests)"
elif [ "$RUNNER_OS" == "macOS" ]; then
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version
fi
npm list
- name: Build bokehjs
working-directory: ./bokehjs
shell: bash
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/composite/test-setup/action.yml
Expand Up @@ -24,7 +24,18 @@ runs:
with:
miniconda-version: 'latest'
activate-environment: bk-test
environment-file: conda/environment-test-${{ inputs.test-env }}.yml
run-post: ${{ runner.os != 'Windows' }}

- name: Install libmamba solver
shell: bash -l {0}
run: |
conda install -q -n base conda-libmamba-solver
conda config --set solver libmamba
- name: Update bk-test environment
shell: bash -l {0}
run: |
conda env update -q -n bk-test -f conda/environment-test-${{ inputs.test-env }}.yml
- name: Download wheel package
id: download
Expand Down
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -249,7 +249,6 @@ Non-monetary support can help with development, collaboration, infrastructure, s
* [GitGuardian](https://gitguardian.com/)
* [GitHub](https://github.com/)
* [makepath](https://makepath.com/)
* [Pentest Tools](https://pentest-tools.com)
* [Pingdom](https://www.pingdom.com/website-monitoring)
* [Slack](https://slack.com)
* [QuestionScout](https://www.questionscout.com/)
Expand Down
5 changes: 2 additions & 3 deletions bokehjs/eslint.json
Expand Up @@ -16,7 +16,7 @@
"tsconfigRootDir": ".",
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "deprecation"],
"plugins": ["@typescript-eslint"],
"extends": [],
"rules": {
"@typescript-eslint/ban-types": ["error", {
Expand Down Expand Up @@ -124,7 +124,6 @@
"anonymous": {"before": false, "after": true},
"method": {"before": true, "after": false}
}],
"yield-star-spacing": ["error", {"before": false, "after": true}],
"deprecation/deprecation": ["error"]
"yield-star-spacing": ["error", {"before": false, "after": true}]
}
}
12 changes: 11 additions & 1 deletion bokehjs/make/tasks/pack.ts
@@ -1,5 +1,6 @@
import cp from "child_process"
import fs from "fs"
import os from "os"
import path from "path"
import {task, BuildError} from "../task"

Expand Down Expand Up @@ -27,7 +28,16 @@ function npm_pack() {
fs.unlinkSync(tgz_latest)
}

fs.symlinkSync(tgz, tgz_latest)
try {
fs.symlinkSync(tgz, tgz_latest)
} catch (error: unknown) {
if (error instanceof Error) {
const e = error as NodeJS.ErrnoException
if (e.errno === os.constants.errno.EPERM) {
fs.copyFileSync(tgz, tgz_latest)
}
}
}
}

task("pack", async () => {
Expand Down
8 changes: 8 additions & 0 deletions bokehjs/src/lib/core/util/types.ts
Expand Up @@ -20,6 +20,14 @@ export function is_nullish(obj: unknown): obj is null | undefined {
return obj == null
}

export function isNull(obj: unknown): obj is null | undefined {
return obj == null
}

export function isNotNull<T>(obj: T | null | undefined): obj is T {
return obj != null
}

export function isBoolean(obj: unknown): obj is boolean {
return obj === true || obj === false || toString.call(obj) === "[object Boolean]"
}
Expand Down
2 changes: 0 additions & 2 deletions bokehjs/src/lib/core/visuals/patterns.ts
Expand Up @@ -118,7 +118,6 @@ function create_hatch_canvas(ctx: Context2d,
ctx.moveTo(3*h4+0.5, h)
ctx.lineTo(5*h4+0.5, 0)
ctx.stroke()
ctx.stroke()
break
case "left_diagonal_line":
ctx.moveTo(h4+0.5, h)
Expand All @@ -130,7 +129,6 @@ function create_hatch_canvas(ctx: Context2d,
ctx.moveTo(5*h4+0.5, h)
ctx.lineTo(3*h4+0.5, 0)
ctx.stroke()
ctx.stroke()
break
case "diagonal_cross":
_x(ctx, h)
Expand Down
17 changes: 12 additions & 5 deletions bokehjs/src/lib/models/canvas/canvas.ts
Expand Up @@ -173,9 +173,18 @@ export class CanvasView extends UIElementView {
return changed
}

override after_resize(): void {
if (this.plot_views.length != 0) {
// Canvas is being managed by a plot, thus it should not attempt
// self-resize, as it would result in inconsistent state and
// possibly invalid layout and/or lack of repaint of a plot.
return
} else {
super.after_resize()
}
}

override _after_resize(): void {
if (this.plot_views.length != 0)
return // XXX temporary hack
super._after_resize()
const {width, height} = this.bbox
this.primary.resize(width, height)
Expand All @@ -184,9 +193,7 @@ export class CanvasView extends UIElementView {

resize(): void {
this._update_bbox()
const {width, height} = this.bbox
this.primary.resize(width, height)
this.overlays.resize(width, height)
this._after_resize()
}

prepare_webgl(frame_box: FrameBox): void {
Expand Down
2 changes: 1 addition & 1 deletion bokehjs/src/lib/models/glyphs/webgl/base_line.ts
Expand Up @@ -36,7 +36,7 @@ export abstract class BaseLineGL extends BaseGLGlyph {
super(regl_wrapper, glyph)

this._antialias = 1.5 // Make this larger to test antialiasing at edges.
this._miter_limit = 5.0 // Threshold for miters to be replaced by bevels.
this._miter_limit = 10.0 // Threshold for miters to be replaced by bevels.
}

abstract override draw(_indices: number[], main_glyph: GlyphView, transform: Transform): void
Expand Down

0 comments on commit 088cee9

Please sign in to comment.