SBML4Humans GSoC Project Preparation - Week 3-5 Progress Update

 Over the past 2-3 weeks, I have gained hands-on experience in working on the sbmlutils project (https://github.com/matthiaskoenig/sbmlutils/) in preparation for the GSoC project. Most of the work was on fixing issues in the repository via pull requests and working on the reviews given for each pull request.


Working on issues helped me gain a better understanding of the repository and especially the reports module which is responsible for the generation of SBML reports in HTML format. It also gave me good knowledge about the code of conduct for working on the codebase, enhanced my open source workflow knowledge and regular reviews on my work. My mentor Dr. Matthias König provided code reviews and suggestions which helped me to improve and fix the solution and code. 


I have solved around 11 issues till now, which are a collection of small and medium-sized issues. Following is a brief description about the pull request for each issue in chronological order:


  1. #181 doc: fixed the link to CONTRIBUTING.rst in README.rst

This was my first pull request opened in the repository. It fixed a minor link to the contributing guidelines in the README file. 


  1. #185 fix: added fstrings and updated file handling in reports module to comply with Python 3 specifications 

This patch updated the strings in the reports module to comply with Python 3 f-string syntax. The file handling was also updated to use the latest constructs in the documentation of Python3. This improved the readability of the code base.


  1. #187 doc: added type annotations and docstrings for functions in reports module 

This pull request enhanced my knowledge of type annotations and docstrings and their importance in writing accurate, maintainable and easily comprehensible  code. 


  1. #189 fix: fix flake8 errors in report module 

Flake8 is a tool to help write code that follows certain PEP8 standards and marks out instances where the code doesn’t follow these standards and possible programmatical errors. The flake8 errors generated for the reports module like long strings, import errors, etc. were fixed in this pull request. 

  1. #190 doc: generated API documentation using sphinx autoapi 

This pull request introduced me to a new concept of automatic documentation generation for APIs. Sphinx’s AutoAPI tool helps in automatic generation of API documentation after some configurational changes in the repository. As a part of this pull request, I generated the API documentation for the sbmlutils package using the AutoAPI tool. This documentation was released as a part of the next release of the repository.

  1. #200 fix: improve MathML rendering in reports module 

Earlier the HTML reports generated were using Content MathML to render mathematical formulae. Certain formulae could not be rendered properly due to this approach and there was scope for improvement of the look and display of these formulae. The introduction of Presentation MathML and Latex formulae rendering improved these features as a part of this pull request. 


  1. #209 feature: added support for storing generated HTML report in a variable 

This pull request introduced a new feature of storing the HTML content for the reports in a returnable variable. As a result, the generated report can now be used in a variety of ways like returning it as request response, printing in different file formats, etc. 


  1. #210 fix: fixed mypy issues in report module 

This was another code standards based pull request which helped me to fix the type-checking errors in the reports module as reported by the mypy tool.


  1. #217 feature: add uncertainty info to info dict 

This was an issue on which I have enjoyed working the most till now. It gave me in-depth knowledge about the process of addition of a new information component to the reports. I learned how to create the new information dictionary for such an information component and to add it to the list of dictionaries that are finally used in the report generation. This patch added the feature to show the uncertainties information about the components in the report which is derived from the distrib package. The information dictionary generated was further used for subsequent rendering of the uncertainties information in the HTML report.  


  1. #220 Uncertainty html rendering 

As a continuation of the above pull request, this patch added the macros and template tags to help in displaying the uncertainties information in the HTML reports. 

  1. #207 test: add tests for curated biomodels for new and old math types

This patch added around 984 biomodels extracted from https://www.ebi.ac.uk/biomodels/ to for extending the test models for the reports module. This brought out a number of bugs in the Math formulae in the new models and improved the repository’s test suite and report generation module. 


The above pull requests have greatly improved my understanding of the project and the codebase in more depth. I will continue to make more contributions to the repository in the form of more such pull requests and strengthen my knowledge about the project. I could contribute to a substantial improvement of the sbmlutils code base over the last weeks reflected by full flake8 conformity, passing mypy static type checking and increased code coverage by tests. All pull requests have been included in the latest release of sbmlutils (https://github.com/matthiaskoenig/sbmlutils/releases).


Comments

Popular posts from this blog

GSoC 2021 : SBML4Humans - Interactive SBML Report for Humans - Final Report

SBML4Humans GSoC Project Preparation (Week 1 Progress Update)