Artificial Intelligence-based code documentation assistant

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/2aa1b038-10f9-444d-baaf-97729ab138e1/0hQJDXkgmCgh6k0T0

Photo by Pakata Goh on Unsplash

Artificial Intelligence is extensively used for developing models to help developers write better source code. Various AI models are used to accelerate the work of developers, such as code autocompletion, autosuggestions, unit test assistance, bug detection, code summarization, etc.

Documentation of code is essential while delivering the project. For large code snippets having thousands of lines of code, it's very difficult to understand the code functionality for the next set of developers, testers, or clients, and hence code documentation of comments is essential. Most of the developers find it difficult or forget to write documentation or comments.

It is a big challenge for the developers to cope up with writing code, testing the code, and keeping up with its documentation. Docly comes to the rescue, as it automatically generates documentation for python code using state-of-the-art natural language processing.

What is Docly?

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/9b57ff05-972c-4e57-8826-8a1d4bec099c/1zWNTdPXHKETMGHciV9k92A.png

(Source)

Docly is a python package by Codist.AI that can automatically generate documentation for your python code. It extensively used natural language processing to go through all the functions in the code snippet and generate docstring or comments automatically and can also update any missing or outdated docstring.

Docly is provided in the command-line interface and can review or complete the documentation in one-line command in few seconds.

Installation:

Pypl installation for the required packages.

pip install -U PyYAML
pip install docly

Usage:

To generate documentation of a given python code snippet, use a single line of the command-line statement:

docly-gen <name_of_python_file.py>

After the docly engine is loaded and the docstring is generated, it will seek permission to show the suggestions.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/902aae0d-c422-4b2f-8452-ce2c086fe61d/16JM3lZjSl2DDW7kHWnu89w.png

Taking input as ‘y’, it generates all the function names in the code snippets along with the generated docstring for each function.