Thanks to visit codestin.com
Credit goes to github.com

Skip to content

restarted tests, now work from the command line #179

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

Merged
merged 97 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
dd5bc2e
restarted tests, now work from the command line
clewis7 Apr 19, 2023
97f6f9e
more tests
clewis7 Apr 19, 2023
3344414
more tests, still working on iw
clewis7 Apr 19, 2023
4fc8d57
ipywidget can only be tested w/ nbmake
clewis7 Apr 20, 2023
2c9a998
updated tests
clewis7 Apr 20, 2023
0ff0d42
support numpy fancy indexing for colors and data features (#177)
kushalkolar Apr 21, 2023
5c34539
type annotation fix for older python versions
kushalkolar May 9, 2023
4823fec
adding fancy indexing implemented in #177
clewis7 May 11, 2023
b2350f3
requested changes
clewis7 May 11, 2023
eef74ef
adding diff storage for CI pipeline usage
clewis7 May 11, 2023
9f41382
use readthedocs.yaml for doc build (#189)
kushalkolar May 13, 2023
e8c8ac5
tests changes, ready to start CI pipeline
clewis7 May 14, 2023
78cb8c7
allow for screenshots to be regenerated via os.environ key
clewis7 May 14, 2023
43f39ba
CI build
clewis7 May 14, 2023
00fd184
linux-build passes, still working on examples passing
clewis7 May 14, 2023
243e0b6
progress on CI pipeline, still need to figure out test build
clewis7 May 14, 2023
4f74c30
still failing test build, what I have for now
clewis7 May 15, 2023
9236ff1
kwargs for Plot and GridPlot to set canvas star size (#194)
kushalkolar May 17, 2023
f047452
Update ci.yml
kushalkolar May 18, 2023
0318498
Update ci.yml
kushalkolar May 18, 2023
59d33ab
Update ci.yml
kushalkolar May 18, 2023
b244c53
Delete requirements_rtd.txt
kushalkolar May 18, 2023
d2b4005
Update ci.yml
kushalkolar May 18, 2023
5862c6f
create BaseSelector, heatmap also works with LinearSelector and Linea…
kushalkolar May 21, 2023
c50beb6
add features section to docs for Graphics
kushalkolar May 21, 2023
75b2fd8
fix sync bug, arrow key movements are toggleable (#198)
kushalkolar May 21, 2023
edc1701
finishes #107, #119, #192 (#200)
kushalkolar May 21, 2023
123b3ae
more selector stuff (#199)
kushalkolar May 22, 2023
162910a
basic recording for Plot (#178)
kushalkolar May 22, 2023
3decd61
changing linux build to have python versions matrix
clewis7 May 22, 2023
f872155
working on toolbar (#195)
clewis7 May 23, 2023
12e55e0
catchup with pygfx linalg refactor (#203)
kushalkolar May 23, 2023
a75cbfd
image selector and heatmap linalg fixes (#204)
kushalkolar May 24, 2023
6712c41
add selector performance example nb
kushalkolar May 24, 2023
b4801a1
Docs build fix (#210)
kushalkolar May 25, 2023
298f387
all feature docs (#212)
kushalkolar May 26, 2023
c338964
Create examples README
kushalkolar May 27, 2023
9f7c0da
Update README
kushalkolar May 27, 2023
3c59b34
Update and rename README to README.md
kushalkolar May 27, 2023
d2c23c8
finish buttons for toolbar (#207)
clewis7 Jun 2, 2023
1b7a827
nbmake tests work
clewis7 Jun 2, 2023
fe0b8c9
updating CI file
clewis7 Jun 5, 2023
980d2a4
all tests passing locally
clewis7 Jun 6, 2023
2bece59
trying to get CI to run on ghub
clewis7 Jun 6, 2023
26749f1
change screenshots to be stored as png files
clewis7 Jun 6, 2023
40557de
restarted tests, now work from the command line
clewis7 Apr 19, 2023
086c162
more tests
clewis7 Apr 19, 2023
bd32f5b
more tests, still working on iw
clewis7 Apr 19, 2023
3ae3961
ipywidget can only be tested w/ nbmake
clewis7 Apr 20, 2023
d0ab79b
updated tests
clewis7 Apr 20, 2023
b2efe05
adding fancy indexing implemented in #177
clewis7 May 11, 2023
9a4ae2c
requested changes
clewis7 May 11, 2023
70f2e4b
adding diff storage for CI pipeline usage
clewis7 May 11, 2023
37aa0a8
tests changes, ready to start CI pipeline
clewis7 May 14, 2023
ebe121d
allow for screenshots to be regenerated via os.environ key
clewis7 May 14, 2023
3161cde
CI build
clewis7 May 14, 2023
e2c7637
linux-build passes, still working on examples passing
clewis7 May 14, 2023
94214d0
progress on CI pipeline, still need to figure out test build
clewis7 May 14, 2023
373a53d
still failing test build, what I have for now
clewis7 May 15, 2023
6244d47
Update ci.yml
kushalkolar May 18, 2023
e1ee831
Update ci.yml
kushalkolar May 18, 2023
10504e8
Update ci.yml
kushalkolar May 18, 2023
805fa87
Update ci.yml
kushalkolar May 18, 2023
aa6dadc
changing linux build to have python versions matrix
clewis7 May 22, 2023
05f21b7
nbmake tests work
clewis7 Jun 2, 2023
34ea40d
updating CI file
clewis7 Jun 5, 2023
58c3e48
all tests passing locally
clewis7 Jun 6, 2023
8102ad9
trying to get CI to run on ghub
clewis7 Jun 6, 2023
77cb69e
change screenshots to be stored as png files
clewis7 Jun 6, 2023
302c397
rebase with master and update CI
clewis7 Jun 6, 2023
d4b44c0
fixing rebase/merge issues
clewis7 Jun 6, 2023
b18b1c5
track *.png files using Git LFS
clewis7 Jun 14, 2023
42c5221
yml for regenerating screenshots, updating CI yml to not regenerate
clewis7 Jun 14, 2023
de62e04
update .gitignore and regen screenshots yml
clewis7 Jun 14, 2023
90a0e01
hopefully works
clewis7 Jun 14, 2023
5c5569d
add screenshots
clewis7 Jun 14, 2023
035d2d0
remove screenshots from git
kushalkolar Jun 14, 2023
8ee72f5
add screenshots, yet again
kushalkolar Jun 14, 2023
0950aab
setup options
kushalkolar Jun 14, 2023
81b520a
remove type annotation
kushalkolar Jun 14, 2023
4ac8cc5
change workflow to use setup optiosn
kushalkolar Jun 14, 2023
a9ee400
add pyav to setup for tests
kushalkolar Jun 14, 2023
cbaaf98
add scikit-image
kushalkolar Jun 14, 2023
493b2f5
opencv instead of pyav
kushalkolar Jun 14, 2023
5edf061
add libpng-dev
kushalkolar Jun 14, 2023
f731b09
try pillow, better work ffs
kushalkolar Jun 14, 2023
494b5af
bah
kushalkolar Jun 14, 2023
5a1c339
add git-lfs to apt install for github actions
kushalkolar Jun 14, 2023
35f5e88
add interactive again
kushalkolar Jun 14, 2023
4bed70a
install git lfs before checkout repo
kushalkolar Jun 14, 2023
a8e545f
add git lfs fetch pull
kushalkolar Jun 14, 2023
f2202c1
diffs
kushalkolar Jun 14, 2023
cba928c
diffs path
kushalkolar Jun 14, 2023
80249a7
update examples for canvas size and autoscale
kushalkolar Jun 14, 2023
4176207
remove gpu screenshots
kushalkolar Jun 14, 2023
00ed1e0
add screenshot ground truth files from github actions generated scree…
kushalkolar Jun 14, 2023
6276b28
remove interactive session stuff
kushalkolar Jun 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.png filter=lfs diff=lfs merge=lfs -text
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:

test-build:
name: Test examples
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: Test py39
pyversion: '3.9'
- name: Test py310
pyversion: '3.10'
- name: Test py311
pyversion: '3.11'
steps:
- name: Install git-lfs
run: |
sudo apt install --no-install-recommends -y git-lfs
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.pyversion }}
- name: Install llvmpipe and lavapipe for offscreen canvas
run: |
sudo apt-get update -y -qq
sudo apt-get install --no-install-recommends -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers git-lfs
- name: Install dev dependencies
run: |
python -m pip install --upgrade pip
# remove pygfx from requirements, we install a specific commit of pygfx since both fpl and pygfx are fast evolving
sed -i "/pygfx/d" ./setup.py
pip install git+https://github.com/pygfx/pygfx.git@b63f22a1aa61993c32cd96895316cb8248a81e4d
pip install -e ".["tests"]"
- name: Show wgpu backend
run:
python -c "from examples.tests.testutils import wgpu_backend; print(wgpu_backend)"
- name: fetch git lfs files
run: |
git lfs fetch --all
git lfs pull
- name: Test examples
env:
PYGFX_EXPECT_LAVAPIPE: true
run: |
pytest -v examples
pytest --nbmake notebooks/
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: screenshot-diffs
path: examples/diffs
45 changes: 45 additions & 0 deletions .github/workflows/screenshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Screenshots

on:
pull_request:
branches:
- master

jobs:
screenshots:
name: Regenerate
runs-on: 'ubuntu-latest'
steps:
- name: Install git-lfs
run: |
sudo apt install --no-install-recommends -y git-lfs
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install llvmpipe and lavapipe for offscreen canvas
run: |
sudo apt-get update -y -qq
sudo apt-get install --no-install-recommends -y libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
- name: Install dev dependencies
run: |
python -m pip install --upgrade pip
# remove pygfx from requirements, we install a specific commit of pygfx since both fpl and pygfx are fast evolving
sed -i "/pygfx/d" ./setup.py
pip install git+https://github.com/pygfx/pygfx.git@b63f22a1aa61993c32cd96895316cb8248a81e4d
pip install -e ".["tests"]"
- name: Show wgpu backend
run:
python -c "from examples.tests.testutils import wgpu_backend; print(wgpu_backend)"
- name: Test examples
env:
PYGFX_EXPECT_LAVAPIPE: true
run: |
# regenerate screenshots
REGENERATE_SCREENSHOTS=1 pytest -v examples
- uses: actions/upload-artifact@v3
if: always()
with:
name: screenshots
path: examples/screenshots/
25 changes: 25 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"
apt_packages:
- libegl1-mesa
- libgl1-mesa-dri
- libxcb-xfixes0-dev
- mesa-vulkan-drivers
- libglfw3
jobs:
pre_install:
- pip install git+https://github.com/pygfx/pygfx.git@main

sphinx:
configuration: docs/source/conf.py

python:
install:
- method: pip
path: .
extra_requirements:
- docs
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Questions, ideas? Post an issue or [chat on gitter](https://gitter.im/fastplotli

**See the examples directory. Start out with `simple.ipynb`.**

**IMPORTANT NOTE: If you install `fastplotlib` and `pygfx` from `pypi` (i.e. pip install pygfx), you will need to use the examples from this commit until `pygfx` publishes a new release to `pypi`: https://github.com/kushalkolar/fastplotlib/tree/f872155eb687b18e3cc9b3b720eb9e241a9f974c/examples .**
The current examples will work if you installed `fastplotlib` and `pygfx` directly from github.

### Neuroscience usecase demonstrating some of fastplotlib's capabilities

https://user-images.githubusercontent.com/9403332/210304485-e554b648-50b4-4243-b292-a9ed30514a2d.mp4
Expand Down
81 changes: 81 additions & 0 deletions docs/source/api/graphic_features.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
.. _api_graphic_features:

Graphic Features
****************

Image
#####

.. autoclass:: fastplotlib.graphics.features.ImageDataFeature
:members:
:inherited-members:
:exclude-members: __init__
:no-undoc-members:

.. autoclass:: fastplotlib.graphics.features.ImageCmapFeature
:members:
:inherited-members:
:exclude-members: __init__
:no-undoc-members:

Heatmap
#######

.. autoclass:: fastplotlib.graphics.features.HeatmapDataFeature
:members:
:inherited-members:
:exclude-members: __init__
:no-undoc-members:

.. autoclass:: fastplotlib.graphics.features.HeatmapCmapFeature
:members:
:inherited-members:
:exclude-members: __init__
:no-undoc-members:

Line
####

.. autoclass:: fastplotlib.graphics.features.PositionsDataFeature
:members:
:inherited-members:
:exclude-members: __init__
:no-undoc-members:

.. autoclass:: fastplotlib.graphics.features.ColorsFeature
:members:
:inherited-members:
:exclude-members: __init__
:no-undoc-members:

.. autoclass:: fastplotlib.graphics.features.ThicknessFeature
:members:
:inherited-members:
:exclude-members: __init__
:no-undoc-members:

Scatter
#######

.. autoclass:: fastplotlib.graphics.features.PositionsDataFeature
:members:
:inherited-members:
:exclude-members: __init__
:no-undoc-members:

.. autoclass:: fastplotlib.graphics.features.ColorsFeature
:members:
:inherited-members:
:exclude-members: __init__
:no-undoc-members:

Common
######

Features common to all graphics

.. autoclass:: fastplotlib.graphics.features.PresentFeature
:members:
:inherited-members:
:exclude-members: __init__
:no-undoc-members:
9 changes: 1 addition & 8 deletions docs/source/api/graphics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,11 @@ Line Stack
.. autoclass:: fastplotlib.graphics.line_collection.LineStack
:members:
:inherited-members:

Line Slider
###########

.. autoclass:: fastplotlib.graphics.line_slider.LineSlider
:members:
:inherited-members:

Heatmap
#######

.. autoclass:: fastplotlib.graphics.heatmap.HeatmapGraphic
.. autoclass:: fastplotlib.graphics.image.HeatmapGraphic
:members:
:inherited-members:

Expand Down
15 changes: 15 additions & 0 deletions docs/source/api/selectors.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.. _api_selectors:

Selectors
*********

Linear
######

.. autoclass:: fastplotlib.graphics.selectors.LinearSelector
:members:
:inherited-members:

.. autoclass:: fastplotlib.graphics.selectors.LinearRegionSelector
:members:
:inherited-members:
8 changes: 5 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ["sphinx.ext.napoleon", "sphinx.ext.autodoc"]
autodoc_typehints = "description"

templates_path = ['_templates']
exclude_patterns = []


napoleon_custom_sections = ['Features']

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
Expand All @@ -32,9 +31,12 @@

html_static_path = ['_static']

autodoc_member_order = 'bysource'
autodoc_member_order = 'groupwise'
autoclass_content = "both"

autodoc_typehints = "description"
autodoc_typehints_description_target = "documented_params"

def _setup_navbar_side_toctree(app: Any):

def add_class_toctree_function(app: Any, pagename: Any, templatename: Any, context: Any, doctree: Any):
Expand Down
2 changes: 2 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Welcome to fastplotlib's documentation!
Subplot <api/subplot>
Gridplot <api/gridplot>
Graphics <api/graphics>
Graphic Features <api/graphic_features>
Selectors <api/selectors>
Widgets <api/widgets>

Summary
Expand Down
6 changes: 6 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Examples

**IMPORTANT NOTE: If you install `fastplotlib` and `pygfx` from `pypi`, i.e. `pip install pygfx`, you will need to use the examples from the following commit until `pygfx` publishes a new release to `pypi`: https://github.com/kushalkolar/fastplotlib/tree/f872155eb687b18e3cc9b3b720eb9e241a9f974c/examples .
The current examples will work if you installed `fastplotlib` and `pygfx` directly from github**

Both `fastplotlib` and `pygfx` are rapidly evolving libraries, and we try to closely track `pygfx`.
Loading