Skip to content

Commit

Permalink
doc: upgraded to Documenter v1
Browse files Browse the repository at this point in the history
  • Loading branch information
cecileane committed Nov 19, 2023
1 parent 73dc910 commit c5d6ec9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
3 changes: 1 addition & 2 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ BioSymbols = "3c28c6f8-a34d-59c4-9654-267d177fcfa9"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterMarkdown = "997ab1e6-3595-5248-9280-8efb232c3433"
PhyloNetworks = "33ad39ac-ed31-50eb-9b15-43d0656eaa72"
PhyloPlots = "c0d5b6db-e3fc-52bc-a87d-1d050989ed3b"
RCall = "6f49c342-dc21-5d91-9882-a32aef131414"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
StatsModels = "3eaba693-59b7-5ba5-a881-562e759f1c8d"

[compat]
Documenter = "~0.27"
Documenter = "~1"
PhyloPlots = "1"
10 changes: 8 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Documenter, DocumenterMarkdown
using Documenter

using Pkg
Pkg.add(PackageSpec(name="PhyloPlots", rev="master"))
Expand All @@ -11,7 +11,13 @@ makedocs(
sitename = "PhyloNetworks.jl",
authors = "Claudia Solís-Lemus, Cécile Ané, Paul Bastide and contributors.",
modules = [PhyloNetworks], # to list methods from PhyloNetworks only, not from Base etc.
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"), # easier local build
format = Documenter.HTML(
prettyurls = get(ENV, "CI", nothing) == "true", # easier local build
size_threshold = 600 * 2^10, size_threshold_warn = 500 * 2^10), # 600 KiB
# exception, so warning-only for :missing_docs. List all others:
warnonly = Documenter.except(:autodocs_block, :cross_references, :docs_block,
:doctest, :eval_block, :example_block, :footnote, :linkcheck_remotes,
:linkcheck, :meta_block, :parse_error, :setup_block),
pages = [
"Home" => "index.md",
"Manual" => [
Expand Down
20 changes: 12 additions & 8 deletions src/manipulateNet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,16 @@ end

"""
hybridatnode!(net::HybridNetwork, nodeNumber::Integer)
hybridatnode(net, nodeNumber)
Change the status of edges in network `net`,
Change the direction and status of edges in network `net`,
to move the hybrid node in a cycle to the node with number `nodeNumber`.
This node must be in one (and only one) cycle, otherwise an error will be thrown.
Check and update the nodes' field `inCycle`.
The second method does not modify `net`, checks that it's of level 1, and
returns the new network after hybrid modification.
Output: `net` after hybrid modification.
`net` is assumed to be of level 1, that is, each blob has a
Assumption: `net` must be of level 1, that is, each blob has a
single cycle with a single reticulation.
Check and update the nodes' field `inCycle`.
# example
Expand Down Expand Up @@ -150,7 +148,7 @@ Move the reticulation from `hybrid` to `newNode`,
which must in the same cycle. `net` is assumed to be of level 1,
but **no checks** are made and fields are supposed up-to-date.
Called by `hybridatnode!(net, node number)`, which is itself
Called by `hybridatnode!(net, nodenumber)`, which is itself
called by [`undirectedOtherNetworks`](@ref).
"""
function hybridatnode!(net::HybridNetwork, hybrid::Node, newNode::Node)
Expand Down Expand Up @@ -182,7 +180,13 @@ end
# does not call hybridatnode! but repeats its code: oops! violates DRY principle
# nodeNumber should correspond to the number assigned by readTopologyLevel1,
# and the node numbers in `net` are irrelevant.
@doc (@doc hybridatnode!) hybridatnode
"""
hybridatnode(net::HybridNetwork, nodeNumber::Integer)
Move the hybrid node in a cycle to make node number `nodeNumber` a hybrid node
Compared to [`hybridatnode!`], this method checks that `net` is of level 1
(required) and does not modify it.
"""
function hybridatnode(net0::HybridNetwork, nodeNumber::Integer)
net = readTopologyLevel1(writeTopologyLevel1(net0)) # we need inCycle attributes
ind = 0
Expand Down

0 comments on commit c5d6ec9

Please sign in to comment.