DEV Community

Roman Rezinkin
Roman Rezinkin

Posted on

DPS909 - Lab 7

Introduction

For this weeks lab in DPS909 (Open source development) we accomplished some big things. The purpose of the lab was to implement a few new features into our static site generator (mine).

New Features within RomanStaticSG

The first task was to create a Contributing.md file within our project. This file is responsible for letting new developers understand how to contribute to my open source project. This was something that was very crucial to add in my open source project.
You can see the changes here

Feature 1

For feature 1, we had to implement a formatter for our project. Since my static site generator is developed in Python, I opted to use the black formatter. It has the best features, and is one of the most popular formatters for Python.
You can see the changes that the formatter did, as well as my simple bash script that the user can run to format the files at the same time.
Commit

Feature 2

For feature 2, we have to implement a linter for our project. Since my static site generator is developed in Python, I opted to use Pylint. This linter is very powerful and has many great features. After running the linter, it provided me a lot of feedback on how I can improve my code. So I spent about 30-40 minutes fixing it all to make my code 100% efficient. This included changes file names, changing variable names, etc. All of my changes could be found here Commit

Feature 3

The final feature was to implement IDE integration. This meant integrating my formatter and linter so that the next developer would have automatic usage of the formatter and linter, instead of running my shell scripts. Anytime something is automatic rather than manual, it makes the setup process and development process that much easier. I introduced a .vscode folder and a settings.json file that introduces a few parameters to enable Pylint and Black.

Conclusion

Overall, this lab was not too difficult, however, it introduced me to Python formatters and linters. These features cleaned up my code, and will also ensure that any future contributions will be done up to standard. The introduction of the CONTRIBUTION.md file, will also allow new users to gain a perspective how they can contribute to my open source project.

Top comments (0)