Skip to content

Commit

Permalink
chores for 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
http-samc committed Jun 22, 2021
1 parent b7c1775 commit 39178f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions gen_doc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def extractDocStrings(filepath: str, parent: str = None, classSections: bool = F
only returned when no functions were found
"""
relPath = os.path.relpath(filepath, start = parent).replace('\\', '/') # literal relative path
relPathFormatted = relPath.replace('\\', '.').replace('.py', '') # pythonic implementation for path
relPathFormatted = relPath.replace('/', '.').replace('.py', '') # pythonic implementation for path

functions: list = []
retStr: str = f"## [{relPathFormatted}.py](/{relPath})\n---\n" if fileHeaders else ""
Expand Down Expand Up @@ -159,8 +159,7 @@ def extractDocStrings(filepath: str, parent: str = None, classSections: bool = F


if functionDocString is None and excludeDocless: continue
functionName = function.name.replace('_', '\_') # preventing MD from turning __func__ to *func*
retStr += f"#### `{className}`.{functionName}\n" # adding class name in function def w/ nested emphasis
retStr += f"#### {className}.`{function.name}`\n" # adding class name in function def w/ nested emphasis

if methodSections and functionDocString: retStr += "<details style='color: #333333'><summary>Details</summary><p>\n\n" # Opening Class Method section
retStr += f"{functionDocString if functionDocString is not None else voidDocStringMSG}\n"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

setup(
name="GenDoc",
version="0.1.3",
version="1.0.0",
description="Generate a Markdown Documentation file from a Python Repository with DocStrings.",
url="https://github.com/http-samc/GenDoc",
author="Samarth Chitgopekar",
Expand Down

0 comments on commit 39178f4

Please sign in to comment.