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:
This was my first pull request opened in the repository. It fixed a minor link to the contributing guidelines in the README file.
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.
This pull request enhanced my knowledge of type annotations and docstrings and their importance in writing accurate, maintainable and easily comprehensible code.
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.
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.
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.
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.
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.
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.
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.
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
Post a Comment