😊 Thanks for taking the time to contribute!
The maintenance team welcomes all types of contributions. No contribution will be rejected solely because it doesn't meet our quality standards, guidelines, or rules. Every contribution is reviewed, and if necessary, improved in collaboration with the maintenance team. New contributors who may need assistance or are less experienced are warmly welcomed and will be mentored by the maintenance team upon request.
- Quick guide
- Best practice and recommendations
- Resources
- Build & Install
- Testing
- Further reading
- Licensing of contributed material
Important
Please remember to create a new branch before you begin any modifications.
Baseline your feature or bug fix branch on dev
(reflecting the latest development state).
-
Fork this repository. See Microsoft GitHub's own documentation about how to fork.
-
Clone your own fork to your local machine and enter the directory:
$ git clone git@github.com:YOURNAME/backintime.git $ cd backintime -
Create and checkout your own feature or bugfix branch with
devas baseline branch:$ git checkout --branch myfancyfeature dev -
Now you can add your modifications.
-
Commit and push it to your forked repo:
$ git commit -am 'commit message' $ git push -
Test your modifications. See section Build & Install and Testing for further details.
-
Visit your on repository on Microsoft GitHub's website and create a Pull Request. See Microsoft GitHub's own documentation about how to create a Pull Request based on your own fork.
Please take the following best practices into account if possible. This will reduce the work load of the maintainers and to increase the chance that your pull request is accepted.
- Follow PEP 8 as a minimal Style Guide for Python Code
- For docstrings follow Google Style Guide (see our own HOWTO about doc generation).
- Be careful when using automatic formatters like
blackand please mention the use of it when opening a pull request. - Run unit tests before you open a Pull Request. You can run them via
make-system withcd common && ./configure && make && make testor you can usepytest. See section Build and install viamakesystem for further details. - Try to create new unit tests if appropriated. Use Pythons regular
unittestinstead ofpytest. If you know the difference please try follow the Classical (aka Detroit) school instead of London (aka mockist) school.
- Mailing list bit-dev for development related topics
- Source code documentation for developers
- Translations are done on a separate platform
- HowTo's and maintenance documents
This section describes how to build and install Back In Time in preparation
of your own contributions. It is assumed that you git clone this repository
first.
The following dependencies are based on Ubuntu. Please open an Issue if something is missing. If you use another GNU/Linux distribution, please install the corresponding packages. Be aware that some of the named packages can be replaced with PyPi packages.
-
Runtime dependencies for the CLI
python3(>= 3.8)rsynccron-daemonopenssh-clientpython3-keyringpython3-dbuspython3-packaging- Recommended
sshfsencfs
-
Runtime dependencies for the GUI
x11-utilspython3-pyqt6python3-dbus.mainloop.pyqt6libnotify-binpolicykit-1qttranslations6-l10nqtwayland6(if Wayland is used as display server instead of X11)- Recommended
- For SSH key storage one of these packages
python3-secretstoragepython3-keyring-kwalletpython3-gnomekeyring
- For diff-like comparing files between backup snapshots one of these
packages
kompare- or
meld
- Optional: Default icons
- The
oxygenicons should be offered as optional dependency since they are used as fallback in case of missing icons (mainly app and system-tray icons)
- The
- For SSH key storage one of these packages
-
Build and testing dependencies
- All runtime dependencies for CLI and GUI including the recommended
build-essentialgzipgettextpython3-pyfakefspylint
Remember that Back In Time does consist of two packages, which must be built and installed separately accordingly.
-
Command line tool
cd common./configure && make- Run unit tests via
make test sudo make install
-
Qt GUI
cd qt./configure && make- Run unit tests via
make test sudo make install
You can use optional arguments to ./configure for creating a Makefile.
See common/configure --help and qt/configure --help for details.
- Run
./makedeb.shin the repositories root directory. - Two
debfiles are built and places in the repositories parent directory. - Install the packages
sudo dpkg -i ../backintime-common-<version>.debsudo dpkg -i ../backintime-qt-<version>.deb
Important
Remember to manually test Back In Time and not rely solely on the automatic test suite.
After building and installing, make can be used to run the
test suite. Since Back In Time consists of two components, common and qt,
the tests are segregated accordingly.
$ cd common
$ make test
Or
$ cd qt
$ make test
Alternatively use make test-v for a more verbose output. The make system
will use pytest as test runner if available otherwise Python's own unittest
module.
Some tests require an available SSH server. They get skipped if this is not the
case. The goal is to log into the SSH server on your local computer via
ssh localhost without using a password:
- Generate an RSA key pair executing
ssh-keygen. Use the default file name and don't use a passphrase for the key. - Populate the public key to the server executing
ssh-copy-id. - Make the
sshinstance run. - The port
22(SSH default) should be available.
To test the connection just execute ssh localhost and you should see an
SSH shell without being asked for a password.
For detailed setup instructions see the how to setup openssh for unit tests.
- https://www.contribution-guide.org
- https://mozillascience.github.io/working-open-workshop/contributing
Keep in mind as you contribute, that code, docs and other material submitted to the project are considered licensed under the same terms (see LICENSE) as the rest of the work.
April 2024