From b1d2fe7717144a187de5b81127d5492223f56add Mon Sep 17 00:00:00 2001 From: Draklaw Date: Tue, 29 Apr 2025 18:54:34 +0200 Subject: [PATCH] Restart from scratch. --- pyproject.toml | 36 +++++++++++++++++++++ src/bsv.bak/__init__.py | 18 +++++++++++ src/{bsv => bsv.bak}/__main__.py | 0 src/bsv.bak/_version.py | 16 +++++++++ src/{bsv => bsv.bak}/cli.py | 0 src/{bsv => bsv.bak}/command/__init__.py | 0 src/{bsv => bsv.bak}/command/info.py | 0 src/{bsv => bsv.bak}/command/init.py | 0 src/{bsv => bsv.bak}/exception.py | 0 src/{bsv => bsv.bak}/main.py | 0 src/{bsv => bsv.bak}/object.py | 0 src/{bsv => bsv.bak}/path_map.py | 0 src/{bsv => bsv.bak}/repository.py | 0 src/{bsv => bsv.bak}/simple_cas/__init__.py | 0 src/{bsv => bsv.bak}/simple_cas/cas.py | 0 src/{bsv => bsv.bak}/tree_walker.py | 0 src/{bsv => bsv.bak}/util.py | 0 src/bsv/__init__.py | 8 ++--- {tests => tests.bak}/test_repository.py | 0 {tests => tests.bak}/test_simple_cas.py | 0 20 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 src/bsv.bak/__init__.py rename src/{bsv => bsv.bak}/__main__.py (100%) create mode 100644 src/bsv.bak/_version.py rename src/{bsv => bsv.bak}/cli.py (100%) rename src/{bsv => bsv.bak}/command/__init__.py (100%) rename src/{bsv => bsv.bak}/command/info.py (100%) rename src/{bsv => bsv.bak}/command/init.py (100%) rename src/{bsv => bsv.bak}/exception.py (100%) rename src/{bsv => bsv.bak}/main.py (100%) rename src/{bsv => bsv.bak}/object.py (100%) rename src/{bsv => bsv.bak}/path_map.py (100%) rename src/{bsv => bsv.bak}/repository.py (100%) rename src/{bsv => bsv.bak}/simple_cas/__init__.py (100%) rename src/{bsv => bsv.bak}/simple_cas/cas.py (100%) rename src/{bsv => bsv.bak}/tree_walker.py (100%) rename src/{bsv => bsv.bak}/util.py (100%) rename {tests => tests.bak}/test_repository.py (100%) rename {tests => tests.bak}/test_simple_cas.py (100%) diff --git a/pyproject.toml b/pyproject.toml index 3de5f04..dade943 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ dependencies = [ [project.optional-dependencies] test = [ "pytest", + "hypothesis", ] [project.urls] @@ -29,6 +30,41 @@ test = [ [project.scripts] bsv = "bsv.main:main" + +[tool.ruff] +target-version = "py311" + +[tool.ruff.lint] +select = [ + "B", # flake8-bugbear + "D", # pydocstyle + "DOC", # pydoclint + "E", # pycodestyle + "EM", # flake8-errmsg + "F", # Pyflakes + "FURB", # refurb + "G", # flake8-logging-format + "I", # isort + "ISC", # flake8-implicit-str-concat + "LOG", # flake8-logging + "N", # pep8-naming + "PERF", # Perflint + "PT", # flake8-pytest-style + "PTH", # flake8-use-pathlib + "S", # flake8-bandit + "SIM", # flake8-simplify + "TC", # flake8-type-checking + "UP", # pyupgrade + "W", # pycodestyle +] + +[tool.ruff.lint.isort] +required-imports = ["from __future__ import annotations"] + +[tool.ruff.lint.pydocstyle] +convention = "google" + + [build-system] requires = ["setuptools", "setuptools-scm"] build-backend = "setuptools.build_meta" diff --git a/src/bsv.bak/__init__.py b/src/bsv.bak/__init__.py new file mode 100644 index 0000000..4f3e8c0 --- /dev/null +++ b/src/bsv.bak/__init__.py @@ -0,0 +1,18 @@ +# bsv - Backup, Synchronization, Versioning +# Copyright (C) 2023 Simon Boyé +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +from __future__ import annotations + +from bsv._version import __version__, __version_tuple__ diff --git a/src/bsv/__main__.py b/src/bsv.bak/__main__.py similarity index 100% rename from src/bsv/__main__.py rename to src/bsv.bak/__main__.py diff --git a/src/bsv.bak/_version.py b/src/bsv.bak/_version.py new file mode 100644 index 0000000..ada2e07 --- /dev/null +++ b/src/bsv.bak/_version.py @@ -0,0 +1,16 @@ +# file generated by setuptools_scm +# don't change, don't track in version control +TYPE_CHECKING = False +if TYPE_CHECKING: + from typing import Tuple, Union + VERSION_TUPLE = Tuple[Union[int, str], ...] +else: + VERSION_TUPLE = object + +version: str +__version__: str +__version_tuple__: VERSION_TUPLE +version_tuple: VERSION_TUPLE + +__version__ = version = '0.0.1.dev8+g52a553d.d20231127' +__version_tuple__ = version_tuple = (0, 0, 1, 'dev8', 'g52a553d.d20231127') diff --git a/src/bsv/cli.py b/src/bsv.bak/cli.py similarity index 100% rename from src/bsv/cli.py rename to src/bsv.bak/cli.py diff --git a/src/bsv/command/__init__.py b/src/bsv.bak/command/__init__.py similarity index 100% rename from src/bsv/command/__init__.py rename to src/bsv.bak/command/__init__.py diff --git a/src/bsv/command/info.py b/src/bsv.bak/command/info.py similarity index 100% rename from src/bsv/command/info.py rename to src/bsv.bak/command/info.py diff --git a/src/bsv/command/init.py b/src/bsv.bak/command/init.py similarity index 100% rename from src/bsv/command/init.py rename to src/bsv.bak/command/init.py diff --git a/src/bsv/exception.py b/src/bsv.bak/exception.py similarity index 100% rename from src/bsv/exception.py rename to src/bsv.bak/exception.py diff --git a/src/bsv/main.py b/src/bsv.bak/main.py similarity index 100% rename from src/bsv/main.py rename to src/bsv.bak/main.py diff --git a/src/bsv/object.py b/src/bsv.bak/object.py similarity index 100% rename from src/bsv/object.py rename to src/bsv.bak/object.py diff --git a/src/bsv/path_map.py b/src/bsv.bak/path_map.py similarity index 100% rename from src/bsv/path_map.py rename to src/bsv.bak/path_map.py diff --git a/src/bsv/repository.py b/src/bsv.bak/repository.py similarity index 100% rename from src/bsv/repository.py rename to src/bsv.bak/repository.py diff --git a/src/bsv/simple_cas/__init__.py b/src/bsv.bak/simple_cas/__init__.py similarity index 100% rename from src/bsv/simple_cas/__init__.py rename to src/bsv.bak/simple_cas/__init__.py diff --git a/src/bsv/simple_cas/cas.py b/src/bsv.bak/simple_cas/cas.py similarity index 100% rename from src/bsv/simple_cas/cas.py rename to src/bsv.bak/simple_cas/cas.py diff --git a/src/bsv/tree_walker.py b/src/bsv.bak/tree_walker.py similarity index 100% rename from src/bsv/tree_walker.py rename to src/bsv.bak/tree_walker.py diff --git a/src/bsv/util.py b/src/bsv.bak/util.py similarity index 100% rename from src/bsv/util.py rename to src/bsv.bak/util.py diff --git a/src/bsv/__init__.py b/src/bsv/__init__.py index 4f3e8c0..18276bf 100644 --- a/src/bsv/__init__.py +++ b/src/bsv/__init__.py @@ -1,5 +1,5 @@ -# bsv - Backup, Synchronization, Versioning -# Copyright (C) 2023 Simon Boyé +# pybsv +# Copyright (C) 2025 Simon Boyé # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by @@ -13,6 +13,4 @@ # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from __future__ import annotations - -from bsv._version import __version__, __version_tuple__ +"""pybsv - A Backup, Synchronization and Versioning tool.""" diff --git a/tests/test_repository.py b/tests.bak/test_repository.py similarity index 100% rename from tests/test_repository.py rename to tests.bak/test_repository.py diff --git a/tests/test_simple_cas.py b/tests.bak/test_simple_cas.py similarity index 100% rename from tests/test_simple_cas.py rename to tests.bak/test_simple_cas.py