ml-tooling / lazydocs

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

Generation of docs fails on windows network share because of different paths #33

Closed claussteinmassl closed 2 years ago

claussteinmassl commented 2 years ago

Hey!

I just came across an issue with the following environment: I'm on Windows 10 and my python files are placed on a network volume (R:). Im calling lazydocs as an external tool from PyCharm. Therefore the path given to lazydocs starts with the drive letter. This all works fine until I initialise git. After this the docs creation fails. I think, the the reason are those lines:

https://github.com/ml-tooling/lazydocs/blob/f19810ef020684abc7cac8e705ca1258478cdcbb/src/lazydocs/generation.py#L927

The git command returns the path as UNC.

https://github.com/ml-tooling/lazydocs/blob/f19810ef020684abc7cac8e705ca1258478cdcbb/src/lazydocs/generation.py#L512

os.path.relpath(path, src_root_path) tries to combine the path with a drive letter with the unc path which does not work.

Maybe the src_root_path could also be set via the cli? In that case the git command wouldn't run and the path would always start with the drive letter.

Thanks, Claus

github-actions[bot] commented 2 years 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

claussteinmassl commented 2 years ago

Any ideas about this issue? :)

github-actions[bot] commented 2 years 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

github-actions[bot] commented 2 years 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