Skip to content
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

Documentation for package - can't get it working #136

Closed
gosakamu opened this issue Aug 1, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@gosakamu
Copy link

commented Aug 1, 2017

Hello everyone,
I'm new to using python but nevertheless I'd like to start with documenting the things I do.

Unfortunatly I can't get pdoc working for a package. For testing purposes I created a folder mypackage with an empty __init.py__ and a file module1.py with following code:
def demoprint(): print('now in module1!')

I'm on Amazon Linux and run pdoc for the package pdoc mypackage and it only shows

Module mypackage
----------------

If I then do pdoc mypackage\module1.py I got following output.

Module module1
--------------
Functions
---------
demoprint()

I expected if I do pdoc on the package it would show the module1 and the function underneath. Can you help?

@BurntSushi

This comment has been minimized.

Copy link
Contributor

commented Aug 1, 2017

Seems to be working as intended to me. pdoc encourages you to be more explicit with your public interface. Try putting your submodule in your __init__.py's __all__ list.

You can also try using the --allsubmodules flag. I would encourage you to read the output of pdoc --help.

@BurntSushi BurntSushi closed this Aug 1, 2017

@gosakamu

This comment has been minimized.

Copy link
Author

commented Aug 1, 2017

Thank you for the feedback. I got it running.
First I customized the init.py and then I had to add the path to PYTONPATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.