DEV Community

Christian Duarte
Christian Duarte

Posted on

Week 3 (Lab + v0.1)

LAB

Contributing a code change...

This week, I was tasked with committing code changes to a partner's code.

The code I selected to work on was DocBot, created by my partner Adam Davis located at https://github.com/Add00/DocBot

Specifically, I worked on issue https://github.com/Add00/DocBot/issues/8 which was then worked into pull request https://github.com/Add00/DocBot/pull/9

In this assignment I was tasked with adding a --token-usage and -t argument flag. This would specify that the user wants information displayed regarding token usage in the console.error or stderr window.

At first I had added 2 if statements into his each outcome scenarios, sticking to his style of coding to print the information to the error console.

When I pushed the branch and he saw the pull request, he instructed me to fix up the code by tuning it into a function to make his code have no repeat values that are unnecessary and to make the code more clean. I did just that and he pulled my request into his main branch, establishing me as a contributor to DocBot!

For my own repo of F2Read at https://github.com/Add00/DocBot/pull/9 it was a bit more straight forward. Adam worked on issue https://github.com/cduarte3/f2read/issues/9 and it was turned into pull request https://github.com/cduarte3/f2read/pull/10

My criticism was quite lesser, as I was satisfied with his approach of where to handle the statement. But the formatting was not good, and did not present well in the terminal, to which I instructed him to improve upon and he did.

I also noticed some typos in my own code throughout this lab, and will be fixing those, as well as updating my instructions.

Next time, I think it may be more beneficial for me to specify in the issue how I will go about implementing in more detail, and ask for a more detailed response in return so that there will be no need for any fixes to occur.

RELEASE 0.1

Video Demo ...

Live video demo is available at https://youtu.be/49qAXeld43c

How to use...

In the README.md instructions of my F2Read repo located at https://github.com/cduarte3/f2read there are instructions for how to run. But I will reiterate them here anyway.

Step 1:

Step 2:

Step 3:

  • Use the run command to start the model.
  • Example, if you are using gemma 2 the command would be "ollama run gemma2:2b"

Step 4:

  • Pull the repo and get files ready.
  • Clone or fork, and run the commands

Once these steps have been completed and the model is running, you may run the command line interface tool. The commands and usage guide will be as follows:

Image description

That's all for this week, please visit my repo at https://github.com/cduarte3/f2read to contribute or to leave some feedback, I'd love to hear it.

See you next week!

20-09-2024 - Christian Duarte

Top comments (0)