Skip to content

Instantly share code, notes, and snippets.

@shreyarwal
Last active Aug 23, 2021
Embed
What would you like to do?
GSoC Work Product Submission

Google Summer of Code 2021 Work Product Submission

Improve coala formatting

Hello, I am Shreya Agarwal, a pre-final year student studying Computer Science. I was working on improving coala formatting as a part of the Google Summer of Code 2021 Project. The project is to improve the coala-json library to support new formatters and extensions along with support for the new Python versions. The project improves the overall usability and API support for coala, a language independent static code analysis tool.

Mentors

  • Bhushan Khanale
  • Abhinav Kaushlya

Contributions

  1. Setup coala-format repository.

  2. Updates to the project docs.

  3. Add LICENSE for the open-source project.

  4. Import coala-json source.

  5. Update formatters to use coala-format.

  6. Add project docs.

  7. Setup netlify to generate docs.

  8. Add unittests for coala-format library.

  9. Add test-requirements.txt file.

  10. Setup package initialization.

Work done

  • The new coala-format supports latest Python versions and extends the formatters previously supported by coala-json lib.
  • The docs and unittests are also added and improved from the previous implementation for better code quality.
  • Support for Python 3.6 to Python 3.9.
  • Improved CI setup.

Work left to be done

  • coala right now is still yet to support latest Python versions which can take some time. The formatters repository can be used once the support on coala core has been implemented.
  • Since coala does not support Windows, formatter too doesn't have to support the operating system as there is a very small user base on the mentioned systems. This will help the formatter code to be more robust.
  • Few formatters are not yet supported on coala core, which I will be working on as a post-GSoC task.

Challenges

Due to my entire family being infected by the Covid-19 virus, I was slow in getting things done. I lost a big chunk of around 2-3 weeks in the first coding period itself. This meant that I had very little time to get back to coding. I spent a lot of time working on things, and communicated accordingly to my mentors. Although, this was a bit unexptected and caused few issues to the project. The coala core still needs to have better Python support, so it was difficult to test things. I had to make a lot of assumptions in order to make sure the changes work. These tests are more of integration tests with the coala core and coala-bears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment