From d6e02f9bd51ced6aa1d39f94b8aa32db47c3fb1e Mon Sep 17 00:00:00 2001 From: Nicholas Junge Date: Mon, 4 Mar 2024 09:15:09 +0100 Subject: [PATCH] Run `pre-commit autoupdate`, upgrade requirement lockfiles Bumps ruff from v0.2.2 -> v0.3.0, incurring some formatting changes. --- .pre-commit-config.yaml | 2 +- requirements-dev.txt | 4 ++-- requirements-docs.txt | 14 +++++++------- src/nnbench/context.py | 1 + src/nnbench/core.py | 6 ++---- src/nnbench/io/__init__.py | 0 src/nnbench/reporter/__init__.py | 1 + src/nnbench/runner.py | 1 + src/nnbench/types.py | 1 + src/nnbench/util.py | 1 + 10 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 src/nnbench/io/__init__.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 064bae65..707632b9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: types_or: [ python, pyi ] args: [--ignore-missing-imports, --explicit-package-bases] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.2 + rev: v0.3.0 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/requirements-dev.txt b/requirements-dev.txt index 473fe8d8..643c75a0 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,7 +4,7 @@ # # pip-compile --extra=dev --no-annotate --output-file=requirements-dev.txt pyproject.toml # -build==1.0.3 +build==1.1.1 cfgv==3.4.0 distlib==0.3.8 filelock==3.13.1 @@ -19,7 +19,7 @@ pre-commit==3.6.2 psutil==5.9.8 pyarrow==15.0.0 pyproject-hooks==1.0.0 -pytest==8.0.2 +pytest==8.1.0 pyyaml==6.0.1 tabulate==0.9.0 virtualenv==20.25.1 diff --git a/requirements-docs.txt b/requirements-docs.txt index 0e8a64a1..7c6a3280 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -14,7 +14,7 @@ colorama==0.4.6 essentials==1.1.5 essentials-openapi==1.0.9 ghp-import==2.1.0 -griffe==0.40.1 +griffe==0.41.2 h11==0.14.0 httpcore==1.0.4 httpx==0.27.0 @@ -29,15 +29,15 @@ mdurl==0.1.2 mergedeep==1.3.4 mike==2.0.0 mkdocs==1.5.3 -mkdocs-autorefs==0.5.0 -mkdocs-callouts==1.13.0 +mkdocs-autorefs==1.0.1 +mkdocs-callouts==1.13.1 mkdocs-gen-files==0.5.0 mkdocs-include-dir-to-nav==1.2.0 mkdocs-literate-nav==0.6.1 -mkdocs-material==9.5.11 +mkdocs-material==9.5.12 mkdocs-material-extensions==1.3.1 mkdocs-section-index==0.3.8 -mkdocstrings[python]==0.24.0 +mkdocstrings[python]==0.24.1 mkdocstrings-python==1.8.0 mypy-extensions==1.0.0 neoteroi-mkdocs==1.0.5 @@ -48,12 +48,12 @@ platformdirs==4.2.0 pygments==2.17.2 pymdown-extensions==10.7 pyparsing==3.1.1 -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 pyyaml==6.0.1 pyyaml-env-tag==0.1 regex==2023.12.25 requests==2.31.0 -rich==13.7.0 +rich==13.7.1 six==1.16.0 sniffio==1.3.1 tabulate==0.9.0 diff --git a/src/nnbench/context.py b/src/nnbench/context.py index 8ccd371e..63578e55 100644 --- a/src/nnbench/context.py +++ b/src/nnbench/context.py @@ -1,4 +1,5 @@ """Utilities for collecting context key-value pairs as metadata in benchmark runs.""" + from __future__ import annotations import itertools diff --git a/src/nnbench/core.py b/src/nnbench/core.py index 162200b3..5ead984c 100644 --- a/src/nnbench/core.py +++ b/src/nnbench/core.py @@ -63,8 +63,7 @@ def benchmark( setUp: Callable[..., None] = NoOp, tearDown: Callable[..., None] = NoOp, tags: tuple[str, ...] = (), -) -> Callable[[Callable], Benchmark]: - ... +) -> Callable[[Callable], Benchmark]: ... # Case #2: Application with arguments @@ -78,8 +77,7 @@ def benchmark( setUp: Callable[..., None] = NoOp, tearDown: Callable[..., None] = NoOp, tags: tuple[str, ...] = (), -) -> Benchmark: - ... +) -> Benchmark: ... def benchmark( diff --git a/src/nnbench/io/__init__.py b/src/nnbench/io/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/nnbench/reporter/__init__.py b/src/nnbench/reporter/__init__.py index 7b08b416..e22f9f74 100644 --- a/src/nnbench/reporter/__init__.py +++ b/src/nnbench/reporter/__init__.py @@ -1,6 +1,7 @@ """ A lightweight interface for refining, displaying, and streaming benchmark results to various sinks. """ + from __future__ import annotations from .base import BenchmarkReporter diff --git a/src/nnbench/runner.py b/src/nnbench/runner.py index fb1d6464..5e5d325b 100644 --- a/src/nnbench/runner.py +++ b/src/nnbench/runner.py @@ -1,4 +1,5 @@ """The abstract benchmark runner interface, which can be overridden for custom benchmark workloads.""" + from __future__ import annotations import contextlib diff --git a/src/nnbench/types.py b/src/nnbench/types.py index 4fe5fae0..ac9ce771 100644 --- a/src/nnbench/types.py +++ b/src/nnbench/types.py @@ -1,4 +1,5 @@ """Useful type interfaces to override/subclass in benchmarking workflows.""" + from __future__ import annotations import copy diff --git a/src/nnbench/util.py b/src/nnbench/util.py index a784508c..d36f2859 100644 --- a/src/nnbench/util.py +++ b/src/nnbench/util.py @@ -1,4 +1,5 @@ """Various utilities related to benchmark collection, filtering, and more.""" + from __future__ import annotations import importlib