Inspiration

As the creator of Python, Guido Van Rossum believed that the superiority of python lies in the fact that it is easily understandable and readable through specified convention styles and documentation. Documentation of code is important not only for the programmers themselves but also for others who use, collaborate, or learn from it. But do programmers love to document their code? Well, that depends on them! But to make their work a little easier, we created alphadoc!

What it does

alphadoc is a python standalone utility tool that automatically generates docstrings to help document the code better in python. It renders a customizable docstring template after each method detected in the code. Along with this, it also supports common and widely used docstrings formats such as Numpy, Google, ReStructured Text, and Epytext (Javadoc).

How we built it

For the CLI interface, we used click and for parsing the code and detecting functions or methods in the script we used ast module in python.

Challenges we ran into

The biggest challenge was to parse the code and search for functions in it as well as to render the template at the exact positions.

Accomplishments that we are proud of

This was the first time we created and published a python for other developers to use and help them in documentation so it's quite an accomplishment itself.

What we learned

We learned about the CLI interface and how to create standalone python CLI applications. In addition to this, we also learned about the Github actions and workflow as well as unit testing.

What's next for alphadoc

Make the templates a little more customizable depending upon the type of method, the parameter it takes and returns.

Pod 1.1.2 Hack Sparrows Team alphadoc

  • Vividha
  • Emily Amspoker
  • Julia Liu

Built With

Share this project:

Updates