Mid-point Internship Progress

Last week was week 7 of my Outreachy internship with HOTOSM. A mid-point of the 13-week internship, and here is what I have done so far:

What I have done so far

  • Integrated pre-commit hooks with fAIr's backend

  • Integrated dependency management on fAIr

  • Added documentation on how to use the choice tool for dependency management.

  • [In the pipeline] backend tests for fAIr

A deeper dive into what I have done so far:

Pre-commit hooks help enforce standards in your code submission and help you identify issues in your code before you can commit to the project's repository. That way, every addition follows a standard. My choice of pre-commit hooks were:

  • Ruff: A fast Python linter and code formatter, written in Rust

  • Commitizen: Enforces writing descriptive commits and makes commits easier to read

  • check-yaml: Loads all yaml files to verify the syntax

  • end-of-line-fixer: Makes sure files end in a newline and only a newline

  • trailing-whitespace: Trims trailing whitespace

  • The last 3 are provided by pre-commit

For dependency management, I chose PDM because it supports the latest PEP standards, like the use of pyproject.toml file for the project's dependency instead of a requirements.txt file. I set it up with the fAIr's dependencies and updated the set-up documentation with how to install it and install the dependencies.

Initial Timeline vs Progress

From the onset, I was supposed to make contributions to 2 projects, which are:

Here is my proposed timeline from the contribution phase:

  1. May-June (Weeks 1-4)

    • Familiarise with HOT tech tools, tech and data team and open-source community

    • Deliver on/improve PRs from the contribution phase

    • Introduction to fAIr and raw data API - pre-commit, CI(continuous Integration) and set up workspace

    • Write a diary about the internship progress

      How it went:

      Firstly, I didn't know better about the blog posts ๐Ÿ˜‚. They are more frequent than I anticipated. There were 2 blog posts within the first 4 weeks.

      Then, as I mentioned above, I set up pre-commit for fAIr and I set up the project locally. Hence, there were no outstanding tasks from the first 4 weeks.

  2. June-July (Weeks 5-9)

    • Work with the mentor to write production-ready test cases

    • Write code documentation and refactor fAir's backend with standard practices

    • Write a diary about the internship progress

      How it is going ๐Ÿ“:

      I spent a good time so far learning to write tests. The process has helped me understand fAIr more. I have had many questions for my mentor in the phase, like whether or not to test the code in some files. To which he answered were no necessary things to test for now. So at the moment, I'm focusing on the endpoints.

    • The tests I have written so far have improved the coverage score from 64% to 76%. A PR is still in the pipeline for these additions.

    • I am also adding an update to the GitHub workflow action that tests that the backend builds correctly.

      Whenever anyone makes a PR to the repo, it is ideal to test that their change doesn't break anything and we can do that with GitHub actions. It automatically runs tests as you specify.

      The update I am making is to run the tests I write on the project so that any refactoring that's done on fAIr doesn't break its functionality.

    • I have weeks 8 & 9 left to complete writing tests for critical functionalities in fAIr and suggest recommendations to improve the code quality based on the test findings. The issue will be marked as complete if I achieve at least 80% coverage.

  3. July-August (Weeks 10-13)

    • Create API documentation with Open API specifications for Raw Data API

    • Write API examples for developers, develop notebooks and sample frontend

    • Write a final diary about the internship journey

      My Expectations:

      I don't expect this to be difficult as I have a good understanding and prior experience writing API documentation to fit the Open API standards.

What I have learnt so far

Technical

Making meaningful commits and writing concise commit messages. Before now, my commit messages looked like this: first commit, second commit, this works. The last one makes me laugh ๐Ÿ˜‚๐Ÿ˜‚. It was just a way to remind myself of the version of what I was doing that didn't break.

  • My commits before:

  • My commit messages during contribution:

  • Now:

I have learnt to group my commits. Instead of committing every addition/change, I ensure to complete the tasks around and commit all those related at once.

A little dilemma?

I will not fail to add that there is now the dilemma of making meaningful commits versus making any commits at all ๐Ÿ˜‚. Because I want to ensure that I commit a certain module of the tests at once, I am now stuck on ensuring I have everything done before I make commits and a PR with my progress.

I have also learned to write tests.

Non-Technical

Making to-do list/plans: all the things I have taken note of about my internship helped make writing this easier. I have realised that taking notes, planning, and tracking progress helps my time management.

I have also learned to map buildings on the HOT tasking manager. I got this from joining an OSM(Open Street Map) mapathon.

New Goals

In the coming weeks, I would like to connect with the community and network!

I'm thankful that my community coordinator, Petya already arranged that my fellow intern, Azhar and I have chats with people in the community. I look forward to it!

Also, thanks to Azhar for helping me realise the opportunities to network that Outreachy provides. She's been inspiring and kind.

In conclusion, it's been a great run so far.

Many thanks to my amazing mentors, Kshitij and Shola.

Find my previous posts here:

Photo by Lindsay Henwood on Unsplash

20
Subscribe to my newsletter

Read articles from Oluwanifemi Daramola directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Oluwanifemi Daramola
Oluwanifemi Daramola

I am a software engineer passionate about environmental sustainability, I want to leverage technology for positive global change. My journey has equipped me with a blend of skills and experiences that I am eager to bring to solving challenges through data-driven solutions.