Articles on chirag's Bloghttps://blogs.python-gsoc.orgUpdates on different articles published on chirag's BlogenThu, 31 Aug 2023 06:24:46 +0000Weekly Check-In #13https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-13-6/<h1>What did I do this week?</h1> <p>This was the final week of GSoC program. I completed my <a href="https://chirag.sh/gsoc-2023-wrapping-things-up/">final report</a> and submitted the final evaluation form.</p> <h2>What's coming up next?</h2> <p>Everything is almost completed. There are only minor reviews pending on the filter task however I ran into issue with VM on Macbook and I can't access my primary laptop till next Monday. I'm fixing the issue so we can merge the PR by next week.</p> <h2>Did I get stuck anywhere?</h2> <p>No.</p>thechiragaggarwal@gmail.com (chirag)Thu, 31 Aug 2023 06:24:46 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-13-6/Weekly Check-In #12https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-12-8/<h1>What did I do this week?</h1> <p>I worked on further changes and improvement to my filter PR, mostly code refactoring as suggested by my mentor. The PR is complete from functionality point-of-view and only internal changes are left now.</p> <h2>What's coming up next?</h2> <p>I'm aiming to complete rest of minor changes in upcoming days and merge the PR by this month.</p> <h2>Did I get stuck anywhere?</h2> <p>I had some issue with writing tests due to a bug where a pyqt signal wasn't disconnected properly raising exception on executing new dialog window. I disconnected the signal properly and it's fixed now.</p>thechiragaggarwal@gmail.com (chirag)Thu, 24 Aug 2023 01:03:13 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-12-8/Weekly Check-In #11https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-11-16/<h2>What did I do this week?</h2> <p>I completed the filtering feature this week and it's ready for review.</p> <h2>What's coming up next?</h2> <p>I'm awaiting a review on the PR currently and I'll add unit tests in upcoming days. This is the last pending task for this GSoC project.</p> <h2>Did I get stuck anywhere?</h2> <p>No.</p>thechiragaggarwal@gmail.com (chirag)Tue, 15 Aug 2023 15:15:07 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-11-16/Weekly Check-In #10https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-10-17/<h2>What did I do this week?</h2> <p>Finally my <a href="http://github.com/borgbase/vorta/pull/1716">Integration Test PR</a> is merged and I also progressed on my passphrase change feature last week which is also almost ready to be merged.</p> <h2>What's coming up next?</h2> <p>I am planning to complete my Filtering feature PR by second week which would conclude my GSoC '23.</p> <h2>Did I get stuck anywhere?</h2> <p>No.</p>thechiragaggarwal@gmail.com (chirag)Tue, 08 Aug 2023 10:22:42 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-10-17/Weekly Check-In #9https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-9-23/<h2>What did I do this week?</h2> <p>Last week was hectic as my college opened and I have a lot of classes this semester. For the development task, I worked more on the filtering task. I added size filter, improved the general search syntax based on my mentor's input and added this same feature to the extract view. I also worked on an old PR for borgmatic while another old PR for vorta to add a common password input widget was merged. </p> <h2>What's coming up next?</h2> <p>For the filtering task, 2-3 filters dependent on view (Diff or Extract) are pending now. I plan to add them this week and also work on another PR which was dependent on Password Input Widget which is now merged.</p> <h2>Did I get stuck anywhere?</h2> <p>Not in the development but I felt a bit overwhelmed this week.</p>thechiragaggarwal@gmail.com (chirag)Tue, 01 Aug 2023 19:16:38 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-9-23/Weekly Check-In #8https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-8-16/<h2>What did I do this week?</h2> <p>This week I only worked on the Filtering feature for Vorta. Most challenging part was to create a syntax which can be easily understood and utilized by people and fulfil various filtering needs. My mentor helped me through this and I wrote the final syntax which is using the `argparse` module for Python hence the syntax is kept similar to Unix commands as well. Then I wrote the filter logic for matching path name and filename, specific match type like in, exact, ignore case.</p> <h2>What's coming up next?</h2> <p>I've been suggested some modifications in the syntax which I plan to complete and then cover more filter logic this week.</p> <h2>Did I get stuck anywhere?</h2> <p>No.</p>thechiragaggarwal@gmail.com (chirag)Mon, 24 Jul 2023 10:31:53 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-8-16/Weekly Check-In #7https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-7-25/<h2>What did I do this week?</h2> <p>Opened PR for search syntax feature in Vorta. As predicted in my previous blog, it currently only supports basic search filter which matches the row's (file's) name with the search input.</p> <h2>What's coming up next?</h2> <p>The most challenging part of this PR is to add various filtering options like path and size and providing search syntax to facilitate these search and possibly with a user friendly dialog/interface for this.</p> <h2>Did I get stuck anywhere?</h2> <p>No.</p>thechiragaggarwal@gmail.com (chirag)Mon, 17 Jul 2023 13:52:10 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-7-25/Weekly Check-In #6https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-6-25/<h2>What did I do this week?</h2> <p>I completed the PR for refactoring the borgmatic's docker image. It got merged and I'm now looking at my next task.</p> <h2>What's coming up next?</h2> <p>I will be working on the filtering task for Vorta. Next week I aim to open a PR with basic search function.</p> <h2>Did I get stuck anywhere?</h2> <p>No.</p>thechiragaggarwal@gmail.com (chirag)Mon, 10 Jul 2023 02:36:57 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-6-25/Weekly Check-In #5https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-5-28/<h2>What did I do this week?</h2> <p><br> This week I worked mostly on the docker task. I wrote several sections in README.md to explain how it the image can be used in different ways. I added several features to entry.sh to allow configuration via environment variables and also to allow using borgmatic subcommands directly. </p> <p>My commits these week were low compared to previous ones but I learned a lot. I did get sidetrack as I tried to create several of my images to learn Dockerfile and tried various deployment using GH Actions and deployment tools which costed me a lot of hours.</p> <h2><br> What's coming up next?</h2> <p>I plan to work further on this task but I've also picked up an old PR for borgmatic which was pending. There are several merge conflicts due to new changes which I'm resolving so I can get back to writing actual code.</p> <h2><br> Did I get stuck anywhere?</h2> <p><br> I did. I couldn't figure out how to allow user to directly use borgmatic subcommands with docker-compose. <a href="https://github.com/borgmatic-collective/docker-borgmatic/pull/240/commits/a677dfbbd9799b62a6f001a1e19783eecad8a916#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R103">See this comment</a>.</p>thechiragaggarwal@gmail.com (chirag)Tue, 04 Jul 2023 21:48:56 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-5-28/Weekly Check-In #4https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-4-23/<h2>What did I do this week?</h2> <p><br> <strong>Integration Testing Task:</strong><br> This week was quite intense. I was determined to complete my integration testing task. I skimmed through a lot of discussions on Borg's repository to find answers to installation issues I was encountering.<br> <br> Additionally, running all tests through nox was time-consuming as tests were not concurrent. With suggestion of my mentor, I switched to using Github Action's matrix feature. It created jobs which are run concurrently upto certain limit and it dramatically reduced total time to complete all tests.</p> <p>After a lot of patches and minor bug fixes, all of the tests finally passed across all the supported combinations.<br> <br> <strong>Remove antiquated msmtp and ntfy images Task:</strong><br> <br> This task is the shorted one in my application. I submitted PR for this task after completing the required changes. I got to learn more about the Dockerfile and images in general.<br> <br> <strong>Key learning this week:</strong><br> - Github Action, matrix and composite action<br> - Dockerfile</p> <h2><br> What's coming up next?</h2> <p>I received several suggestions on my docker PR by my mentor and I plan to complete them this week. </p> <h2><br> Did I get stuck anywhere?</h2> <p><br> Not particularly.</p>thechiragaggarwal@gmail.com (chirag)Mon, 26 Jun 2023 17:27:33 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-4-23/Weekly Check-In #3https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-3-29/<p>I would like to begin this blog post by extending my sincere apologies for the delay in its submission. </p> <h2>What did I do this week?</h2> <p>Last week I worked on Github Action flow and fixing various bugs related to tests compatibility between various borg and python versions. I found various difference in borg outputs depending on versions (especially the borg diff command). I wrote conditions to accomodate those differences.</p> <p>Different versions of borg had different dependencies. I therefore also modified the CI configuration file to install them before running nox.</p> <h2>What's coming up next?</h2> <p>There are still minor bugs to iron out in this task. I've already starting working on my task related to docker and plan to fix these bugs alongside it. </p> <p>For the next task, I configured a VPS with Ubuntu 22.04 to keep the development environment seperate. I'm starting by understanding the Dockerfile in more depth.</p> <h2>Did I get stuck anywhere?</h2> <p>No. I did encounter several bugs but they were easy to fix.</p>thechiragaggarwal@gmail.com (chirag)Thu, 22 Jun 2023 10:33:41 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-3-29/Weekly Check-In #2https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-2-19/<h2>What did I do this week?</h2> <p>I completed writing my tests for ongoing "live Borg testing" task. I also completed the nox configuration file to test for all the Borg versions and their supported python versions.</p> <h2>What's coming up next?</h2> <p>I now need to configure the Github Action flow for Vorta repository to use these integration tests effectively. This includes setting up environment with all supported python versions active so nox can use them and also run both unit and integration tests.</p> <h2>Did I get stuck anywhere?</h2> <p>Yes, I found it somewhat tricky to understand the current Github Action file and how exactly it works. Testing each change also requires a new commit for which I am considering using <a href="https://github.com/nektos/act">Act</a> to run them locally.</p>thechiragaggarwal@gmail.com (chirag)Tue, 13 Jun 2023 13:27:53 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-2-19/Weekly Check-in #1https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-1-24/<h2>What did I do this week?</h2> <p>This week I progressed further on my task to add live borg binary tests. I went through supported file types for Borg and Vorta and added them in tests. Additionally, I also wrote several new tests including initialization of new repository through Vorta.</p> <p>Currently my goal is to complete all the tests by 10th June and I'm almost there. I'll then move this task to "improvement" status where I can get reviews from my mentor and complete them.</p> <h2>What's coming up next?</h2> <p>Most of my upcoming week will be spent on completing this task. After which I would try to improve the performance of integration tests and start working on my next task. I also have a task related to Docker image which I am excited to try. I'll try to setup a development environment for that in the meantime.</p> <h2>Did I get stuck anywhere?</h2> <p>I did not.</p>thechiragaggarwal@gmail.com (chirag)Mon, 05 Jun 2023 22:32:51 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-1-24/Weekly Check-In #0 - The beginninghttps://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-0-the-beginning/<p>Hi there!</p> <p>Just wanted to introduce myself quickly before going into project details. I am Chirag Aggarwal, a second-year Bachelor's student of Computer Science &amp; Engineering (AI &amp; 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.</p> <h2>Community Bonding Period</h2> <p>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.</p> <p>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.</p> <p>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.</p> <p><strong>Some technical Details</strong></p> <p>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.</p> <pre><code>@nox.parametrize("borgbackup", ["1.2.4"]) def run_tests(session, borgbackup): session.install(f"borgbackup=={borgbackup}")</code></pre> <p>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.</p> <pre><code>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</code></pre> <p>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.</p> <h2><b>Goals for Week 1</b></h2> <p>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!</p>thechiragaggarwal@gmail.com (chirag)Sun, 28 May 2023 20:20:42 +0000https://blogs.python-gsoc.org/en/chirags-blog/weekly-check-in-0-the-beginning/