From 6428eb3d8ef07e72b4136331fb47482235216342 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 19:45:48 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0) - [github.com/psf/black: 23.3.0 → 24.2.0](https://github.com/psf/black/compare/23.3.0...24.2.0) - [github.com/adrienverge/yamllint.git: v1.31.0 → v1.35.1](https://github.com/adrienverge/yamllint.git/compare/v1.31.0...v1.35.1) - [github.com/kynan/nbstripout: 0.6.1 → 0.7.1](https://github.com/kynan/nbstripout/compare/0.6.1...0.7.1) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4d2f1037..518b51e4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: trailing-whitespace - id: check-docstring-first @@ -25,12 +25,12 @@ repos: - id: end-of-file-fixer - id: sort-simple-yaml - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 24.2.0 hooks: - id: black args: ['--line-length=119'] - repo: https://github.com/adrienverge/yamllint.git - rev: v1.31.0 + rev: v1.35.1 hooks: - id: yamllint name: yamllint @@ -39,6 +39,6 @@ repos: language: python types: [file, yaml] - repo: https://github.com/kynan/nbstripout - rev: 0.6.1 + rev: 0.7.1 hooks: - id: nbstripout From f095515148e2f48231951015c15de1b92baab1eb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 19:45:57 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/imars3d/__init__.py | 1 + src/imars3d/backend/__init__.py | 1 + src/imars3d/backend/__main__.py | 1 + src/imars3d/backend/dataio/__init__.py | 1 + tests/unit/backend/corrections/test_beam_hardening.py | 1 + tests/unit/backend/workflow/test_engine.py | 4 ++++ 6 files changed, 9 insertions(+) diff --git a/src/imars3d/__init__.py b/src/imars3d/__init__.py index 258b31cc..bd2bb990 100644 --- a/src/imars3d/__init__.py +++ b/src/imars3d/__init__.py @@ -1,4 +1,5 @@ """iMars3D: a Python package for neutron imaging and tomography reconstruction.""" + import logging from .backend import corrections, diagnostics, dataio, morph, preparation, reconstruction # noqa: F401 diff --git a/src/imars3d/backend/__init__.py b/src/imars3d/backend/__init__.py index 32eb910d..73aa9f60 100644 --- a/src/imars3d/backend/__init__.py +++ b/src/imars3d/backend/__init__.py @@ -1,4 +1,5 @@ """iMars3D's backend packages: the core of the application.""" + from .autoredux import auto_reduction_ready # noqa: F401 from .autoredux import load_template_config # noqa: F401 from .autoredux import extract_info_from_path # noqa: F401 diff --git a/src/imars3d/backend/__main__.py b/src/imars3d/backend/__main__.py index 6ebb9af1..81cad682 100644 --- a/src/imars3d/backend/__main__.py +++ b/src/imars3d/backend/__main__.py @@ -9,6 +9,7 @@ The built-in help will give the options when supplied a ``--help`` flag. """ + from imars3d.backend.workflow.engine import WorkflowEngineAuto import logging from pathlib import Path diff --git a/src/imars3d/backend/dataio/__init__.py b/src/imars3d/backend/dataio/__init__.py index 5ea318f1..fface726 100644 --- a/src/imars3d/backend/dataio/__init__.py +++ b/src/imars3d/backend/dataio/__init__.py @@ -1,2 +1,3 @@ """data handling module for iMars3D.""" + from . import data # noqa: F401 diff --git a/tests/unit/backend/corrections/test_beam_hardening.py b/tests/unit/backend/corrections/test_beam_hardening.py index b3e3b2f0..4a50c8dc 100644 --- a/tests/unit/backend/corrections/test_beam_hardening.py +++ b/tests/unit/backend/corrections/test_beam_hardening.py @@ -1,4 +1,5 @@ """Unit test for beam hardening correction""" + #!/usr/bin/env python import numpy as np import pytest diff --git a/tests/unit/backend/workflow/test_engine.py b/tests/unit/backend/workflow/test_engine.py index 3cc19eb8..ba496a08 100644 --- a/tests/unit/backend/workflow/test_engine.py +++ b/tests/unit/backend/workflow/test_engine.py @@ -14,6 +14,7 @@ class load_data(ParameterizedFunction): r"""mock loading a set of radiographs into a numpy array""" + ct_files = Parameter(default=None) ct_dir = StringParam(default=None) @@ -25,6 +26,7 @@ def __call__(self, **params): class save_data(ParameterizedFunction): r"""mock saving a set or radiographs to some directory""" + ct = Parameter(default=None) workingdir = Parameter() @@ -41,6 +43,7 @@ def __call__(self, **params): class reconstruction(ParameterizedFunction): r"""mock the reconstruction of the radiographs""" + ct = Parameter(default=None) rot_center = Parameter(default=None) @@ -52,6 +55,7 @@ def __call__(self, **params): class reconstruction_with_default(ParameterizedFunction): r"""mock the reconstruction of the radiographs""" + ct = Parameter(default=None) rot_center = Parameter(default=0.0)