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

Printing functions missing from the manual #121

Open
mortenpi opened this issue Oct 31, 2022 · 3 comments · May be fixed by #145
Open

Printing functions missing from the manual #121

mortenpi opened this issue Oct 31, 2022 · 3 comments · May be fixed by #145

Comments

@mortenpi
Copy link
Contributor

mortenpi commented Oct 31, 2022

E.g. print_tree and printnode do have docstrings, but don't seem to show up anywhere in the manual. I presume they are considered part of the public API?

@FedeClaudi
Copy link
Contributor

Just adding a +1 for this. I'm using print_tree in Term.jl (FedeClaudi/Term.jl#187) and it took me a while to find/understand these functions.

@nhz2
Copy link
Contributor

nhz2 commented Jan 18, 2023

I assume that because print_tree is exported and is in the README, it is part of the public API. That would make #124 a breaking change, because print_tree(f::Function, io::IO, tree; kwargs...) no longer works. Could I add the print_tree(f::Function, io::IO, tree; kwargs...) method back? I think that would fix my package: https://github.com/medyan-dev/StorageTrees.jl/actions/runs/3896574335

@andreuvall
Copy link

I also stumbled upon this. print_tree appears in the documentation for v0.3.4. However, for v0.4.3, print_tree is not in the documentation, although the function and its docstring are indeed in the codebase.

Furthermore, the last example in the docstring doesn't work because ASCI_CHARSET is not defined in AbstractTrees.jl.

julia> print_tree(tree, charset=AbstractTrees.ASCII_CHARSET)
ERROR: UndefVarError: `ASCII_CHARSET` not defined
...

For what I can read here, maybe the last example in the print_tree docstring should be rephrased to

julia> print_tree(tree, charset=AbstractTrees.TreeCharSet(:ascii))
Any[1:3, "foo", Any[Any[[4, 5], 6, 7], 8]]
+-- 1:3
|   +-- 1
|   +-- 2
|   \-- 3
+-- "foo"
\-- Any[Any[[4, 5], 6, 7], 8]
    +-- Any[[4, 5], 6, 7]
    |   +-- [4, 5]
    |   |   +-- 4
    |   |   \-- 5
    |   +-- 6
    |   \-- 7
    \-- 8

Finally, I just noticed that issue #136 seems to be a duplicate of this. It could probably be closed.

ReubenJ added a commit to ReubenJ/AbstractTrees.jl that referenced this issue May 8, 2024
Having to jump into the source code to find the latest docstrings is a bit of a pain. This reintroduces the functions to the main page of the package's published documentation.

Closes JuliaCollections#121.
@ReubenJ ReubenJ linked a pull request May 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants