Update README. Clean up setup.cfg. Debug pytest segfault.

This commit is contained in:
Manu 2018-11-05 18:30:59 +08:00
parent 5f494fb38e
commit 0578df4019
6 changed files with 26 additions and 19 deletions

2
.gitignore vendored
View File

@ -10,3 +10,5 @@ Makefile
.eggs
vorta.egg-info
.coverage
.tox
.python-version

View File

@ -8,28 +8,28 @@ Vorta is an open source macOS/Linux GUI for [BorgBackup](https://borgbackup.read
- Encrypted, deduplicated and compressed backups.
- Works with any remote SSH account that has `borg` installed. Or try [BorgBase](https://www.borgbase.com) for advanced features like append-only repositories and monitoring.
- Add SSH keys and initialize repos directly from the GUI
- Repo keys are securely stored in macOS Keychain, Secret Service or KWallet
- Mount existing snapshots via FUSE
- Add SSH keys and initialize repos directly from the GUI.
- Repo keys are securely stored in macOS Keychain, Secret Service or KWallet.
- Mount existing snapshots via FUSE.
- Prune and check backups periodically.
- Flexible scheduling for automatic background backups. Only allow on certain Wifis.
- View a list of snapshots and action logs
- View a list of snapshots and action logs.
- Exclude options/patterns.
Coming soon:
- [ ] Support multiple backup profiles (in progress)
- [ ] Repo pruning
- [ ] Repo checking
- [ ] Full test coverage (currently: 65%)
- [ ] Use static type checks via mypy?
- [ ] Packaging for Linux? How?
## Installation and Download
Vorta should work on all platforms that support Qt and Borg. Currently Borg doesn't support Windows, but this may change in the future. Setting allowed Wifi networks is currently not supported on Linux, but everything else should work.
### macOS
Download the pre-built binary from [Releases](https://github.com/borgbase/vorta/releases). Just download, unzip and run.
Download the pre-built macOS binary from [Releases](https://github.com/borgbase/vorta/releases). Just download, unzip and run.
### Linux
No package yet. First install Borg's own [dependencies](https://borgbackup.readthedocs.io/en/stable/installation.html#dependencies). Then install via
First install Borg and its own [dependencies](https://borgbackup.readthedocs.io/en/stable/installation.html#dependencies). Then install Vorta from Pypi:
```
$ pip install vorta
```
@ -40,9 +40,10 @@ $ vorta
```
## Development
Install in development mode:
Install in development/editable mode while in the repo:
```
$ python setup.py develop
$ pip install -e .
```
Then run via
@ -62,6 +63,7 @@ $ pyinstaller --clean --noconfirm vorta.spec
```
### Testing (work in progress)
Tests are in the folder `/tests`. Testing happens at the level of UI components. Calls to `borg` are mocked and can be replaced with some example json-output. To run tests:
```
$ python setup.py test

View File

@ -26,7 +26,6 @@ license_file = LICENSE.txt
[options]
python_requires = >= 3.6
setup_requires =
setuptools >= 38.6
pip >= 10
pytest-runner
setuptools_git
@ -44,9 +43,6 @@ tests_require =
pytest-qt
pytest-mock
pytest-faulthandler
mypy
mypy-extensions
coverage
[options.entry_points]
gui_scripts =
@ -69,8 +65,12 @@ source = src
ignore_missing_imports = true
[tox:tox]
envlist = py36,py37
envlist = py36
[tox:testenv]
deps=pytest
[testenv]
deps =
pytest
pytest-qt
pytest-mock
pytest-faulthandler
commands=pytest

View File

@ -5,6 +5,7 @@ import peewee
import vorta
from vorta.application import VortaApp
@pytest.fixture()
def app(tmpdir):
tmp_db = tmpdir.join('settings.sqlite')

View File

@ -6,6 +6,7 @@ import vorta.models
from vorta.views.repo_add import AddRepoWindow
from vorta.models import EventLogModel, RepoModel
def test_repo_tab(app, qtbot):
main = app.main_window
qtbot.mouseClick(main.createStartBtn, QtCore.Qt.LeftButton)

View File

@ -4,7 +4,8 @@ from PyQt5 import QtCore
from vorta.views.schedule_tab import ScheduleTab
def test_schedule_tab(app, qtbot):
tab = ScheduleTab(app.main_window.scheduleTab)
main = app.main_window
tab = main.scheduleTab
qtbot.mouseClick(tab.scheduleApplyButton, QtCore.Qt.LeftButton)
assert tab.nextBackupDateTimeLabel.text() == 'Manual Backups'