diff --git a/.github/workflows/validate_release_tag.py b/.github/workflows/validate_release_tag.py index 6f46e14..5fd54a8 100644 --- a/.github/workflows/validate_release_tag.py +++ b/.github/workflows/validate_release_tag.py @@ -1,4 +1,5 @@ """Validate that the version in the tag label matches the version of the package.""" + import argparse import ast from pathlib import Path diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2ca5e76..74b084a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: - id: flynt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.5 + rev: v0.3.5 hooks: - id: ruff-format - id: ruff diff --git a/pyproject.toml b/pyproject.toml index 761a2c6..1b9489d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,11 +99,16 @@ markers = [ ] [tool.ruff] +line-length = 120 + +[tool.ruff.format] +quote-style = 'single' + +[tool.ruff.lint] ignore = [ 'D203', # Incompatible with D211 `no-blank-line-before-class` 'D213' # Incompatible with D212 `multi-line-summary-second-line` ] -line-length = 120 select = [ 'E', # pydocstyle 'W', # pydocstyle @@ -117,6 +122,3 @@ select = [ 'PLW', # pylint-warning 'RUF' # ruff ] - -[tool.ruff.format] -quote-style = 'single' diff --git a/src/aiida_s3/__init__.py b/src/aiida_s3/__init__.py index 8a7218c..cac409f 100644 --- a/src/aiida_s3/__init__.py +++ b/src/aiida_s3/__init__.py @@ -1,2 +1,3 @@ """AiiDA plugin that provides a storage backend using an S3 object store as the file repository.""" + __version__ = '0.2.0' diff --git a/src/aiida_s3/repository/aws_s3.py b/src/aiida_s3/repository/aws_s3.py index 38a6630..8d09e3d 100644 --- a/src/aiida_s3/repository/aws_s3.py +++ b/src/aiida_s3/repository/aws_s3.py @@ -1,4 +1,5 @@ """Implementation of the :py:`aiida.repository.backend.abstract.AbstractRepositoryBackend` using AWS S3 as backend.""" + from __future__ import annotations import typing as t diff --git a/src/aiida_s3/repository/azure_blob.py b/src/aiida_s3/repository/azure_blob.py index d1c1161..371091d 100644 --- a/src/aiida_s3/repository/azure_blob.py +++ b/src/aiida_s3/repository/azure_blob.py @@ -1,4 +1,5 @@ """Implementation of the :py:`aiida.repository.backend.abstract.AbstractRepositoryBackend` using Azure Blob Storage.""" + from __future__ import annotations import contextlib diff --git a/src/aiida_s3/repository/s3.py b/src/aiida_s3/repository/s3.py index 2b95826..dc82903 100644 --- a/src/aiida_s3/repository/s3.py +++ b/src/aiida_s3/repository/s3.py @@ -1,4 +1,5 @@ """Implementation of the :py:`aiida.repository.backend.abstract.AbstractRepositoryBackend` using S3 as backend.""" + from __future__ import annotations import contextlib diff --git a/src/aiida_s3/storage/psql_aws_s3.py b/src/aiida_s3/storage/psql_aws_s3.py index 495c9cd..f6c3a4f 100644 --- a/src/aiida_s3/storage/psql_aws_s3.py +++ b/src/aiida_s3/storage/psql_aws_s3.py @@ -1,4 +1,5 @@ """Implementation of :class:`aiida.orm.implementation.storage_backend.StorageBackend` using PostgreSQL + AWS S3.""" + from __future__ import annotations from aiida.storage.psql_dos import PsqlDosBackend diff --git a/src/aiida_s3/storage/psql_azure_blob.py b/src/aiida_s3/storage/psql_azure_blob.py index 3daab6f..48cab34 100644 --- a/src/aiida_s3/storage/psql_azure_blob.py +++ b/src/aiida_s3/storage/psql_azure_blob.py @@ -1,4 +1,5 @@ """Implementation of :class:`aiida.orm.implementation.storage_backend.StorageBackend` using PostgreSQL + Azure.""" + from __future__ import annotations from aiida.storage.psql_dos.backend import PsqlDosBackend diff --git a/src/aiida_s3/storage/psql_s3.py b/src/aiida_s3/storage/psql_s3.py index cc907d8..1c3ce14 100644 --- a/src/aiida_s3/storage/psql_s3.py +++ b/src/aiida_s3/storage/psql_s3.py @@ -1,4 +1,5 @@ """Implementation of :class:`aiida.orm.implementation.storage_backend.StorageBackend` using PostgreSQL + S3.""" + from __future__ import annotations from aiida.storage.psql_dos.backend import PsqlDosBackend diff --git a/tests/cli/test_profile.py b/tests/cli/test_profile.py index d5e063e..bf74664 100644 --- a/tests/cli/test_profile.py +++ b/tests/cli/test_profile.py @@ -1,5 +1,5 @@ -# pylint: disable=redefined-outer-name """Tests for ``verdi profile setup``.""" + import pathlib import pytest diff --git a/tests/conftest.py b/tests/conftest.py index 311fb34..2a6316a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,5 @@ -# pylint: disable=redefined-outer-name """Test fixtures for the :mod:`aiida_s3` module.""" + from __future__ import annotations import contextlib diff --git a/tests/repository/test_aws_s3.py b/tests/repository/test_aws_s3.py index 17aadaf..2a1514b 100644 --- a/tests/repository/test_aws_s3.py +++ b/tests/repository/test_aws_s3.py @@ -1,5 +1,5 @@ -# pylint: disable=redefined-outer-name """Tests for the :mod:`aiida_s3.repository.aws_s3` module.""" + import io import typing as t import uuid diff --git a/tests/repository/test_azure_blob.py b/tests/repository/test_azure_blob.py index 3ec0af2..1a590c5 100644 --- a/tests/repository/test_azure_blob.py +++ b/tests/repository/test_azure_blob.py @@ -1,5 +1,5 @@ -# pylint: disable=redefined-outer-name """Tests for the :mod:`aiida_s3.repository.azure_blob` module.""" + import io import typing as t import uuid diff --git a/tests/repository/test_s3.py b/tests/repository/test_s3.py index 777113c..32a7ac4 100644 --- a/tests/repository/test_s3.py +++ b/tests/repository/test_s3.py @@ -1,5 +1,5 @@ -# pylint: disable=redefined-outer-name """Tests for the :mod:`aiida_s3.repository.s3` module.""" + import io import typing as t import uuid diff --git a/tests/storage/test_psql_aws_s3.py b/tests/storage/test_psql_aws_s3.py index 55bcd5e..07f4171 100644 --- a/tests/storage/test_psql_aws_s3.py +++ b/tests/storage/test_psql_aws_s3.py @@ -1,5 +1,5 @@ -# pylint: disable=redefined-outer-name """Tests for the :mod:`aiida_s3.storage.psql_aws_s3` module.""" + import io import pytest diff --git a/tests/storage/test_psql_azure_blob.py b/tests/storage/test_psql_azure_blob.py index 283d212..ed97f65 100644 --- a/tests/storage/test_psql_azure_blob.py +++ b/tests/storage/test_psql_azure_blob.py @@ -1,5 +1,5 @@ -# pylint: disable=redefined-outer-name """Tests for the :mod:`aiida_s3.storage.psql_azure_blob` module.""" + import io import pytest diff --git a/tests/test_conftest.py b/tests/test_conftest.py index 32b14b0..e3ccd4f 100644 --- a/tests/test_conftest.py +++ b/tests/test_conftest.py @@ -1,4 +1,5 @@ """Tests for the :mod:`tests.conftest` module.""" + from botocore.client import BaseClient diff --git a/tests/test_version.py b/tests/test_version.py index 38b787d..79357fc 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -1,4 +1,5 @@ """Tests for the :mod:`aiida_s3` module.""" + import aiida_s3 from packaging.version import Version, parse