Skip to content

Commit

Permalink
Merge pull request #21 from ComputationalPhysiology/pre-commit-ci-upd…
Browse files Browse the repository at this point in the history
…ate-config

[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
finsberg authored Jul 10, 2024
2 parents d92ba2f + 5b9046f commit b3ec87f
Show file tree
Hide file tree
Showing 22 changed files with 276 additions and 268 deletions.
42 changes: 17 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,37 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-docstring-first
- id: debug-statements
- id: requirements-txt-fixer

- repo: https://github.com/asottile/reorder_python_imports
rev: v3.9.0
hooks:
- id: reorder-python-imports
- id: check-toml

- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.5.0'
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format

- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0
rev: v3.1.0
hooks:
- id: add-trailing-comma

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.2.0
hooks:
- id: setup-cfg-fmt

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
rev: v1.10.1
hooks:
- id: mypy

- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
rev: 0.7.1
hooks:
- id: nbstripout
1 change: 1 addition & 0 deletions benchmark/dimetrodon.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
https://github.com/opencv/opencv_contrib/blob/master/modules/optflow/samples/optical_flow_benchmark.py
"""

from pathlib import Path

import cv2
Expand Down
42 changes: 21 additions & 21 deletions docs/features.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "39d1412a",
"id": "0",
"metadata": {},
"source": [
"# Features\n",
Expand All @@ -15,7 +15,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "1a4c5dfe",
"id": "1",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -34,7 +34,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5cee0000",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -46,7 +46,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b7818ccd",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -55,7 +55,7 @@
},
{
"cell_type": "markdown",
"id": "4899de0e",
"id": "4",
"metadata": {},
"source": [
"And let us compute a velocity and displacement trace. First we create an optical flow object"
Expand All @@ -64,7 +64,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ff496192",
"id": "5",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -73,7 +73,7 @@
},
{
"cell_type": "markdown",
"id": "7ddfb88f",
"id": "6",
"metadata": {},
"source": [
"Then we compute the velocity"
Expand All @@ -82,7 +82,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "db9941d8",
"id": "7",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -93,7 +93,7 @@
},
{
"cell_type": "markdown",
"id": "4c4c7acc",
"id": "8",
"metadata": {},
"source": [
"and the mean velocity norm"
Expand All @@ -102,7 +102,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "67727c49",
"id": "9",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -111,7 +111,7 @@
},
{
"cell_type": "markdown",
"id": "7b839ba1",
"id": "10",
"metadata": {},
"source": [
"And now we estimate the reference frame"
Expand All @@ -120,7 +120,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "48a05765",
"id": "11",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -135,7 +135,7 @@
},
{
"cell_type": "markdown",
"id": "14d0cf14",
"id": "12",
"metadata": {},
"source": [
"And finally compute the displacement"
Expand All @@ -144,7 +144,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e1f18bdc",
"id": "13",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -153,7 +153,7 @@
},
{
"cell_type": "markdown",
"id": "c4bfd6cb",
"id": "14",
"metadata": {},
"source": [
"and compute the mean displacement norm"
Expand All @@ -162,7 +162,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "929dac85",
"id": "15",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -171,7 +171,7 @@
},
{
"cell_type": "markdown",
"id": "5d13cee6",
"id": "16",
"metadata": {},
"source": [
"Let us now plot the two traces"
Expand All @@ -180,7 +180,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "dc5993d5",
"id": "17",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -192,7 +192,7 @@
},
{
"cell_type": "markdown",
"id": "3497b3ac",
"id": "18",
"metadata": {},
"source": [
"Let us extract the first beat and plot the different features"
Expand All @@ -201,7 +201,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8e6ecca1",
"id": "19",
"metadata": {
"tags": [
"hide-input"
Expand Down Expand Up @@ -401,7 +401,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8ab7710a",
"id": "20",
"metadata": {},
"outputs": [],
"source": [
Expand Down
4 changes: 2 additions & 2 deletions docs/gui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"attachments": {},
"cell_type": "markdown",
"id": "41a80a2a",
"id": "0",
"metadata": {},
"source": [
"(gui)=\n",
Expand All @@ -27,7 +27,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d60b3d08",
"id": "1",
"metadata": {
"tags": [
"hide-input"
Expand Down
Loading

0 comments on commit b3ec87f

Please sign in to comment.