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

Export class to library but hide from documentation #1076

Closed
gorkamunoz opened this issue Sep 16, 2022 · 1 comment · Fixed by #1079
Closed

Export class to library but hide from documentation #1076

gorkamunoz opened this issue Sep 16, 2022 · 1 comment · Fixed by #1079
Assignees
Labels
bug Something isn't working

Comments

@gorkamunoz
Copy link

Is it possible to use both hide and export directions such that my cell is exported to the libraries but is not shown in the documentation?

My particular case: I am creating a class through multiple cells, e.g.:

Cell 1:

#| export 
class foo():
    def __init__():
        ''' Description of the class, which is shown in the docs.'''

Cell 2 (I want this one to be exported but hidden in the doc):

#| hide (?)
#| export (?)

class foo(foo):
    def func():
        ''' Description of the function, which I want to later show in the doc with show_doc(foo.func). '''

Combining both directives currently does not work, and in the library that cell shows again the class definition. I want to hide it and use later show_doc to show only the foo.func function I created. Is this possible? If not, is there a preferable way of defining classes over cells in nbdev?

@hamelsmu
Copy link
Member

hamelsmu commented Sep 16, 2022

Would exporti work for you in the meantime? Either way I think this is a bug and I'll fix it

@hamelsmu hamelsmu self-assigned this Sep 16, 2022
@hamelsmu hamelsmu added the bug Something isn't working label Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants