pdoc icon indicating copy to clipboard operation
pdoc copied to clipboard

Exclude some files completely?

Open AronDurkinSSS opened this issue 1 year ago • 2 comments

Problem Description

I've got some Python 2.7 stuff in my project and while they function fine in the intended environment (Maya), pdoc can't execute them under 3.9 and I can't generate docs for any of the package despite just one file being problematic and hundreds being fine.

Proposal

A way to flag files as ignore completely, so we don't run into errors in "pdoc\extract.py", line 211, in load_module"

Alternatives

I've no idea sadly :(

AronDurkinSSS avatar Dec 06 '22 12:12 AronDurkinSSS

https://pdoc.dev/docs/pdoc.html#exclude-submodules-from-being-documented - if this doesn't work, the only way forward might be to run pdoc as a library where you first import manually (https://github.com/mitmproxy/pdoc/blob/main/examples/library-usage/make.py).

mhils avatar Dec 06 '22 12:12 mhils

thanks, yeah i tried that, seems it still gets loaded and i get an error about builtins coz of py2.7, I've had a go at using it as a library, struggling with accessing modules / packages outside of the pdoc project but that's not on you, I'm a bit of a n00b. I added my desired module dir to the interpreter paths but PyCharm still tells me No Module named before it even gets to the pdoc stuff.

If i do get it working, is there more docs to using it as a library? Not sure how I would omit a file this way.

AronDurkinSSS avatar Dec 06 '22 13:12 AronDurkinSSS