From f70efe8728f0e64492250e2e2ce47473d414b384 Mon Sep 17 00:00:00 2001 From: "Oriol (ZBook)" Date: Thu, 1 Aug 2024 23:37:07 +0200 Subject: [PATCH 1/2] pre-commit autoupdate --- .pre-commit-config.yaml | 6 +++--- examples/ode_models/ODE_with_manual_gradients.ipynb | 6 +++--- examples/ode_models/ODE_with_manual_gradients.myst.md | 6 +++--- examples/samplers/samplers_mvnormal.py | 1 - scripts/rerun.py | 1 + sphinxext/thumbnail_extractor.py | 1 + 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cb256a7d1..c47cffe92 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,11 +3,11 @@ ci: repos: - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 24.4.2 hooks: - id: black-jupyter - repo: https://github.com/nbQA-dev/nbQA - rev: 1.7.0 + rev: 1.8.5 hooks: - id: nbqa-isort additional_dependencies: [isort==5.6.4] @@ -99,7 +99,7 @@ repos: language: pygrep types_or: [markdown, rst, jupyter] - repo: https://github.com/mwouts/jupytext - rev: v1.15.1 + rev: v1.16.4b hooks: - id: jupytext files: ^examples/.+\.ipynb$ diff --git a/examples/ode_models/ODE_with_manual_gradients.ipynb b/examples/ode_models/ODE_with_manual_gradients.ipynb index d3aa0a67f..d5062af4b 100644 --- a/examples/ode_models/ODE_with_manual_gradients.ipynb +++ b/examples/ode_models/ODE_with_manual_gradients.ipynb @@ -189,9 +189,9 @@ " ret = np.zeros(\n", " (self._n_states, self._n_odeparams + self._n_ivs)\n", " ) # except the following entries\n", - " ret[\n", - " 0, 0\n", - " ] = X # \\frac{\\partial [\\alpha X - \\beta XY]}{\\partial \\alpha}, and so on...\n", + " ret[0, 0] = (\n", + " X # \\frac{\\partial [\\alpha X - \\beta XY]}{\\partial \\alpha}, and so on...\n", + " )\n", " ret[0, 1] = -X * Y\n", " ret[1, 2] = -Y\n", " ret[1, 3] = X * Y\n", diff --git a/examples/ode_models/ODE_with_manual_gradients.myst.md b/examples/ode_models/ODE_with_manual_gradients.myst.md index 18f93de97..5e1bf8d2d 100644 --- a/examples/ode_models/ODE_with_manual_gradients.myst.md +++ b/examples/ode_models/ODE_with_manual_gradients.myst.md @@ -157,9 +157,9 @@ class LotkaVolterraModel: ret = np.zeros( (self._n_states, self._n_odeparams + self._n_ivs) ) # except the following entries - ret[ - 0, 0 - ] = X # \frac{\partial [\alpha X - \beta XY]}{\partial \alpha}, and so on... + ret[0, 0] = ( + X # \frac{\partial [\alpha X - \beta XY]}{\partial \alpha}, and so on... + ) ret[0, 1] = -X * Y ret[1, 2] = -Y ret[1, 3] = X * Y diff --git a/examples/samplers/samplers_mvnormal.py b/examples/samplers/samplers_mvnormal.py index b219356e1..726bc8785 100644 --- a/examples/samplers/samplers_mvnormal.py +++ b/examples/samplers/samplers_mvnormal.py @@ -6,7 +6,6 @@ normalized effective sampling rates. """ - import time import arviz as az diff --git a/scripts/rerun.py b/scripts/rerun.py index 2c817f2e3..cd0362b77 100644 --- a/scripts/rerun.py +++ b/scripts/rerun.py @@ -14,6 +14,7 @@ python scripts/rerun.py --fp_notebook=examples/case_studies/BEST.ipynb --commit_to=rerun-best --push_to=mine ``` """ + import argparse import logging import pathlib diff --git a/sphinxext/thumbnail_extractor.py b/sphinxext/thumbnail_extractor.py index fb83b4413..cdef70ec3 100644 --- a/sphinxext/thumbnail_extractor.py +++ b/sphinxext/thumbnail_extractor.py @@ -3,6 +3,7 @@ Modified from the seaborn project, which modified the mpld3 project. """ + import base64 import json import os From 14c73c1fb3a63f236b5a4b9b9c915ce1e8d73271 Mon Sep 17 00:00:00 2001 From: "Oriol (ZBook)" Date: Sat, 3 Aug 2024 01:03:47 +0200 Subject: [PATCH 2/2] update pre-commit config --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c47cffe92..e01e75830 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -99,7 +99,7 @@ repos: language: pygrep types_or: [markdown, rst, jupyter] - repo: https://github.com/mwouts/jupytext - rev: v1.16.4b + rev: v1.16.3 hooks: - id: jupytext files: ^examples/.+\.ipynb$