Skip to content

Commit

Permalink
refactor: update GitHub actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sdoose committed Jul 14, 2023
1 parent 644ac89 commit e51d730
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ name: CI

on:
push:
branches:
- all
tags:
- "v*"
workflow_dispatch:
Expand Down Expand Up @@ -71,7 +73,7 @@ jobs:
# this will run when you have tagged a commit, starting with "v*"
# and requires that you have put your twine API key in your
# github secrets
needs: [test]
needs: [check]
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
steps:
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/test_matrix_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,9 @@ jobs:
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git
powershell gl-ci-helpers/appveyor/install_opengl.ps1
- name: Install dependencies
- name: "Install napari-locan and dependencies"
run: |
python -m pip install --upgrade pip
python -m pip install setuptools tox tox-gh-actions
# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
uses: aganders3/headless-gui@v1
with:
run: python -m tox
env:
PLATFORM: ${{ matrix.platform }}
python -m pip install .[test]
- name: "Run tests"
run: pytest
4 changes: 2 additions & 2 deletions src/napari_locan/_sample_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def make_image_tubulin() -> list[LayerData]:
Generate a sample image from `locan.datasets.load_tubulin`.
"""
locdata = lc.datasets.load_tubulin()
data, bins, labels = lc.histogram(locdata, bin_size=10)
data, bins, labels = lc.histogram(locdata, bin_size=10, bin_range="zero")
data = lc.adjust_contrast(data, rescale=lc.Trafo.EQUALIZE_0P3)
napari.utils.notifications.show_info("message")
return [(data, {"name": "tubulin", "colormap": "gray"}, "image")]
Expand All @@ -32,7 +32,7 @@ def make_image_npc() -> list[LayerData]:
Generate a sample image from `locan.datasets.load_npc`.
"""
locdata = lc.datasets.load_npc()
data, bins, labels = lc.histogram(locdata, bin_size=10)
data, bins, labels = lc.histogram(locdata, bin_size=10, bin_range="zero")
data = lc.adjust_contrast(data, rescale=lc.Trafo.EQUALIZE_0P3)
return [(data, {"name": "npc", "colormap": "gray"}, "image")]

Expand Down

0 comments on commit e51d730

Please sign in to comment.