ml-tooling / lazydocs

📖 Generate markdown API documentation from Google-style Python docstring. The lazy alternative to Sphinx.
MIT License
197 stars 38 forks source link

Docs overritten when files have the same name under different folders #40

Closed pauloburke closed 1 year ago

pauloburke commented 2 years ago

Describe the bug:

When using the function "generate_docs", if there are two files with the same name under different subpackages, (e.g. subpkg1/utils.py and subpkg2/utils.py), the docs generated for the second one will override the first "utils.py.md".

Expected behaviour:

Doc files are not to be overwritten.

Steps to reproduce the issue:

  1. Have the following folder structure: src/subpkg1/utils.py src/subpkg2/utils.py
  2. call generate_docs(["src/subpkg1/utils.py","src/subpkg2/utils.py"], "docs/")
  3. Only one "docs/utils.py.md" is generated.

Technical details:

Possible Fix:

Maybe add an option to name the file with the subpackage name as prefix (e.g. "docs/subpkg1.utils.py.md" and "docs/subpkg2.utils.py.md")

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 14 days