feat: prepare project for production (packaging, CLI entrypoint, CI, tooling)

This commit is contained in:
Eddie Nielsen 2026-03-23 14:55:40 +00:00
parent e5ef50a74a
commit 196a78da1d
6 changed files with 104 additions and 14 deletions

5
dockervault/CHANGELOG.MD Normal file
View file

@ -0,0 +1,5 @@
M# Changelog
All notable changes to this project will be documented in this file.
## [0.1.0

18
dockervault/Makefile Normal file
View file

@ -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

4
dockervault/__main__.py Normal file
View file

@ -0,0 +1,4 @@
from .cli import main
if __name__ == "__main__":
raise SystemExit(main())

34
dockervault/ci.yml Normal file
View file

@ -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

4
dockervault/pytest.ini Normal file
View file

@ -0,0 +1,4 @@
[pytest]
testpaths = tests
addopts = -q
pythonpath = .

View file

@ -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