FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix CI by martinRenou · Pull Request #1642 · bqplot/bqplot · GitHub

/ bqplot Public
Merged

Fix CI #1642

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .ipynb  (3) .json  (1) .lock  (1) .md  (3) .py  (2) .ts  (1) .yaml  (1) .yml  (2) All 8 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
31 changes: 5 additions & 26 deletions .github/workflows/build.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,8 @@ name: Build
on:
push:
branches: [ master ]
paths:
- js/**
- bqplot/**
pull_request:
branches: '*'
paths:
- js/**
- bqplot/**
- .github/workflows/**
- setup.cfg

env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
Expand Down Expand Up @@ -47,15 +39,9 @@ jobs:
test -f $CONDA_PREFIX/share/jupyter/labextensions/bqplot/package.json
test -d $CONDA_PREFIX/share/jupyter/labextensions/bqplot/static

- name: Debug nbextension
run: jupyter nbextension list

- name: Debug labextension
run: jupyter labextension list

- name: Validate the nbextension
run: jupyter nbextension list 2>&1 | grep "bqplot/extension"

- name: Validate the labextension
run: jupyter labextension list 2>&1 | grep bqplot

Expand Down Expand Up @@ -105,9 +91,12 @@ jobs:
uses: actions/checkout@v3

- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@main
uses: mamba-org/provision-with-micromamba@main
with:
environment-name: bqplot-test
environment-file: test-environment.yml
python-version: 3.9
auto-activate-base: false
channels: conda-forge

- uses: actions/download-artifact@v3
Expand All @@ -126,13 +115,6 @@ jobs:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: jlpm install

- name: Set up browser cache
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/pw-browsers
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}

- name: Install browser
shell: bash -l {0}
run: npx playwright install chromium
Expand All @@ -141,7 +123,7 @@ jobs:
- name: Execute integration tests
shell: bash -l {0}
working-directory: ui-tests
run: npx playwright test
run: jlpm run test

- name: Upload Playwright Test report
if: always()
Expand Down Expand Up @@ -192,8 +174,5 @@ jobs:
test -f $CONDA_PREFIX/share/jupyter/labextensions/bqplot/package.json
test -d $CONDA_PREFIX/share/jupyter/labextensions/bqplot/static

- name: Validate the nbextension
run: jupyter nbextension list 2>&1 | grep "bqplot/extension"

- name: Validate the labextension
run: jupyter labextension list 2>&1 | grep bqplot
3 changes: 3 additions & 0 deletions .github/workflows/update_galata_references.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
- name: Configure git to use https
run: git config --global hub.protocol https

- name: Install hub
run: sudo apt-get update && sudo apt-get install -y hub

- name: Checkout the branch from the PR that triggered the job
run: hub pr checkout ${{ github.event.issue.number }}
env:
Expand Down
4 changes: 2 additions & 2 deletions bqplot/pyplot.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ def plot(*args, **kwargs):
else:
kwargs['x'] = _infer_x_for_line(args[0])
elif len(args) == 2:
if type(args[1]) == str:
if isinstance(args[1], str):
kwargs['y'] = args[0]
kwargs['x'] = _infer_x_for_line(args[0])
marker_str = args[1].strip()
Expand All @@ -676,7 +676,7 @@ def plot(*args, **kwargs):
elif len(args) == 3:
kwargs['x'] = args[0]
kwargs['y'] = args[1]
if type(args[2]) == str:
if isinstance(args[2], str):
marker_str = args[2].strip()

if marker_str:
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ site_url: https://bqplot.github.io/bqplot
* __2D selectors__ Select slices of data along two dimensions (x and y) using rectangular brushing
* __Lasso__ Select slices of data along two dimensions (x and y) using a lasso
* __Jupyter Widget Integration__ Seamless integration and linking with Jupyter widgets
* __Extensibility__ `Object Model` can be extended to build re-usable compound plotting widgets and widget libraries
* __Extensibility__ `Object Model` can be extended to build reusable compound plotting widgets and widget libraries
* __Dashboards/Apps__ Build rich interactive dashboards and apps by integrating `bqplot` with other Jupyter widget libraries and `voila` dashboarding tool

While `bqplot` provides support for static plotting for most of the chart types, it really shines in interactive plotting where data attributes are updated in an event-driven fashion (using ipywidgets, click handlers etc.)
Expand Down
16 changes: 8 additions & 8 deletions docs/usage/marks/label.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fig
```
![plot](../../assets/images/label-image1.png)
!!! tip
To render labels professionally it's better to offset the label to avoid obscuring the true graph below. To do so, set the `x_offset` and `y_offset` attrbiutes (which accepts values in pixels), like so:
To render labels professionally it's better to offset the label to avoid obscuring the true graph below. To do so, set the `x_offset` and `y_offset` attributes (which accepts values in pixels), like so:
```py
label.x_offset = 10
label.y_offset = 10
Expand All @@ -59,9 +59,9 @@ fig = plt.figure()
y = np.cumsum(np.random.randn(100))
line = plt.plot(np.arange(y.size), y_data)
label = plt.label(
["Halfway Point"],
default_size=26,
font_weight="bolder",
["Halfway Point"],
default_size=26,
font_weight="bolder",
colors=["orange"]
)

Expand All @@ -70,7 +70,7 @@ label.y = [0.5]
```
![plot](../../assets/images/label-image2.png)

Further, we can use values expressed in the units of the data. For example, if we consider a time series, we might want to label a specific date. Rather than calculating the position of the data with respect to the figure, we can simply pass in the date to the label function.
Further, we can use values expressed in the units of the data. For example, if we consider a time series, we might want to label a specific date. Rather than calculating the position of the data with respect to the figure, we can simply pass in the date to the label function.
```py
fig = plt.figure()
y = pd.Series(
Expand All @@ -80,8 +80,8 @@ y = pd.Series(
)

lines = plt.plot(y.index, y)
label = plt.label(["Special Day"],
x=[np.datetime64("2007-02-14")],
label = plt.label(["Special Day"],
x=[np.datetime64("2007-02-14")],
colors=["orange"])

labels.y = [0.5]
Expand All @@ -100,4 +100,4 @@ labels.enable_move = True
For detailed examples of bar plots, refer to the following example notebooks

1. [pyplot](https://github.com/bqplot/bqplot/blob/master/examples/Marks/Pyplot/Label.ipynb)
2. [Object Model](https://github.com/bqplot/bqplot/blob/master/examples/Marks/Object%20Model/Label.ipynb)
2. [Object Model](https://github.com/bqplot/bqplot/blob/master/examples/Marks/Object%20Model/Label.ipynb)
2 changes: 1 addition & 1 deletion docs/usage/object-model.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ bq.Figure(marks=[line, scatter], axes=[xax, yax], title="Scatter and Line")
__Object Model__ is a verbose but fully customizable object-oriented API for plotting. Lower level constructs like scales, axes etc. have to explicitly constructed.
For detailed usage refer to the [example notebooks](https://github.com/bqplot/bqplot/tree/master/examples/Marks/Object%20Model) using `Object Model`.

__Object Model__ can be used to build re-usable plotting widgets and widget libraries. More details can be found in [here]
__Object Model__ can be used to build reusable plotting widgets and widget libraries. More details can be found in [here]
4 changes: 2 additions & 2 deletions examples/Marks/Object Model/GridHeatMap.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"metadata": {},
"source": [
"By default, for `N` points along any dimension, data aligns to the `start` of the rectangles in the grid.\n",
"The grid extends infinitely in the other direction. By default, the grid extends infintely\n",
"The grid extends infinitely in the other direction. By default, the grid extends infinitely\n",
"towards the bottom and the right."
]
},
Expand Down Expand Up @@ -247,7 +247,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"For `N+1` points on any direction, the grid extends infintely in both directions"
"For `N+1` points on any direction, the grid extends infinitely in both directions"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions examples/Marks/Pyplot/GridHeatMap.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
"metadata": {},
"source": [
"By default, for `N` points along any dimension, data aligns to the `start` of the rectangles in the grid.\n",
"The grid extends infinitely in the other direction. By default, the grid extends infintely\n",
"The grid extends infinitely in the other direction. By default, the grid extends infinitely\n",
"towards the bottom and the right."
]
},
Expand Down Expand Up @@ -246,7 +246,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"For `N+1` points on any direction, the grid extends infintely in both directions"
"For `N+1` points on any direction, the grid extends infinitely in both directions"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/Tutorials/Gaussian Density Widget.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"2. Inside the class constructor call the super class constructor passing in the widgets as children\n",
"3. Register any widget callbacks inside the constructor and define callbacks as class methods\n",
"\n",
"Once the compound widget is defined in a class, it can be put in a library and used along with other interactive widgets! Compound widgets are an excellent way of building re-usable components (**using just python code**) which can be seamlessly integrated with `ipywidgets`, `bqplot` and other interactive widgets."
"Once the compound widget is defined in a class, it can be put in a library and used along with other interactive widgets! Compound widgets are an excellent way of building reusable components (**using just python code**) which can be seamlessly integrated with `ipywidgets`, `bqplot` and other interactive widgets."
]
},
{
Expand Down
5 changes: 1 addition & 4 deletions test-environment.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@ dependencies:
- pandas >=1.0.0,<2.0.0
- bqscales >=0.3.3
- scipy
- notebook
- nodejs =20
- yarn =3
# Using Notebook 6 in CI st. we can test the old nbextension
- notebook =6
- jupyterlab =4
- jupyter-packaging
- pytest
- nbval
- pytest-cov
- selenium
- flake8
- nose
- codespell
2 changes: 1 addition & 1 deletion tests/binary_serialization_test.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_dtype_with_str():
# dtype object is not supported
text = np.array(['foo', None, 'bar'])
assert text.dtype == object
with pytest.raises(ValueError, match='.*Unsupported dtype object*'), pytest.warns(UserWarning):
with pytest.raises(ValueError, match='.*Unsupported dtype object*'):
array_to_json(text)
# but if they contain all strings, it should convert them.
# This is for backward compatibility of expecting pandas dataframe
Expand Down
6 changes: 3 additions & 3 deletions ui-tests/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"private": true,
"scripts": {
"start": "jupyter lab --config jupyter_server_config.py",
"test": "npx playwright test",
"test:update": "npx playwright test --update-snapshots",
"test:debug": "PWDEBUG=1 npx playwright test"
"test": "playwright test",
"test:update": "playwright test --update-snapshots",
"test:debug": "PWDEBUG=1 playwright test"
},
"author": "bqplot",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions ui-tests/tests/bqplot.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const testCellOutputs = async (page: IJupyterLabPageFixture, tmpPath: string, th
await page.notebook.save();

for (let c = 0; c < numCellImages; ++c) {
expect(results[c]).toMatchSnapshot(getCaptureImageName(contextPrefix, notebook, c));
expect(results[c]).toMatchSnapshot(getCaptureImageName(contextPrefix, notebook, c), {threshold: 0.3});
}

await page.notebook.close(true);
Expand Down Expand Up @@ -82,7 +82,7 @@ const testPlotUpdates = async (page: IJupyterLabPageFixture, tmpPath: string, th
await page.notebook.save();

for (let i = 0; i < cellCount; i++) {
expect(results[i]).toMatchSnapshot(getCaptureImageName(contextPrefix, notebook, i));
expect(results[i]).toMatchSnapshot(getCaptureImageName(contextPrefix, notebook, i), {threshold: 0.3});
}

await page.notebook.close(true);
Expand Down
Loading

Back | FazBrowse Home | New Git URL