From 0aee908c368951c9ca11798b15a4b725cbb18813 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 21:38:40 +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 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v5.0.0) - [github.com/asottile/pyupgrade: v3.3.2 → v3.19.0](https://github.com/asottile/pyupgrade/compare/v3.3.2...v3.19.0) - [github.com/PyCQA/isort: 5.12.0 → 5.13.2](https://github.com/PyCQA/isort/compare/5.12.0...5.13.2) - [github.com/psf/black: 23.3.0 → 24.10.0](https://github.com/psf/black/compare/23.3.0...24.10.0) --- .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 8b3aa04..c18d20d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ ci: # pre-commit install repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: end-of-file-fixer - id: mixed-line-ending @@ -15,18 +15,18 @@ repos: - id: check-json - repo: https://github.com/asottile/pyupgrade - rev: v3.3.2 + rev: v3.19.0 hooks: - id: pyupgrade args: ["--py37-plus"] - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 24.10.0 hooks: - id: black From 7bfeedfb71d78ac306ceec112e53b655542dbdc3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 21:38:46 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- aiida_dataframe/cli.py | 1 + aiida_dataframe/data/__init__.py | 1 + aiida_dataframe/data/dataframe.py | 1 + conftest.py | 1 + docs/source/conf.py | 6 +++--- tests/__init__.py | 1 + tests/test_cli.py | 1 + 7 files changed, 9 insertions(+), 3 deletions(-) diff --git a/aiida_dataframe/cli.py b/aiida_dataframe/cli.py index e73b044..10277ec 100644 --- a/aiida_dataframe/cli.py +++ b/aiida_dataframe/cli.py @@ -5,6 +5,7 @@ directly into the 'verdi' command by using AiiDA-specific entry points like "aiida.cmdline.data" (both in the pyproject.toml file). """ + import sys import tempfile diff --git a/aiida_dataframe/data/__init__.py b/aiida_dataframe/data/__init__.py index 9060437..b758256 100644 --- a/aiida_dataframe/data/__init__.py +++ b/aiida_dataframe/data/__init__.py @@ -3,6 +3,7 @@ Register data types via the "aiida.data" entry point in pyproject.toml. """ + from .dataframe import PandasFrameData __all__ = ("PandasFrameData",) diff --git a/aiida_dataframe/data/dataframe.py b/aiida_dataframe/data/dataframe.py index e4409d9..97fc5d5 100644 --- a/aiida_dataframe/data/dataframe.py +++ b/aiida_dataframe/data/dataframe.py @@ -2,6 +2,7 @@ This module defines a AiiDA Data plugin for pandas DataFrames to be stored in the file repository as HDF5 files """ + from __future__ import annotations import hashlib diff --git a/conftest.py b/conftest.py index 25a081b..b1e7701 100644 --- a/conftest.py +++ b/conftest.py @@ -1,4 +1,5 @@ """pytest fixtures for simplified testing.""" + import pytest pytest_plugins = ["aiida.manage.tests.pytest_fixtures", "pytest_regressions"] diff --git a/docs/source/conf.py b/docs/source/conf.py index 1c56e9d..320c0df 100755 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -222,9 +222,9 @@ def run_apidoc(_): # See https://stackoverflow.com/a/30144019 env = os.environ.copy() - env[ - "SPHINX_APIDOC_OPTIONS" - ] = "members,special-members,private-members,undoc-members,show-inheritance" + env["SPHINX_APIDOC_OPTIONS"] = ( + "members,special-members,private-members,undoc-members,show-inheritance" + ) subprocess.check_call([cmd_path] + options, env=env) diff --git a/tests/__init__.py b/tests/__init__.py index 94cbb42..0915982 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -3,6 +3,7 @@ Includes both tests written in unittest style (test_cli.py) and tests written in pytest style (test_calculations.py). """ + import os TEST_DIR = os.path.dirname(os.path.realpath(__file__)) diff --git a/tests/test_cli.py b/tests/test_cli.py index f75f043..fcb4136 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,4 +1,5 @@ """ Tests for command line interface.""" + from click.testing import CliRunner import numpy as np import pandas as pd