diff --git a/dockervault/CHANGELOG.MD b/dockervault/CHANGELOG.MD new file mode 100644 index 0000000..3744aab --- /dev/null +++ b/dockervault/CHANGELOG.MD @@ -0,0 +1,5 @@ +M# Changelog + +All notable changes to this project will be documented in this file. + +## [0.1.0 diff --git a/dockervault/Makefile b/dockervault/Makefile new file mode 100644 index 0000000..b727cf5 --- /dev/null +++ b/dockervault/Makefile @@ -0,0 +1,18 @@ +.PHONY: test lint format typecheck check install-dev + +install-dev: + python -m pip install -e .[dev] + +test: + pytest + +lint: + ruff check . + +format: + ruff check . --fix + +typecheck: + mypy dockervault + +check: lint test typecheck diff --git a/dockervault/__main__.py b/dockervault/__main__.py new file mode 100644 index 0000000..bfdcd0c --- /dev/null +++ b/dockervault/__main__.py @@ -0,0 +1,4 @@ +from .cli import main + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/dockervault/ci.yml b/dockervault/ci.yml new file mode 100644 index 0000000..87e3846 --- /dev/null +++ b/dockervault/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install + run: | + python -m pip install --upgrade pip + pip install -e .[dev] + + - name: Lint + run: ruff check . + + - name: Test + run: pytest diff --git a/dockervault/pytest.ini b/dockervault/pytest.ini new file mode 100644 index 0000000..156da35 --- /dev/null +++ b/dockervault/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +testpaths = tests +addopts = -q +pythonpath = . diff --git a/pyproject.toml b/pyproject.toml index 652c56e..3a11e70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,37 +1,62 @@ [build-system] -requires = ["setuptools>=68", "wheel"] +requires = ["setuptools>=69", "wheel"] build-backend = "setuptools.build_meta" [project] name = "dockervault" -version = "0.2.0" -description = "CLI backup discovery tool for Docker environments" +version = "0.1.0" +description = "Intelligent Docker backup discovery with Borg integration" readme = "README.md" requires-python = ">=3.10" +license = { text = "GPL-3.0-or-later" } authors = [ - { name = "Ed & NodeFox" } + { name = "Ed" }, + { name = "NodeFox" } ] -license = { text = "MIT" } -keywords = ["docker", "backup", "cli", "borg", "inventory"] +keywords = ["docker", "backup", "borg", "compose", "discovery", "devops"] classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent" + "Operating System :: POSIX :: Linux", + "Topic :: System :: Archiving :: Backup", + "Topic :: Utilities" +] +dependencies = [ + "PyYAML>=6.0" ] -dependencies = [ - "PyYAML>=6.0", +[project.optional-dependencies] +dev = [ + "pytest>=8.0", + "ruff>=0.3.0", + "mypy>=1.8.0" ] [project.scripts] dockervault = "dockervault.cli:main" [tool.setuptools] -package-dir = {"" = "."} +include-package-data = true [tool.setuptools.packages.find] -where = ["."] include = ["dockervault*"] + +[tool.pytest.ini_options] +testpaths = ["tests"] +pythonpath = ["."] +addopts = "-q" + +[tool.ruff] +line-length = 100 +target-version = "py310" + +[tool.ruff.lint] +select = ["E", "F", "I", "UP", "B"] + +[tool.mypy] +python_version = "3.10" +ignore_missing_imports = true +strict = false