Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c243256
Add TreeScatter recipe and export functions
cvigilv Feb 15, 2025
63a28b3
Add nodeordering option to treescatter
cvigilv Feb 16, 2025
b5831a7
Added examples usecases for treescatter
cvigilv Feb 16, 2025
413d6ee
More development of gallery
cvigilv Feb 16, 2025
8894e5b
Add basic implementation of `treelabels`, `treescatter`, `treearea` a…
cvigilv Feb 25, 2025
290820e
Implement PolarAxis handling for treecladelabels
cvigilv Feb 25, 2025
da1c6c6
WIP - update to v0.24 syntax and fix polar layout
BenjaminDoran Dec 1, 2025
93b008e
WIP - Remove testing notebook
BenjaminDoran Dec 1, 2025
8d4727e
WIP - Ignore testing notebooks
BenjaminDoran Dec 1, 2025
e95d755
WIP: Update recipes for v0.24
BenjaminDoran Dec 9, 2025
0019ad8
WIP: fix formatting
BenjaminDoran Dec 9, 2025
4ce0287
update pre-commit
BenjaminDoran Dec 9, 2025
7ca5d22
WIP - fix doc string
BenjaminDoran Dec 9, 2025
2928c7f
WIP - fix docs ignoring
BenjaminDoran Dec 9, 2025
6b20cb9
WIP - update change log
BenjaminDoran Dec 9, 2025
34413c0
WIP - Update for orientation feature
BenjaminDoran Dec 12, 2025
e2dfeb4
WIP - Update docs examples
BenjaminDoran Dec 12, 2025
93744df
WIP - Update docs
BenjaminDoran Dec 12, 2025
b73a01a
FIx usemaxdepth option
BenjaminDoran Dec 18, 2025
f87b782
WIP: Update documentation
BenjaminDoran Dec 18, 2025
18ee641
Fix: deploydocs
BenjaminDoran Dec 18, 2025
335a319
Rename treearea to treehilight
BenjaminDoran Dec 19, 2025
c6c17ab
Allow using treeplot as input & add treescatter
BenjaminDoran Dec 22, 2025
0956cf2
Formatting
BenjaminDoran Dec 22, 2025
5990c30
update depth and labeloffset options
BenjaminDoran Dec 22, 2025
9d7c86c
docstring formatting
BenjaminDoran Dec 22, 2025
3c826f8
Include polaroffset
BenjaminDoran Dec 22, 2025
77289d4
fix labeloffset
BenjaminDoran Dec 26, 2025
d8cd248
In progress docs
BenjaminDoran Dec 26, 2025
92fde7e
Update Documentation
BenjaminDoran Dec 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
indent = 4
margin = 92
margin = 100
normalize_line_endings = "unix"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@ Manifest.toml
benchmark/*.json
coverage
docs/build/
docs/src/gallery/*
!docs/src/gallery/00-index.md
docs/src/tutorials/*
!docs/src/tutorials/00-index.md
test/*.ipynb
env
node_modules
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repos:
language: fail
files: "\\.rej$"
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: check-json
- id: check-toml
Expand All @@ -26,7 +26,7 @@ repos:
- id: check-merge-conflict
args: [--assume-in-merge]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
rev: v0.46.0
hooks:
- id: markdownlint-fix
- repo: https://github.com/citation-file-format/cffconvert
Expand All @@ -40,16 +40,16 @@ repos:
types_or: [yaml, json]
exclude: ".copier-answers.yml"
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
rev: v1.37.1
hooks:
- id: yamllint
- repo: https://github.com/ericphanson/ExplicitImports.jl
rev: v1.10.1
rev: v1.14.0
hooks:
- id: explicit-imports
name: ExplicitImports checks
args: [--print, --checklist, exclude_all_qualified_accesses_are_public]
- repo: https://github.com/domluna/JuliaFormatter.jl
rev: v1.0.61
rev: v2.2.0
hooks:
- id: julia-formatter
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[unreleased]
- updated Makie Compath to include v0.22 ([#7])

- updated Makie Compat to include v0.22 ([#7])

[0.1.0] | 2025-02-09

Expand Down
11 changes: 8 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name = "BasicTreePlots"
uuid = "523fa316-3eda-45c7-ad2f-0d13a1dc3d77"
authors = ["Benjamin Doran and collaborators"]
version = "0.1.0"
authors = ["Benjamin Doran and collaborators"]

[workspace]
projects = ["test", "docs"]

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

Expand All @@ -18,8 +22,9 @@ BasicTreePlotsNewickTreeExt = "NewickTree"

[compat]
AbstractTrees = "0.4"
Makie = "0.21, 0.22"
NewickTree = "0.3"
Makie = "0.24"
NewickTree = "0.4"
OrderedCollections = "1.8.1"
Reexport = "1"
Statistics = "1"
julia = "1.9"
6 changes: 5 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
ArgMacros = "dbc42088-9de8-42a0-8ec8-2cd114e1ea3e"
BasicTreePlots = "523fa316-3eda-45c7-ad2f-0d13a1dc3d77"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
ImageTransformations = "02fcd773-0e25-5acc-982a-7f6622650795"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
NewickTree = "b0a14db8-6308-4ebc-8917-f72cd81f5094"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
TimerOutputs = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
BasicTreePlots = "523fa316-3eda-45c7-ad2f-0d13a1dc3d77"

[sources]
BasicTreePlots = {path = ".."}
3 changes: 1 addition & 2 deletions docs/clean.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ append!(
# Untracked files in build directory
eachline(`git ls-files --other --directory $(joinpath(DIR, "build"))`),
# Untracked files in examples/tutorials/howto/gallery generated by Literate.jl
let literate_output =
joinpath.(DIR, "src", ["examples", "tutorials", "howto", "gallery"])
let literate_output = joinpath.(DIR, "src", ["examples", "tutorials", "howto", "gallery"])
eachline(`git ls-files --other --directory $(literate_output)`)
end,
)
Expand Down
92 changes: 92 additions & 0 deletions docs/helpers/attrdocs_block.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
## https://github.com/MakieOrg/Makie.jl/blob/master/docs/attrdocs_block.jl

abstract type AttrdocsBlocks <: Documenter.Expanders.NestedExpanderPipeline end


Documenter.Selectors.order(::Type{AttrdocsBlocks}) = 8.0 # like @example
Documenter.Selectors.matcher(::Type{AttrdocsBlocks}, node, page, doc) =
Documenter.iscode(node, r"^@attrdocs")

# this type is just for a helper node which we can push child elements to that are
# at the end flattened as if they were all on the level of the container
struct Container <: Documenter.AbstractDocumenterBlock
codeblock::MarkdownAST.CodeBlock
end

MarkdownAST.can_contain(::Container, ::MarkdownAST.AbstractElement) = true

# function DocumenterVitepress.render(io::IO, mime::MIME"text/plain", node::MarkdownAST.Node, c::Container, page, doc; kwargs...)
# return DocumenterVitepress.render(io, mime, node, node.children, page, doc; kwargs...)
# end

function attrs_examples_docs_defaults(type::Type{<:Makie.Block})
attrkeys = sort(collect(keys(Makie.default_attribute_values(type, nothing))))

all_examples = Makie.attribute_examples(type)
all_docs = Makie._attribute_docs(type)
all_defaults = Makie.attribute_default_expressions(type)

return (; attrkeys, all_examples, all_docs, all_defaults)
end

function attrs_examples_docs_defaults(type::Type{<:Makie.Plot})

docatt = Makie.documented_attributes(type)
metadata = docatt.d

attrkeys = sort(collect(keys(metadata)))
all_examples = Makie.attribute_examples(type)
all_docs = Dict([
(attr => something(meta.docstring, "No docs available.")) for (attr, meta) in metadata
])
all_defaults = Dict([(attr => meta.default_expr) for (attr, meta) in metadata])

return (; attrkeys, all_examples, all_docs, all_defaults)
end

function Documenter.Selectors.runner(::Type{AttrdocsBlocks}, node, page, doc)

codeblock = node.element
node.element = Container(codeblock)

type = getproperty(Makie, Symbol(strip(codeblock.code)))

(; attrkeys, all_examples, all_docs, all_defaults) = attrs_examples_docs_defaults(type)

for attrkey in attrkeys

heading = @ast MarkdownAST.Heading(3) do
"$attrkey"
end
push!(node.children, heading)

default_str = all_defaults[attrkey]
default_para = @ast MarkdownAST.Paragraph() do
"Defaults to "
MarkdownAST.Code(default_str)
end
push!(node.children, default_para)

docs = get(all_docs, attrkey, nothing)
docs_md = Markdown.parse(docs)
docs_node = convert(MarkdownAST.Node, docs_md)
append!(node.children, docs_node.children)

examples = get(all_examples, attrkey, Makie.Example[])

for example in examples
figurenode = @ast MarkdownAST.CodeBlock("@figure", example.code)
push!(node.children, figurenode)
end
end

# expand the children we added with the normal expand pipeline, for example to apply the standard
# treatment to headings that documenter would normally do (which does not happen in the nested expand pipeline)
# and for running the @figure nodes
for childnode in collect(node.children)
Documenter.Selectors.dispatch(Documenter.Expanders.ExpanderPipeline, childnode, page, doc)
Documenter.expand_recursively(childnode, page, doc)
end

return
end
Loading
Loading