DEV Community

sfrunza13
sfrunza13

Posted on

Collaborating...

The task

In the past weeks we were tasked as a class with creating a static site generator that will take .txt files and convert them to HTML markup. I chose to work in Python and added the features of specifying an output directory and parsing an H1 and title from the first line of the .txt file.

Finding fellow students to collaborate with

Given that all of the students in our open source development course are all in the same slack and that a lot of us are pretty comfortable with posting on there finding people to collaborate with and ask for help has been very quick and easy. Ivan and Maxim are two individuals who I found in the slack channel and we peer reviewed each other's code.

Beginning to collaborate

As our time working on the first release is coming to an end it is still apparent that many of us are at widely varying stages of development of our own versions of the tool. Initially I was going to work with Ivan Gabrovsky but at this stage it is not possible to test his code, however I commented on the lack of details in his initial README.md and I will be testing it upon further commits. He was nice enough to take a look at my code and try to get it to work on his machine. He is using an Apple computer whereas I am working on a Windows machine. He found an error I will have to look into in the future that said that the encode function in a part of my code was not working or something to that effect. I was not able to replicate and debug it, neither was the other student that I began collaborating with, however I will keep an eye out for it.

Given that I could not contribute too much to the code Ivan was currently working with I tried to look over Maxim's code and raised a few issues for him, such as a dependency that seems to be out of date in his node project.

My first closed issue

https://github.com/sfrunza13/SiteGenerationTool/issues/1
Maxim found a different error in my code that I could replicate and that I immediately fixed upon his bringing it up. The dist folder was not always being created in my site generator. If there was no dist folder in the project structure and there was no specified output it would raise an error due to it being in the same try catch as the attempt to delete the old directory. To fix this I removed it from that try catch and now even if there is an error with the deletion of the old directory (say it's not there for example) then it still creates the new directory by the same name.

try:

        shutil.rmtree(SiteGen.output)
        os.mkdir(SiteGen.output)
    except OSError as error:
        print(error)
Enter fullscreen mode Exit fullscreen mode

vs

    try:

        shutil.rmtree(SiteGen.output)

    except OSError as error:
        print(error)

    os.mkdir(SiteGen.output)
Enter fullscreen mode Exit fullscreen mode

What I learned

It is hard to get stuff running on one anothers machines. The README.md needs to have way more details than I initially anticipated even if people testing the program are as tech-savvy as the writer. Also, I learned that it's extremely beneficial to do so seeing as an issue immediately arose in both cases, one I was lucky enough to be able to replicate and fix, the other not so much but we'll get there.

Top comments (0)