Skip to content

Commit

Permalink
Merge pull request #278 from ssciwr/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
lkeegan authored Oct 8, 2024
2 parents d866c08 + 11c193f commit 8a014de
Show file tree
Hide file tree
Showing 21 changed files with 38 additions and 17 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
psychopy-version: ["latest"]
# additional regression tests using older versions of psychopy
include:
- os: "ubuntu-22.04"
python-version: "3.10"
psychopy-version: "2024.2.1"
- os: "ubuntu-22.04"
python-version: "3.10"
psychopy-version: "2024.1.4"
Expand Down Expand Up @@ -56,7 +59,7 @@ jobs:
# various psychopy & qt system dependencies
sudo apt-get update -yy && sudo apt-get install -yy libasound2-dev portaudio19-dev libpulse-dev libusb-1.0-0-dev libsndfile1-dev libportmidi-dev liblo-dev libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-2.0-0 freeglut3-dev scrot libnotify-dev pandoc libglu1-mesa-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxkbcommon-dev libxkbcommon-x11-dev '^libxcb.*-dev' gnome-screenshot
# install pre-built ubuntu/gtk3 wxPython wheel
uv pip install --system -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/${{ matrix.os }}/ wxPython
uv pip install --system -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/${{ matrix.os }}/ wxPython==4.2.1
# enable colours in logs
echo "FORCE_COLOR=1" >> $GITHUB_ENV
echo "TERM=xterm-256color" >> $GITHUB_ENV
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand All @@ -10,7 +10,7 @@ repos:
- id: check-toml

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
rev: v0.6.9
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
Expand All @@ -32,13 +32,13 @@ repos:
- "prettier-plugin-toml"

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.6
rev: 0.29.3
hooks:
- id: check-github-workflows
- id: check-readthedocs

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
rev: v1.11.2
hooks:
- id: mypy
additional_dependencies: [numpy, PyQt5-stubs, types-requests]
Expand All @@ -51,7 +51,7 @@ repos:
]

- repo: https://github.com/rhysd/actionlint
rev: "v1.7.1"
rev: "v1.7.3"
hooks:
- id: actionlint

Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ build:
# install attrdict as this may be used in wxPython setup.py
- python -m pip install attrdict
# install pre-built ubuntu/gtk3 wxPython wheel
- python -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04/ wxPython
- python -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04/ wxPython==4.2.1
# check if any required system libs are missing by trying to import it
- python -c "import wx"
# create virtual display for pyglet
Expand Down
1 change: 1 addition & 0 deletions benchmarks/profile_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import ctypes

from psychopy import core

from vstt.experiment import Experiment
from vstt.task import MotorTask

Expand Down
1 change: 1 addition & 0 deletions docs/notebooks/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"source": [
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"\n",
"import vstt"
]
},
Expand Down
3 changes: 2 additions & 1 deletion docs/notebooks/path_and_velocity.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
"import ipywidgets as widgets\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import vstt\n",
"from ipywidgets import interact\n",
"from scipy.signal import savgol_filter\n",
"\n",
"import vstt\n",
"from vstt.stats import get_velocity"
]
},
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import pytest
from psychopy.gui.qtgui import ensureQtApp
from psychopy.visual.window import Window

from vstt.experiment import Experiment
from vstt.geom import points_on_circle
from vstt.stats import stats_dataframe
Expand Down
1 change: 1 addition & 0 deletions tests/test_display.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import pytest

import vstt


Expand Down
3 changes: 2 additions & 1 deletion tests/test_display_widget.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from __future__ import annotations

import qt_test_utils as qtu
import vstt
from psychopy.visual.window import Window

import vstt
from vstt.display_widget import DisplayOptionsWidget
from vstt.experiment import Experiment

Expand Down
1 change: 1 addition & 0 deletions tests/test_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pandas as pd
import pytest
from psychopy.data import TrialHandlerExt

from vstt.display import default_display_options
from vstt.experiment import Experiment
from vstt.meta import default_metadata
Expand Down
3 changes: 2 additions & 1 deletion tests/test_geom.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from __future__ import annotations

import numpy as np
import vstt
from pytest import approx

import vstt


def test_equidistant_angles() -> None:
assert np.allclose(vstt.geom.equidistant_angles(1) / np.pi, [0])
Expand Down
3 changes: 2 additions & 1 deletion tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
from typing import Any

import qt_test_utils as qtu
import vstt
from pytest import MonkeyPatch
from qtpy.QtWidgets import QFileDialog
from qtpy.QtWidgets import QInputDialog

import vstt
from vstt.experiment import Experiment
from vstt.gui import Gui

Expand Down
1 change: 1 addition & 0 deletions tests/test_joystick_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from psychopy.hardware import joystick
from psychopy.visual.window import Window

from vstt import joystick_wrapper


Expand Down
3 changes: 2 additions & 1 deletion tests/test_meta_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

import gui_test_utils as gtu
import qt_test_utils as qtu
import vstt
from psychopy.visual.window import Window
from pytest import approx
from qtpy import QtWidgets

import vstt
from vstt.experiment import Experiment
from vstt.meta_widget import MetadataWidget

Expand Down
1 change: 1 addition & 0 deletions tests/test_results_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from psychopy.visual.window import Window
from pytest import MonkeyPatch
from qtpy.QtWidgets import QFileDialog

from vstt.experiment import Experiment
from vstt.results_widget import ResultsWidget

Expand Down
1 change: 1 addition & 0 deletions tests/test_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import math

import numpy as np

import vstt
from vstt.experiment import Experiment

Expand Down
3 changes: 2 additions & 1 deletion tests/test_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
import numpy as np
import pyautogui
import pytest
import vstt
from psychopy.visual.window import Window

import vstt
from vstt.experiment import Experiment
from vstt.geom import points_on_circle
from vstt.task import MotorTask
Expand Down
3 changes: 2 additions & 1 deletion tests/test_trial.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from __future__ import annotations

import vstt
from pytest import approx

import vstt


def test_describe_trial() -> None:
trial = vstt.trial.default_trial()
Expand Down
3 changes: 2 additions & 1 deletion tests/test_trials_widget.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from __future__ import annotations

import qt_test_utils as qtu
import vstt
from psychopy.visual.window import Window

import vstt
from vstt.experiment import Experiment
from vstt.trials_widget import TrialsWidget

Expand Down
3 changes: 2 additions & 1 deletion tests/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

import sys

import vstt
from pytest import MonkeyPatch

import vstt
from vstt.update import check_for_new_version
from vstt.update import do_pip_upgrade

Expand Down
3 changes: 2 additions & 1 deletion tests/test_vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
import gui_test_utils as gtu
import numpy as np
import pytest
import vstt
from psychopy.visual.window import Window
from pytest import approx

import vstt
from vstt.experiment import Experiment


Expand Down

0 comments on commit 8a014de

Please sign in to comment.