-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Ignore entire package / directory? #99
Comments
Exclude items using
|
Hello, I've tried using For example, in the solution above I would do something like Is there something I'm missing? More concrete package structure where the tool fails where in this case, I explictly put in tools/__init__.py
|
Yeah, I'm thinking pdoc shouldn't even traverse ignored modules lest havoc. 😄 It should probably also follow .gitignore so that pointless in-tree directories needn't even be listed in |
also move _iter_modules out of method scope
I have an idea of skipping a directory containing a specially named magic file, like Note that this does not give an opprtunity to exclude a file from a directory, but here we can discuss some file-based (not import-based) approach, e.g parsing the content of |
@kernc @poke1024
Am I missing something? |
What are some other ignore files besides
Can you show an example of 3.? That's one solution. How about if |
How
Bettter to stay with pdoc3's own ignore file, if talking about files. Of course, the last was my own opinion, don't blame.
The exampleLet's assume we have the following structure:
...and we want not to import To achieve this iff the approach will be accepted:
That's another solution and it is good for its purpose: exclude a package or module from the package which has been imported. If you wonder what problems I see there, please, read below:
So, we need to import the module to even know what the And what if one module says The last one, the But, let me say it second time: So, again, my opinion is: you -- or we, as a product -- need both, and the file approach should be given a priority. Btw, how |
I mean, what are some other examples of ignore files, such as
Before importing. In your example, __init__.py should contain: # package/subpackage/__init__.py:
__pdoc__ {
'broken_module': False,
'downloaded_modules': False,
} and then simply the file traversal routine should be adapted to look in Lines 574 to 611 in 65b31fd
A simple question of
Non-empty namespaces should work. Lines 714 to 719 in 1709915
Lines 414 to 422 in 1709915
|
But then you get a global variable |
@ges0909 Variables should not be auto-documented, unless annotated with PEP-224 docstrings? 🤨 |
|
@ges0909 Right. Would you please open a new issue with this? |
Workaround: Avoid usage of |
Hey, I tried to follow the conversation but I still did not understand: How can I make pdoc ignore the files in .gitignore? |
Is there any solution to this problem now? I put
in my |
Apparently, you should use full reference names for submodule keys, i.e. Lines 754 to 764 in 2a66eb2
Lines 390 to 402 in 2a66eb2
|
Hello there,
I actually download my dependencies locally into a subfolder within my package similar to something like this.
Is there any way to effectively ignore
downloaded_modules
?Thanks
The text was updated successfully, but these errors were encountered: