Fast-forward and three-way merges

sych_andrii

Andrii Sych

Posted on September 28, 2024

Fast-forward and three-way merges

While working on my project Infusion:
https://github.com/SychAndrii/infusion

I decided to implement 2 new features - streaming responses from LLM in real time and usage of appropriate exit codes upon program completion. However, instead of creating conventional pull requests to integrate changes into main branch, I was tasked to do the merges locally in my repo, and then push results of the merges to the remote repo.

The first issue was to implement exit codes:
https://github.com/SychAndrii/infusion/issues/34

Closed with merge commit:
https://github.com/SychAndrii/infusion/commit/b01f493a8eb3c86aad00760f41f8adf0b93b231e

This task was pretty easy to implement since python provides you with a sys package to return status codes. I have decided to have 4 error status codes for my program:

0 - Program ended successfully.
1 - Invalid options provided.
2 - Invalid files provided.
3 - Unknown error.

On top of adding status codes, I have also refactored the code to be more intuitive with use of more functions.

My second issue was to implement streaming:
https://github.com/SychAndrii/infusion/issues/33

Closed with merge commit:
https://github.com/SychAndrii/infusion/commit/b01f493a8eb3c86aad00760f41f8adf0b93b231e

This task was more difficult to do because of LangChain library I am using for my project. This library is relatively new, so documentation for streaming with astream function is very unintuitive and difficult to understand.

I have always hated python and will keep doing it for the rest of my life. I tried to become more comfortable using it with this project, but after languages like C#, TypeScript, or Kotlin - I just can't take Python seriously.

💖 💪 🙅 🚩
sych_andrii
Andrii Sych

Posted on September 28, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Fast-forward and three-way merges
opensource Fast-forward and three-way merges

September 28, 2024

Filing Issues on GitHub
opensource Filing Issues on GitHub

September 17, 2022

Merging Makes the Spice Flow
opensource Merging Makes the Spice Flow

October 5, 2020