ezbak 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ezbak-0.2.0/.github/actions/setup_python_env/action.yml +33 -0
- ezbak-0.2.0/.github/dependabot.yml +23 -0
- ezbak-0.2.0/.github/workflows/commit-linter.yml +35 -0
- ezbak-0.2.0/.github/workflows/create-release.yml +118 -0
- ezbak-0.2.0/.github/workflows/manual_pypy_publish.yml +36 -0
- ezbak-0.2.0/.github/workflows/pr-linter.yml +50 -0
- ezbak-0.2.0/.github/workflows/test.yml +73 -0
- ezbak-0.2.0/.gitignore +20 -0
- ezbak-0.2.0/.pre-commit-config.yaml +110 -0
- ezbak-0.2.0/.python-version +1 -0
- ezbak-0.2.0/.typos.toml +9 -0
- ezbak-0.2.0/.yamllint.yml +32 -0
- ezbak-0.2.0/CHANGELOG.md +5 -0
- ezbak-0.2.0/CONTRIBUTING.md +52 -0
- ezbak-0.2.0/LICENSE +9 -0
- ezbak-0.2.0/PKG-INFO +202 -0
- ezbak-0.2.0/README.md +181 -0
- ezbak-0.2.0/codecov.yml +17 -0
- ezbak-0.2.0/committed.toml +18 -0
- ezbak-0.2.0/duties.py +169 -0
- ezbak-0.2.0/pyproject.toml +192 -0
- ezbak-0.2.0/src/ezbak/__init__.py +71 -0
- ezbak-0.2.0/src/ezbak/cli.py +279 -0
- ezbak-0.2.0/src/ezbak/cli_commands/__init__.py +1 -0
- ezbak-0.2.0/src/ezbak/cli_commands/create.py +10 -0
- ezbak-0.2.0/src/ezbak/cli_commands/list.py +22 -0
- ezbak-0.2.0/src/ezbak/cli_commands/prune.py +25 -0
- ezbak-0.2.0/src/ezbak/constants.py +49 -0
- ezbak-0.2.0/src/ezbak/controllers/__init__.py +6 -0
- ezbak-0.2.0/src/ezbak/controllers/backup_manager.py +438 -0
- ezbak-0.2.0/src/ezbak/controllers/retention_policy_manager.py +53 -0
- ezbak-0.2.0/src/ezbak/models/__init__.py +6 -0
- ezbak-0.2.0/src/ezbak/models/backup.py +50 -0
- ezbak-0.2.0/src/ezbak/models/settings.py +146 -0
- ezbak-0.2.0/tests/__init__.py +1 -0
- ezbak-0.2.0/tests/conftest.py +58 -0
- ezbak-0.2.0/tests/fixtures/archive.tgz +0 -0
- ezbak-0.2.0/tests/test_cli.py +214 -0
- ezbak-0.2.0/tests/test_ezbak.py +398 -0
- ezbak-0.2.0/tests/test_ezbak_errors.py +117 -0
- ezbak-0.2.0/uv.lock +1204 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Install uv, Python, and project dependencies
|
|
3
|
+
description: Install uv, Python, and project dependencies using cached uv and Python installations
|
|
4
|
+
|
|
5
|
+
inputs:
|
|
6
|
+
python-version:
|
|
7
|
+
description: >
|
|
8
|
+
Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
|
9
|
+
required: false
|
|
10
|
+
default: "3.12"
|
|
11
|
+
|
|
12
|
+
outputs:
|
|
13
|
+
python-version:
|
|
14
|
+
description: The installed python version. Useful when given a version range as input.
|
|
15
|
+
value: ${{ steps.setup-python.outputs.python-version }}
|
|
16
|
+
|
|
17
|
+
runs:
|
|
18
|
+
using: composite
|
|
19
|
+
steps:
|
|
20
|
+
- name: Setup uv with cache
|
|
21
|
+
uses: astral-sh/setup-uv@v6
|
|
22
|
+
with:
|
|
23
|
+
version: "latest"
|
|
24
|
+
enable-cache: true
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
|
|
27
|
+
- name: Install the project
|
|
28
|
+
shell: bash
|
|
29
|
+
run: uv sync --all-extras --dev
|
|
30
|
+
|
|
31
|
+
- name: Minimize uv cache
|
|
32
|
+
shell: bash
|
|
33
|
+
run: uv cache prune --ci
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 2
|
|
3
|
+
|
|
4
|
+
updates:
|
|
5
|
+
- package-ecosystem: github-actions
|
|
6
|
+
directory: /
|
|
7
|
+
schedule:
|
|
8
|
+
interval: monthly
|
|
9
|
+
commit-message:
|
|
10
|
+
prefix: "ci"
|
|
11
|
+
prefix-development: "ci"
|
|
12
|
+
include: "scope"
|
|
13
|
+
# - package-ecosystem: pip
|
|
14
|
+
# directory: /
|
|
15
|
+
# schedule:
|
|
16
|
+
# interval: monthly
|
|
17
|
+
# commit-message:
|
|
18
|
+
# prefix: "build"
|
|
19
|
+
# prefix-development: "build"
|
|
20
|
+
# include: "scope"
|
|
21
|
+
# versioning-strategy: lockfile-only
|
|
22
|
+
# allow:
|
|
23
|
+
# - dependency-type: "all"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Commit Linter
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
pull_request:
|
|
9
|
+
types:
|
|
10
|
+
- opened
|
|
11
|
+
- reopened
|
|
12
|
+
- synchronize
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
permissions: # added using https://github.com/step-security/secure-workflows
|
|
19
|
+
contents: read
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
lint-commits:
|
|
23
|
+
if: "!contains(github.event.head_commit.message, 'bump(release)')"
|
|
24
|
+
permissions:
|
|
25
|
+
contents: read # for actions/checkout to fetch code
|
|
26
|
+
pull-requests: read # for wagoid/commitlint-github-action to get commits in PR
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout repository
|
|
30
|
+
uses: actions/checkout@v4
|
|
31
|
+
with:
|
|
32
|
+
fetch-depth: 0
|
|
33
|
+
|
|
34
|
+
- name: Lint commits
|
|
35
|
+
uses: wagoid/commitlint-github-action@v6
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Create Release"
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
push:
|
|
7
|
+
tags:
|
|
8
|
+
- "v*"
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
auto-release:
|
|
19
|
+
name: Create Release
|
|
20
|
+
runs-on: "ubuntu-latest"
|
|
21
|
+
strategy:
|
|
22
|
+
fail-fast: true
|
|
23
|
+
matrix:
|
|
24
|
+
python-version: ["3.11"]
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout repository
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
30
|
+
|
|
31
|
+
- name: Setup Python, uv, and the package
|
|
32
|
+
uses: ./.github/actions/setup_python_env
|
|
33
|
+
|
|
34
|
+
# ----------------------------------------------
|
|
35
|
+
# Grab version number
|
|
36
|
+
# ----------------------------------------------
|
|
37
|
+
|
|
38
|
+
- name: Add version to environment vars
|
|
39
|
+
run: |
|
|
40
|
+
PROJECT_VERSION=$(python -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')
|
|
41
|
+
echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV
|
|
42
|
+
|
|
43
|
+
# ----------------------------------------------
|
|
44
|
+
# Confirm we did, in fact, update the version
|
|
45
|
+
# ----------------------------------------------
|
|
46
|
+
|
|
47
|
+
- name: Check if tag version matches project version
|
|
48
|
+
run: |
|
|
49
|
+
TAG=$(git describe HEAD --tags --abbrev=0)
|
|
50
|
+
echo $TAG
|
|
51
|
+
echo $PROJECT_VERSION
|
|
52
|
+
if [[ "$TAG" != "v$PROJECT_VERSION" ]]; then exit 1; fi
|
|
53
|
+
echo "CURRENT_TAG=refs/tags/${TAG}" >> $GITHUB_ENV
|
|
54
|
+
|
|
55
|
+
# ----------------------------------------------
|
|
56
|
+
# Test and then build the package
|
|
57
|
+
# ----------------------------------------------
|
|
58
|
+
|
|
59
|
+
- name: Run tests
|
|
60
|
+
shell: bash
|
|
61
|
+
run: uv run duty test
|
|
62
|
+
|
|
63
|
+
- name: Build the package
|
|
64
|
+
shell: bash
|
|
65
|
+
run: uv build
|
|
66
|
+
|
|
67
|
+
# ----------------------------------------------
|
|
68
|
+
# Generate release notes
|
|
69
|
+
# ----------------------------------------------
|
|
70
|
+
|
|
71
|
+
# - name: Release Notes
|
|
72
|
+
# run: git log $(git describe HEAD~ --tags --abbrev=0)..HEAD --pretty='format:* %h %s' --no-merges >> ".github/RELEASE-TEMPLATE.md"
|
|
73
|
+
|
|
74
|
+
- name: Get notes
|
|
75
|
+
id: generate_notes
|
|
76
|
+
uses: anmarkoulis/commitizen-changelog-reader@master
|
|
77
|
+
with:
|
|
78
|
+
tag_name: ${{ env.CURRENT_TAG }}
|
|
79
|
+
changelog: CHANGELOG.md
|
|
80
|
+
|
|
81
|
+
# ----------------------------------------------
|
|
82
|
+
# Build draft release (Note: Will need to manually publish)
|
|
83
|
+
# ----------------------------------------------
|
|
84
|
+
|
|
85
|
+
- name: Create Github Release
|
|
86
|
+
uses: softprops/action-gh-release@v2
|
|
87
|
+
with:
|
|
88
|
+
body: ${{join(fromJson(steps.generate_notes.outputs.notes).notes, '')}}
|
|
89
|
+
draft: false
|
|
90
|
+
files: |
|
|
91
|
+
dist/*-${{env.PROJECT_VERSION}}-py3-none-any.whl
|
|
92
|
+
dist/*-${{env.PROJECT_VERSION}}.tar.gz
|
|
93
|
+
env:
|
|
94
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
95
|
+
|
|
96
|
+
publish-to-pypi:
|
|
97
|
+
runs-on: ubuntu-latest
|
|
98
|
+
needs: auto-release
|
|
99
|
+
env:
|
|
100
|
+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
|
|
101
|
+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
|
|
102
|
+
strategy:
|
|
103
|
+
matrix:
|
|
104
|
+
python-version: ["3.11"]
|
|
105
|
+
steps:
|
|
106
|
+
- name: Checkout repository
|
|
107
|
+
uses: actions/checkout@v4
|
|
108
|
+
|
|
109
|
+
- name: Setup Python, uv, and the package
|
|
110
|
+
uses: ./.github/actions/setup_python_env
|
|
111
|
+
|
|
112
|
+
- name: Build the package
|
|
113
|
+
shell: bash
|
|
114
|
+
run: uv build
|
|
115
|
+
|
|
116
|
+
- name: Upload to PyPi
|
|
117
|
+
shell: bash
|
|
118
|
+
run: uvx twine upload dist/*
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Manual PyPy Publish"
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
publish-to-pypi:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
env:
|
|
18
|
+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
|
|
19
|
+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
|
|
20
|
+
strategy:
|
|
21
|
+
matrix:
|
|
22
|
+
python-version: ["3.11"]
|
|
23
|
+
steps:
|
|
24
|
+
- name: Checkout repository
|
|
25
|
+
uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- name: Setup Python, uv, and the package
|
|
28
|
+
uses: ./.github/actions/setup_python_env
|
|
29
|
+
|
|
30
|
+
- name: Build the package
|
|
31
|
+
shell: bash
|
|
32
|
+
run: uv build
|
|
33
|
+
|
|
34
|
+
- name: Upload to PyPi
|
|
35
|
+
shell: bash
|
|
36
|
+
run: uvx twine upload dist/*
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Pull Request Linter
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
pull_request_target:
|
|
6
|
+
types:
|
|
7
|
+
- opened
|
|
8
|
+
- edited
|
|
9
|
+
- synchronize
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
permissions: # added using https://github.com/step-security/secure-workflows
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
lint:
|
|
22
|
+
permissions:
|
|
23
|
+
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
|
|
24
|
+
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- name: Lint Pull Request
|
|
29
|
+
uses: amannn/action-semantic-pull-request@v5
|
|
30
|
+
with:
|
|
31
|
+
validateSingleCommit: true
|
|
32
|
+
wip: true
|
|
33
|
+
types: |
|
|
34
|
+
fix
|
|
35
|
+
feat
|
|
36
|
+
docs
|
|
37
|
+
style
|
|
38
|
+
refactor
|
|
39
|
+
perf
|
|
40
|
+
test
|
|
41
|
+
build
|
|
42
|
+
ci
|
|
43
|
+
requireScope: false
|
|
44
|
+
subjectPattern: ^(?![A-Z]).+$
|
|
45
|
+
subjectPatternError: |
|
|
46
|
+
The subject "{subject}" found in the pull request title "{title}"
|
|
47
|
+
didn't match the configured pattern. Please ensure that the subject
|
|
48
|
+
doesn't start with an uppercase character.
|
|
49
|
+
env:
|
|
50
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Tests"
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
push:
|
|
7
|
+
paths:
|
|
8
|
+
- ".github/workflows/test.yml"
|
|
9
|
+
- ".github/actions/**"
|
|
10
|
+
- "**.py"
|
|
11
|
+
- "pyproject.toml"
|
|
12
|
+
- "uv.lock"
|
|
13
|
+
branches:
|
|
14
|
+
- main
|
|
15
|
+
pull_request:
|
|
16
|
+
types:
|
|
17
|
+
- opened
|
|
18
|
+
- reopened
|
|
19
|
+
- synchronize
|
|
20
|
+
paths:
|
|
21
|
+
- ".github/workflows/test.yml"
|
|
22
|
+
- ".github/actions/**"
|
|
23
|
+
- "**.py"
|
|
24
|
+
- "pyproject.toml"
|
|
25
|
+
- "uv.lock"
|
|
26
|
+
|
|
27
|
+
concurrency:
|
|
28
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
29
|
+
cancel-in-progress: true
|
|
30
|
+
|
|
31
|
+
jobs:
|
|
32
|
+
test-python-code:
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
strategy:
|
|
35
|
+
fail-fast: true
|
|
36
|
+
matrix:
|
|
37
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
38
|
+
steps:
|
|
39
|
+
- name: Checkout repository
|
|
40
|
+
uses: actions/checkout@v4
|
|
41
|
+
|
|
42
|
+
- name: Setup Python, uv, and the package
|
|
43
|
+
uses: ./.github/actions/setup_python_env
|
|
44
|
+
|
|
45
|
+
- name: Run tests
|
|
46
|
+
shell: bash
|
|
47
|
+
run: uv run duty test
|
|
48
|
+
|
|
49
|
+
- name: Upload coverage to Codecov
|
|
50
|
+
if: ${{ matrix.python-version == '3.12' }}
|
|
51
|
+
uses: codecov/codecov-action@v5
|
|
52
|
+
with:
|
|
53
|
+
files: .cache/coverage.xml
|
|
54
|
+
env:
|
|
55
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
56
|
+
|
|
57
|
+
lint-project:
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
steps:
|
|
60
|
+
- name: Checkout repository
|
|
61
|
+
uses: actions/checkout@v4
|
|
62
|
+
|
|
63
|
+
- uses: actions/cache@v4
|
|
64
|
+
with:
|
|
65
|
+
path: ~/.cache/pre-commit
|
|
66
|
+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
|
|
67
|
+
|
|
68
|
+
- name: Setup Python, uv, and the package
|
|
69
|
+
uses: ./.github/actions/setup_python_env
|
|
70
|
+
|
|
71
|
+
- name: run all linters
|
|
72
|
+
shell: bash
|
|
73
|
+
run: uv run duty lint
|
ezbak-0.2.0/.gitignore
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
|
|
12
|
+
# Project specific
|
|
13
|
+
.cache/
|
|
14
|
+
.development/
|
|
15
|
+
.cursor/
|
|
16
|
+
tmp/
|
|
17
|
+
.development/
|
|
18
|
+
|
|
19
|
+
# macOS
|
|
20
|
+
.DS_Store
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
# https://pre-commit.com
|
|
3
|
+
default_install_hook_types: [pre-commit, pre-push, commit-msg]
|
|
4
|
+
default_stages: [pre-commit, manual]
|
|
5
|
+
fail_fast: true
|
|
6
|
+
repos:
|
|
7
|
+
- repo: "https://github.com/commitizen-tools/commitizen"
|
|
8
|
+
rev: v4.8.3
|
|
9
|
+
hooks:
|
|
10
|
+
- id: commitizen
|
|
11
|
+
- id: commitizen-branch
|
|
12
|
+
stages:
|
|
13
|
+
- pre-push
|
|
14
|
+
|
|
15
|
+
- repo: "https://github.com/pre-commit/pygrep-hooks"
|
|
16
|
+
rev: v1.10.0
|
|
17
|
+
hooks:
|
|
18
|
+
- id: python-check-mock-methods
|
|
19
|
+
- id: python-no-eval
|
|
20
|
+
- id: python-no-log-warn
|
|
21
|
+
- id: python-use-type-annotations
|
|
22
|
+
- id: rst-backticks
|
|
23
|
+
- id: rst-directive-colons
|
|
24
|
+
- id: rst-inline-touching-normal
|
|
25
|
+
- id: text-unicode-replacement-char
|
|
26
|
+
|
|
27
|
+
- repo: "https://github.com/pre-commit/pre-commit-hooks"
|
|
28
|
+
rev: v5.0.0
|
|
29
|
+
hooks:
|
|
30
|
+
- id: check-added-large-files
|
|
31
|
+
- id: check-ast
|
|
32
|
+
- id: check-builtin-literals
|
|
33
|
+
- id: check-case-conflict
|
|
34
|
+
- id: check-docstring-first
|
|
35
|
+
- id: check-executables-have-shebangs
|
|
36
|
+
- id: check-json
|
|
37
|
+
exclude: .devcontainer/|.vscode/
|
|
38
|
+
- id: check-merge-conflict
|
|
39
|
+
- id: check-shebang-scripts-are-executable
|
|
40
|
+
- id: check-symlinks
|
|
41
|
+
- id: check-toml
|
|
42
|
+
- id: check-vcs-permalinks
|
|
43
|
+
- id: check-xml
|
|
44
|
+
- id: check-yaml
|
|
45
|
+
- id: debug-statements
|
|
46
|
+
- id: destroyed-symlinks
|
|
47
|
+
- id: detect-private-key
|
|
48
|
+
- id: fix-byte-order-marker
|
|
49
|
+
- id: mixed-line-ending
|
|
50
|
+
- id: trailing-whitespace
|
|
51
|
+
types: [python]
|
|
52
|
+
args: [--markdown-linebreak-ext=md]
|
|
53
|
+
- id: end-of-file-fixer
|
|
54
|
+
types: [python]
|
|
55
|
+
|
|
56
|
+
- repo: "https://github.com/adrienverge/yamllint.git"
|
|
57
|
+
rev: v1.37.1
|
|
58
|
+
hooks:
|
|
59
|
+
- id: yamllint
|
|
60
|
+
files: ^.*\.(yaml|yml)$
|
|
61
|
+
entry: yamllint --strict --config-file .yamllint.yml
|
|
62
|
+
|
|
63
|
+
- repo: "https://github.com/astral-sh/ruff-pre-commit"
|
|
64
|
+
rev: "v0.11.13"
|
|
65
|
+
hooks:
|
|
66
|
+
- id: ruff-check
|
|
67
|
+
exclude: tests/
|
|
68
|
+
args: [--no-fix]
|
|
69
|
+
- id: ruff-format
|
|
70
|
+
args: [--check]
|
|
71
|
+
|
|
72
|
+
- repo: "https://github.com/adhtruong/mirrors-typos"
|
|
73
|
+
rev: v1.33.1
|
|
74
|
+
hooks:
|
|
75
|
+
- id: typos
|
|
76
|
+
args: ["--force-exclude"]
|
|
77
|
+
stages: [commit-msg, pre-commit]
|
|
78
|
+
|
|
79
|
+
- repo: "https://github.com/crate-ci/committed"
|
|
80
|
+
rev: v1.1.7
|
|
81
|
+
hooks:
|
|
82
|
+
- id: committed
|
|
83
|
+
stages: [commit-msg]
|
|
84
|
+
|
|
85
|
+
- repo: "https://github.com/gitleaks/gitleaks"
|
|
86
|
+
rev: v8.27.2
|
|
87
|
+
hooks:
|
|
88
|
+
- id: gitleaks
|
|
89
|
+
|
|
90
|
+
- repo: local
|
|
91
|
+
hooks:
|
|
92
|
+
- id: mypy
|
|
93
|
+
name: mypy
|
|
94
|
+
entry: mypy --config-file pyproject.toml
|
|
95
|
+
exclude: "tests/|duties.py|tmp/"
|
|
96
|
+
language: system
|
|
97
|
+
types: [python]
|
|
98
|
+
|
|
99
|
+
- id: pytest
|
|
100
|
+
name: pytest
|
|
101
|
+
entry: pytest -c pyproject.toml src/ tests/
|
|
102
|
+
language: system
|
|
103
|
+
pass_filenames: false
|
|
104
|
+
files: |
|
|
105
|
+
(?x)^(
|
|
106
|
+
src/|
|
|
107
|
+
tests/|
|
|
108
|
+
uv\.lock|
|
|
109
|
+
pyproject\.toml
|
|
110
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
ezbak-0.2.0/.typos.toml
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Find full documentation at: https://yamllint.readthedocs.io/en/stable/index.html
|
|
3
|
+
extends: default
|
|
4
|
+
|
|
5
|
+
ignore: |
|
|
6
|
+
.venv
|
|
7
|
+
.cache
|
|
8
|
+
rules:
|
|
9
|
+
braces:
|
|
10
|
+
level: error
|
|
11
|
+
max-spaces-inside: 1
|
|
12
|
+
min-spaces-inside: 1
|
|
13
|
+
comments-indentation: disable
|
|
14
|
+
comments:
|
|
15
|
+
min-spaces-from-content: 1
|
|
16
|
+
indentation:
|
|
17
|
+
spaces: consistent
|
|
18
|
+
indent-sequences: true
|
|
19
|
+
check-multi-line-strings: false
|
|
20
|
+
line-length: disable
|
|
21
|
+
quoted-strings:
|
|
22
|
+
quote-type: any
|
|
23
|
+
required: false
|
|
24
|
+
extra-required:
|
|
25
|
+
- "^http://"
|
|
26
|
+
- "^https://"
|
|
27
|
+
- "ftp://"
|
|
28
|
+
- 'ssh \w.*'
|
|
29
|
+
extra-allowed: []
|
|
30
|
+
truthy:
|
|
31
|
+
level: error
|
|
32
|
+
check-keys: false
|
ezbak-0.2.0/CHANGELOG.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Contributing to ezbak
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to ezbak! This document provides guidelines and instructions to make the contribution process smooth and effective.
|
|
4
|
+
|
|
5
|
+
## Types of Contributions Welcome
|
|
6
|
+
|
|
7
|
+
- Bug fixes
|
|
8
|
+
- Feature enhancements
|
|
9
|
+
- Documentation improvements
|
|
10
|
+
- Test additions
|
|
11
|
+
|
|
12
|
+
## Development Setup
|
|
13
|
+
|
|
14
|
+
### Prerequisites
|
|
15
|
+
|
|
16
|
+
This project uses [uv](https://docs.astral.sh/uv/) for dependency management. To start developing:
|
|
17
|
+
|
|
18
|
+
1. Install uv using the [recommended method](https://docs.astral.sh/uv/installation/) for your operating system
|
|
19
|
+
2. Clone this repository: `git clone https://github.com/natelandau/ezbak`
|
|
20
|
+
3. Navigate to the repository: `cd ezbak`
|
|
21
|
+
4. Install dependencies with uv: `uv sync`
|
|
22
|
+
5. Activate your virtual environment: `source .venv/bin/activate`
|
|
23
|
+
6. Install pre-commit hooks: `pre-commit install --install-hooks`
|
|
24
|
+
|
|
25
|
+
### Running Tasks
|
|
26
|
+
|
|
27
|
+
We use [Duty](https://pawamoy.github.io/duty/) as our task runner. Common tasks:
|
|
28
|
+
|
|
29
|
+
- `duty --list` - List all available tasks
|
|
30
|
+
- `duty lint` - Run all linters
|
|
31
|
+
- `duty test` - Run all tests
|
|
32
|
+
|
|
33
|
+
## Development Guidelines
|
|
34
|
+
|
|
35
|
+
When developing for ezbak, please follow these guidelines:
|
|
36
|
+
|
|
37
|
+
- Write full docstrings
|
|
38
|
+
- All code should use type hints
|
|
39
|
+
- Write unit tests for all new functions
|
|
40
|
+
- Write integration tests for all new features
|
|
41
|
+
- Follow the existing code style
|
|
42
|
+
|
|
43
|
+
## Commit Process
|
|
44
|
+
|
|
45
|
+
1. Create a branch for your feature or fix
|
|
46
|
+
2. Make your changes
|
|
47
|
+
3. Ensure code passes linting with `duty lint`
|
|
48
|
+
4. Ensure tests pass with `duty test`
|
|
49
|
+
5. Commit using [Commitizen](https://github.com/commitizen-tools/commitizen): `cz c`
|
|
50
|
+
6. Push your branch and create a pull request
|
|
51
|
+
|
|
52
|
+
We use [Semantic Versioning](https://semver.org/) for version management.
|
ezbak-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Nate Landau
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|