Contributing

First off, thanks for taking the time to contribute!

All contributions that improve Vorta for everyone are welcome. Before coding a new feature it’s usually best to discuss it with other users on GitHub or Matrix.

If your questions are Borg-specific it might be advisable to join the #borgbackup IRC channel on chat.freenode.net instead. Matrix is very suitable to be used as an always-on IRC-client, simply register/identify to NickServ and then join the room #freenode_#borgbackup:matrix.org.

Local Development Setup

macOS (or Linux if Flatpak is not an option) with pip

Clone the latest version of this repo:

$ git clone https://github.com/borgbase/vorta/

Install in development/editable mode while in the repo root:

$ pip install -e .

Install additional developer packages (pytest, tox, pyinstaller):

pip install -r requirements.d/dev.txt

Then run as Python script. Any changes from your source folder should be reflected.

$ vorta

Working on the GUI

Qt Creator is used to edit views. Install from their site or using Homebrew and then open the .ui files in vorta/assets/UI with Qt Creator:

$ brew cask install qt-creator
$ brew install qt

For UI icons, we use Fontawesome. You can browse available icons here and download them as SVG here. New icons are first added to both src/vorta/assets/icons/dark/collection.qrc and src/vorta/assets/icons/light/collection.qrc. Then, the command make icon-resources is run to compile them to a resource file which is used by the UI files.

Building Binaries

To build a macOS app package:

  • add Sparkle.framework from here and borg from here in bin/macosx64
  • then uncomment or change the Apple signing profile to be used in Makefile
  • finally run to $ make Vorta.app to build the app into the dist folder.

Testing

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:

$ pytest

To test for style errors:

$ flake8

Table of contents