-2

I have a bunch(approx 23) of .py files present in the same folder and a approx a total of 50 + functions present in each file and the respective doc strings have been updated into a csv or text file Are there any documentation utility or python packages which will help to update the doc strings in these python file programatically ?

Rams
  • 193
  • 1
  • 17

1 Answers1

-1

Python is quite good for documentation/testing framework.

One very cool, is the 'readthedocs' framework.

Install sphinx

pip install sphinx

and init a new docs folder project

mkdir docs
cd $_
sphinx-quickstart

Once done you will be able to create the documentation by run the make command into that folder

make html

Now you can manually modify the doc. Here the detailed steps

https://docs.readthedocs.io/en/stable/intro/getting-started-with-sphinx.html

If you want to custom replace a single word in a lot of file, you will risk to break your code. No sed/grep combination will be helpful here.

Instead you have to make a python script that filter only the comment text (# and """) and update the word

alessiosavi
  • 2,753
  • 2
  • 19
  • 38