Weekly Check-In #0 - The beginning

Published: 05/28/2023

Hi there!

Just wanted to introduce myself quickly before going into project details. I am Chirag Aggarwal, a second-year Bachelor's student of Computer Science & Engineering (AI & ML) at Manipal University Jaipur, India. In this blog series, I hope to share some insightful details about my upcoming participation in the development of projects under Borg Collective Sub Organization.

Community Bonding Period

Also called Week 0, this time period allows contributors to connect with their mentors, set up their environments and prepare to start working on their project. During this period, we reorganized the priority of my tasks and made several changes considering my interest and the tasks of other contributors under Borg Collective.

In the second-to-last week, I completed and closed three of my Pre-Acceptance PRs and prepared my environment for my first task. I am currently working on the task to add integration testing to Vorta, which is named "Test on live Borg binary." For my environment setup, I opted to use Kali Linux running as a VM on my desktop. Additionally, since Vorta supports macOS, I configured a Python virtual environment on a Mac to ensure compatibility for these new tests.

In the last week, I dedicated my time to thoroughly understanding the existing tests, writing the Nox configuration file, and converting the first test file.

Some technical Details

I discovered Nox through my mentor, and configuring it became my favorite part. It’s a simple yet powerful tool. Goal of this task is to enable testing various versions of BorgBackup for each test. This part was accomplished using Nox's Parameterization feature, which required only three lines of code.

@nox.parametrize("borgbackup", ["1.2.4"])
def run_tests(session, borgbackup):

I had concerns about potential conflicts between system installation of Borg and PIP installation. In some cases, global installation might be preferred, which could defeat the purpose of these tests. To address this, I added a version check.

cli_version = session.run("borg", "--version", silent=True).strip()
cli_version = re.search(r"borg (\S+)", cli_version).group(1)
python_version = session.run("python", "-c", "import borg; print(borg.__version__)", silent=True).strip()

session.log(f"CLI version: {cli_version}")
session.log(f"Python version: {python_version}")

assert cli_version == borgbackup
assert python_version == borgbackup

After configuring nox, I went through conftest.py file which defines various fixtures to set up Vorta and allow tests to utilize profiles and mock various borg outputs. I began by writing a function to setup Borg repository, source folder with various file types and create archives for different kind of changes.

Goals for Week 1

My goal is to convert the archive tests file by Week 1. Many of the tests are already completed but require refinement and the Borg repo initialization function needs improvement. Initially, this task seemed challenging when I first submitted my proposal, but now things are falling into place. I am excited for the week ahead!