-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate docs of project fails with virtual environment dependencies #299
Comments
The dateutil thing seems to be just a warning. The real breaking issue is line 646: Lines 640 to 646 in 0658ff0
where rhs obj is undefined.
Maybe there's a little |
@kernc Thanks for your quick reply. I did try adding a For example, mako requires babel (which I don’t normally need from a usage standpoint), which requires lingua, which requires chameleon, which fails to import because With this in mind, I’m requesting guidance for just skipping everything in my virtual environment from pdoc import __pdoc__
__pdoc__['env'] = False
# or
__pdoc__['env.*'] = False So far, all I can think of is to move my |
I assume that's how everyone else does it. project_dir/ # <-- git root
env/
package/ # <-- actual named, released package
main.py
t1_util.py
... Alternatively, appropriately positioned (i.e. in my_package/__init__.py): __pdoc__ = {}
__pdoc__['env'] = False (defined anew; not imported) should prevent descending further into env. |
@kernc Perfect, thanks! This is what I needed to know. My documentation generation now works as I’d hoped, adding the proper pdoc excludes and also monkey-patching the |
I'm experiencing a similar issue, also centered around the section with the "Module {!r} doesn't contain identifier Lines 679 to 688 in 4aa70de
Ultimately this problem stems from the try/except block being obviated by the blacklist test: if the except triggers, then in addition to the AttributeError being caught and turned into a warning, the blacklist test references a variable ( obj ) that only exists if the try block was successful, so if you went into the except block you now error out at the blacklist test.
The solution here is to wrap the blacklist test in an |
Adapted from the pdocs programmed recursive documentation generation example, I have a script that runs the following methods:
tl_util.py
main.py
My project filesystem is like this:
Below is the error that I currently get:
The referenced installed package
__init__.py
file for dateutil is as follows:I’ve confirmed that the relevant virtual environment has been activated. I’ve also confirmed that all modules in the dateutil package are where I expect them to be, like so:
Why is the attempt to document the dateutil dependency failing this way? If documentation of dependencies is not supported, how should I skip them?
Additional info
The text was updated successfully, but these errors were encountered: