Season of Docs 2020 Report Soumi Bardhan: Consistency across docstrings SymPy Documentation - sympy/sympy GitHub Wiki

This page summarizes the work carried out during the Google Season of Docs 2020 program for the SymPy project:


Consistency Across Docstrings - SymPy Documentation

About Me

I am a computer science undergraduate involved in research in computer vision.

Project Goals

The project’s main goal was to update docstrings across SymPy’s codebase to adhere to the new Sympy docstring formatting style guide that had been developed as a part of GSoD’19. My work on the project would involve implementing the new guide to update existing docstrings, while collecting and addressing other inconsistencies such as language use or terms. The new guide had been implemented on the specials submodule previously. For my initial PRs, I worked on issues to address missing sections in this submodule like adding more examples and adding Parameters section.

I went through SymPy to check which modules required changes to be made first based on the Google search results. Once the modules were identified, I started updating the docstrings to follow the latest docstring style guide. The modules were updated in this order :

  1. Elementary
  2. Core
  3. Combinatorics
  4. Simplify
  5. Crypto
  6. Integrals
  7. Holonomic
  8. Physics
  9. Plotting
  10. Categories
  11. Codegen
  12. Concrete
  13. Assumptions

Work Completed

My mentors and I began the project by discussing which modules should be updated first. Based on the Google Search Console results, we decided to start with Elementary and core modules. I added missing sections wherever required. I opened several PRs for each module or submodule. My mentors and SymPy community members were quick to review my PRs and suggest changes if needed. Once the changes were approved, the PRs were merged.

Here are the links to all my PRs :

https://github.com/sympy/sympy/pulls?q=is%3Apr+author%3ASoumi7+is%3Aclosed

All the PRs are referenced on this issue:

https://github.com/sympy/sympy/issues/19591

Results

By the end of this project, all the above mentioned modules followed the latest SymPy Documentation Style Guide. This will bring greater consistency to SymPy’s documentation, supporting its mission to become a full-featured, open source computer algebra system (CAS).

Future Work

Certain docstrings do not have a docs page on the SymPy Docs. These docstrings need to be identified and displayed. We also want to be able support subheaders in docstrings. Remaining SymPy modules and submodules which have not been updated must be updated to adhere to the latest docstring style guide to have complete consistency across the codebase.

Conclusion

This project has been an amazing learning experience. I learnt a lot in depth on the functions across different modules across SymPy’s codebase. I had 30+ PRs merged and I got used to resolving git issues like solving merge conflicts. I would like to thank my mentors Aaron Meurer, Amit Kumar, Nikhil Maan for the constant support and expertise throughout Google Season of Docs. Thank you!