DEV Community

Elisaassa
Elisaassa

Posted on

OSD lab4 : Adding TOML Support to a GitHub Project

Overview

This week, I worked on adding support for reading configuration from a TOML file to a peer's project on GitHub. It was a great learning experience that took me through the ups and downs of coding and version control. Here’s a brief overview of how it went:

Coding the Feature

The goal was to modify the existing configuration setup to support TOML files so that users could manage settings more easily. I used the tomli library, which made parsing TOML files straightforward. After implementing the changes, I ran into a few minor issues around handling exceptions and ensuring the correct path for the config file. By using print debugging and carefully reading the documentation, I resolved these issues and tested the feature.

Working with Git: Challenges and Solutions

Using Git was where things got interesting. I created a new branch, issue-15, for the changes and set up the remote repository. Creating a Draft Pull Request and pushing changes was smooth, but I encountered conflicts when merging. The tricky part was resolving these conflicts without messing up the codebase. I used the GitHub conflict resolution tool, which helped me view both changes side by side and decide what to keep. After a few careful attempts, I managed to resolve the issues.

Lessons Learned

  • Handling Merge Conflicts: Resolving conflicts taught me the value of keeping my branch up to date with the latest changes from main. I should have synchronized more frequently to avoid major conflicts.

  • Frequent Communication: My peer was very detailed and precise in their responses. My peer not only replied quickly but also provided clear instructions on how to resolve specific issues, such as the exact commands and code adjustments needed. This level of detail made it much easier to understand and fix the problems quickly.

Top comments (0)