Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@ language: python

matrix:
include:
- python: 3.11-dev
- python: 3.14-dev
env: TOXENV=black
- python: 3.11-dev
- python: 3.14-dev
env: TOXENV=coveralls
- python: 3.9-dev
- python: 3.13-dev
env: TOXENV=full
- python: 3.9-dev
- python: 3.13-dev
env: TOXENV=min
- python: 3.10-dev
- python: 3.12-dev
env: TOXENV=full
- python: 3.10-dev
env: TOXENV=min
- python: 3.11-dev
env: TOXENV=full
- python: 3.11-dev
- python: 3.12-dev
env: TOXENV=min

before_install:
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import sys
import time


# Fetch general information about the project.
# Source: https://github.com/jaraco/skeleton/blob/skeleton/docs/conf.py
root = os.path.realpath(os.path.join(os.path.dirname(__file__), ".."))
Expand Down
54 changes: 54 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "virt-backup"
version = "0.5.6"
description = "Automatic backups for libvirt"
readme = "README.md"
license = {text = "BSD-2-Clause"}
authors = [{name = "Anthony Ruhier", email = "[email protected]"}]
requires-python = ">=3.12"
classifiers = [
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: BSD License",
]
dependencies = [
"appdirs",
"arrow",
"libvirt-python",
"lxml",
"packaging",
"PyYAML",
]

[project.optional-dependencies]
zstd = ["zstandard"]
test = ["pytest", "pytest-cov", "pytest-mock", "deepdiff", "apipkg"]

[project.scripts]
virt-backup = "virt_backup.__main__:cli_run"

[project.urls]
Homepage = "https://github.com/Anthony25/virt-backup"
Repository = "https://github.com/Anthony25/virt-backup"

[tool.setuptools.packages.find]
exclude = ["example", "tests"]

[tool.bumpversion]
current_version = "0.5.6"
commit = true
tag = true

[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

[[tool.bumpversion.files]]
filename = "virt_backup/__init__.py"
search = 'VERSION = "{current_version}"'
replace = 'VERSION = "{new_version}"'
20 changes: 0 additions & 20 deletions setup.cfg

This file was deleted.

49 changes: 0 additions & 49 deletions setup.py

This file was deleted.

3 changes: 1 addition & 2 deletions tests/helper/virt_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
)
from virt_backup.groups import BackupGroup


CUR_PATH = os.path.dirname(os.path.realpath(__file__))


Expand Down Expand Up @@ -235,7 +234,7 @@ def build_dombackup(dom, *dombackup_args, **dombackup_kwargs):
dom,
*dombackup_args,
callbacks_registrer=callbacks_registrer,
**dombackup_kwargs
**dombackup_kwargs,
)


Expand Down
40 changes: 13 additions & 27 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
[testenv]
deps =
apipkg
libvirt-python
pytest
pytest-mock
extras =
test
zstd
commands = pytest {posargs:-m "not no_extra"}

[testenv:full]
deps =
apipkg
libvirt-python
pytest
pytest-mock

commands= python setup.py test

[testenv:min]
deps =
apipkg
libvirt-python
pytest
pytest-mock

commands= python setup.py testmin
extras = test
commands = pytest {posargs:-m "not extra"}

[testenv:cov]
extras = test
zstd
commands = pytest --cov virt_backup --cov-config .coveragerc {posargs:-m "not no_extra"}

[testenv:black]
usedevelop=True
basepython=python3.11
changedir=.
deps =
{[testenv]deps}
black
commands=
black --check virt_backup tests
deps = black
skip_install = true
commands = black --check virt_backup tests
1 change: 0 additions & 1 deletion virt_backup/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from virt_backup.tools import InfoFilter
from virt_backup import APP_NAME, VERSION, compat_layers


logger = logging.getLogger("virt_backup")


Expand Down
1 change: 0 additions & 1 deletion virt_backup/backups/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import threading
from virt_backup.domains import get_domain_disks_of


__all__ = [
"DomBackup",
"DomCompleteBackup",
Expand Down
1 change: 0 additions & 1 deletion virt_backup/backups/complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from virt_backup.tools import copy_file
from . import _BaseDomBackup


logger = logging.getLogger("virt_backup")


Expand Down
1 change: 0 additions & 1 deletion virt_backup/backups/packagers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
BackupPackagerOpenedError,
)


logger = logging.getLogger("virt_backup")


Expand Down
2 changes: 1 addition & 1 deletion virt_backup/backups/packagers/tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(
compression=None,
compression_lvl=None,
*args,
**kwargs
**kwargs,
):
super().__init__(name)

Expand Down
1 change: 0 additions & 1 deletion virt_backup/backups/pending.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from . import _BaseDomBackup
from .snapshot import DomExtSnapshot


logger = logging.getLogger("virt_backup")


Expand Down
1 change: 0 additions & 1 deletion virt_backup/backups/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
)
from virt_backup.exceptions import DiskNotSnapshot, SnapshotNotStarted


logger = logging.getLogger("virt_backup")


Expand Down
1 change: 0 additions & 1 deletion virt_backup/compat_layers/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import logging
import yaml


logger = logging.getLogger("virt_backup")


Expand Down
1 change: 0 additions & 1 deletion virt_backup/compat_layers/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from packaging.version import parse as version_parser
import yaml


logger = logging.getLogger("virt_backup")


Expand Down
1 change: 0 additions & 1 deletion virt_backup/compat_layers/pending_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from virt_backup.domains import get_xml_block_of_disk
from . import definition as definition_compat


logger = logging.getLogger("virt_backup")


Expand Down
1 change: 0 additions & 1 deletion virt_backup/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from virt_backup import APP_NAME


logger = logging.getLogger("virt_backup")

os.environ["XDG_CONFIG_DIRS"] = "/etc"
Expand Down
1 change: 0 additions & 1 deletion virt_backup/domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from virt_backup.exceptions import DiskNotFoundError


logger = logging.getLogger("virt_backup")


Expand Down
1 change: 0 additions & 1 deletion virt_backup/groups/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from .complete import CompleteBackupGroup, complete_groups_from_dict
from .pending import BackupGroup, groups_from_dict


__all__ = [
"CompleteBackupGroup",
"BackupGroup",
Expand Down
1 change: 0 additions & 1 deletion virt_backup/groups/complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from virt_backup.exceptions import BackupNotFoundError, DomainNotFoundError
from .pattern import domains_matching_with_patterns


logger = logging.getLogger("virt_backup")


Expand Down
1 change: 0 additions & 1 deletion virt_backup/groups/pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from virt_backup.domains import search_domains_regex


logger = logging.getLogger("virt_backup")


Expand Down
1 change: 0 additions & 1 deletion virt_backup/groups/pending.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from virt_backup.exceptions import BackupsFailureInGroupError, CancelledError
from .pattern import matching_libvirt_domains_from_config


logger = logging.getLogger("virt_backup")


Expand Down
Loading