Skip to content

Commit

Permalink
more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Jun 15, 2024
1 parent d237062 commit ef08e19
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: tlambert03/setup-qt-libs@v1
- uses: pyvista/setup-headless-display-action@v2
with:
qt: true

- if: runner.os == 'Linux'
run: sudo apt-get install -y libxcb-xinput0

- uses: actions/setup-python@v4
with:
Expand All @@ -50,7 +52,22 @@ jobs:
python -m pip install .[test,pyqt]
- name: 🧪 Run Tests
run: pytest --color=yes --cov --cov-report=xml --cov-report=term-missing
run: coverage run -p -m pytest --color=yes

- name: Generate UUID
shell: bash
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
echo "UUID=$(powershell -Command "[guid]::NewGuid().ToString()")" >> $GITHUB_ENV
else
echo "UUID=$(uuidgen)" >> $GITHUB_ENV
fi
- name: Upload coverage data
uses: actions/upload-artifact@v4
with:
name: covreport-${{ matrix.platform }}-py${{ matrix.python-version }}-${{ env.UUID }}
path: ./.coverage*

test-array-libs:
uses: pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@v2
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ test = [
"ndv[vispy,pygfx]",
"dask[array]",
"imageio[tifffile]",
"pytest-cov",
"pytest-qt",
"pytest",
]
Expand Down
6 changes: 6 additions & 0 deletions src/ndv/viewer/_data_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

import atexit
import logging
import sys
from abc import abstractmethod
Expand Down Expand Up @@ -61,6 +62,11 @@ def __gt__(self, other: _T_contra, /) -> bool: ...
_EXECUTOR = ThreadPoolExecutor(max_workers=2)


@atexit.register
def _cleanup_executor() -> None:
_EXECUTOR.shutdown(wait=True, cancel_futures=True)


def _recurse_subclasses(cls: _T) -> Iterator[_T]:
for subclass in cls.__subclasses__():
yield subclass
Expand Down

0 comments on commit ef08e19

Please sign in to comment.