diff --git a/.github/workflows/tests-notebook-7.yml b/.github/workflows/tests-notebook-7.yml deleted file mode 100644 index 82c88e9..0000000 --- a/.github/workflows/tests-notebook-7.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Tests - notebook 7 - -on: - push: - branches: [main] - pull_request: - # Check all PR - -jobs: - tests: - runs-on: ${{ matrix.os }} - strategy: - matrix: - include: - - os: ubuntu-22.04 - python-version: "3.11" - - steps: - - uses: actions/checkout@v3 - - name: Install Firefox - uses: browser-actions/setup-firefox@latest - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - run: pip install tox - - - name: run Python tests - run: tox -e tests-notebook-7 - - - name: run Python tests for coverage - run: tox -e coverage - - uses: codecov/codecov-action@v3 - with: - files: coverage.xml - verbose: true - diff --git a/pyproject.toml b/pyproject.toml index ff9c04c..a4da607 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,8 +29,8 @@ classifiers = [ ] dependencies = [ "ipywidgets>=8.0.0", - "numpy", - "widget_code_input", + "numpy<2.0.0", + "widget_code_input<4.0.0", "matplotlib", "termcolor" ] diff --git a/src/scwidgets/check/_widget_check_registry.py b/src/scwidgets/check/_widget_check_registry.py index 582239a..ccdba22 100644 --- a/src/scwidgets/check/_widget_check_registry.py +++ b/src/scwidgets/check/_widget_check_registry.py @@ -250,9 +250,9 @@ def check_widget(self, widget: CheckableWidget) -> Union[ChecksResult, Exception def check_all_widgets( self, ) -> OrderedDict[CheckableWidget, Union[ChecksResult, Exception]]: - messages: OrderedDict[ - CheckableWidget, Union[ChecksResult, Exception] - ] = OrderedDict() + messages: OrderedDict[CheckableWidget, Union[ChecksResult, Exception]] = ( + OrderedDict() + ) for widget in self._checks.keys(): try: messages[widget] = self.check_widget(widget) diff --git a/src/scwidgets/exercise/_widget_code_exercise.py b/src/scwidgets/exercise/_widget_code_exercise.py index 79dd625..17283a0 100644 --- a/src/scwidgets/exercise/_widget_code_exercise.py +++ b/src/scwidgets/exercise/_widget_code_exercise.py @@ -445,9 +445,11 @@ def __init__( def answer(self) -> dict: return { "code": None if self._code is None else self._code.function_body, - "parameter_panel": None - if self._parameter_panel is None - else self._parameter_panel.parameters, + "parameter_panel": ( + None + if self._parameter_panel is None + else self._parameter_panel.parameters + ), } @answer.setter diff --git a/tox.ini b/tox.ini index bedf882..a4f101c 100644 --- a/tox.ini +++ b/tox.ini @@ -11,38 +11,6 @@ envlist = [testenv] -[testenv:tests-notebook-7] -description = - Tests with jupyter notebook version > 7 -setenv = - # this is needed to run selenium on a machine without display to do CI - SELENIUM_FIREFOX_DRIVER_ARGS = {env:SELENIUM_FIREFOX_DRIVER_ARGS:--headless} - JUPYTER_TYPE = notebook - # use the jupyter config in the tox environment - # otherwise the users config is used - JUPYTER_CONFIG_DIR={envdir}/etc/jupyter - JUPYTER_DATA_DIR={envdir}/share/jupyter -deps = - pytest - pytest-html<4.0.0, - # selenium juypter notebook tests - notebook==7.0.2 - # fixing selenium version to have backwards-compatibility with pytest-selenium - # see https://github.com/robotframework/SeleniumLibrary/issues/1835#issuecomment-1581426365 - selenium==4.9.0 - pytest-selenium - jupytext==1.15.0 - imageio - # we fix matplotlib for consistent image tests - matplotlib==3.7.2 - numpy - scikit-image - ipympl -commands = - # converts the python files to ipython notebooks - jupytext tests/notebooks/*.py --to ipynb - pytest {posargs:-v} --driver Firefox - [testenv:tests-lab-3] description = Tests with jupyter lab version < 4 @@ -55,7 +23,7 @@ setenv = JUPYTER_CONFIG_DIR={envdir}/etc/jupyter JUPYTER_DATA_DIR={envdir}/share/jupyter deps = - pytest + pytest<8.0.0 pytest-html<4.0.0, # selenium juypter notebook tests jupyterlab==3.6.5 @@ -67,7 +35,7 @@ deps = imageio # we fix matplotlib for consistent image tests matplotlib==3.7.2 - numpy + numpy<2.0.0 scikit-image ipympl commands = @@ -80,7 +48,7 @@ commands = # includes the jupytext notebook files, because coverage is incompatible with # selenium deps = - pytest + pytest<8.0.0 pytest-cov coverage[toml] selenium==4.9.0