Skip to content

Commit be119b7

Browse files
committed
move docstrings from ext to main
1 parent 41bdcba commit be119b7

File tree

3 files changed

+36
-36
lines changed

3 files changed

+36
-36
lines changed

docs/make.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ for example in filter(contains(r".jl$"), readdir(example_dir, join=true))
3535
end
3636

3737
mtkext = Base.get_extension(NetworkDynamics, :NetworkDynamicsMTKExt)
38-
dfext = Base.get_extension(NetworkDynamics, :NetworkDynamicsDataFramesExt)
3938
kwargs = (;
4039
root=joinpath(pkgdir(NetworkDynamics), "docs"),
4140
sitename="NetworkDynamics",
42-
modules=[NetworkDynamics, mtkext, dfext, NetworkDynamicsInspector],
41+
modules=[NetworkDynamics, mtkext, NetworkDynamicsInspector],
4342
linkcheck=true, # checks if external links resolve
4443
pagesonly=true,
4544
plugins=[links],

ext/NetworkDynamicsDataFramesExt.jl

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,6 @@ function _df_from_pair(list, pair)
3030
df
3131
end
3232

33-
"""
34-
describe_vertices(nw::Network, extras...; parameters=true, states=true, batch=nothing)
35-
36-
Creates a DataFrame containing information about the vertices in a Network.
37-
38-
# Arguments
39-
- `nw::Network`: The network to describe
40-
- `extras...`: Additional pairs of (key, function) to include as columns,
41-
where the function gets the [`VertexModel`](@ref) as its only parameter
42-
to extract a custom metadata field for example..
43-
- `parameters=true`: Whether to include parameter values
44-
- `states=true`: Whether to include state values
45-
- `batch=nothing`: Optionally filter by specific batches
46-
47-
# Returns
48-
A DataFrame with columns for vertex indices, names, batch numbers, and any parameter/state values.
49-
"""
5033
function NetworkDynamics.describe_vertices(nw::Network, extras...; parameters=true, states=true, batch=nothing)
5134
pairs = enumerate(nw.im.vertexm);
5235
batches = map(idx -> findfirst(batch -> idx batch.indices, nw.vertexbatches), first.(pairs))
@@ -78,23 +61,6 @@ function NetworkDynamics.describe_vertices(nw::Network, extras...; parameters=tr
7861
foldl((a,b) -> DataFrames.leftjoin(a,b; on=:idx), dfs)
7962
end
8063

81-
"""
82-
describe_edges(nw::Network, extras...; parameters=true, states=true, batch=nothing)
83-
84-
Creates a DataFrame containing information about the edges in a Network.
85-
86-
# Arguments
87-
- `nw::Network`: The network to describe
88-
- `extras...`: Additional pairs of (key, function) to include as columns,
89-
where the function gets the [`EdgeModel`](@ref) as its only parameter
90-
to extract a custom metadata field for example..
91-
- `parameters=true`: Whether to include parameter values
92-
- `states=true`: Whether to include state values
93-
- `batch=nothing`: Optionally filter by specific batches
94-
95-
# Returns
96-
A DataFrame with columns for edge indices, source-destination pairs, names, batch numbers, and any parameter/state values.
97-
"""
9864
function NetworkDynamics.describe_edges(nw::Network, extras...; parameters=true, states=true, batch=nothing)
9965
pairs = enumerate(nw.im.edgem);
10066
batches = map(idx -> findfirst(batch -> idx batch.indices, nw.layer.edgebatches), first.(pairs))

src/metadata.jl

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,5 +771,40 @@ function _has_changed_hash(aliased_cfs)
771771
end
772772

773773

774+
"""
775+
describe_vertices(nw::Network, extras...; parameters=true, states=true, batch=nothing)
776+
777+
Creates a DataFrame containing information about the vertices in a Network.
778+
779+
# Arguments
780+
- `nw::Network`: The network to describe
781+
- `extras...`: Additional pairs of (key, function) to include as columns,
782+
where the function gets the [`VertexModel`](@ref) as its only parameter
783+
to extract a custom metadata field for example..
784+
- `parameters=true`: Whether to include parameter values
785+
- `states=true`: Whether to include state values
786+
- `batch=nothing`: Optionally filter by specific batches
787+
788+
# Returns
789+
A DataFrame with columns for vertex indices, names, batch numbers, and any parameter/state values.
790+
"""
774791
function describe_vertices end
792+
793+
"""
794+
describe_edges(nw::Network, extras...; parameters=true, states=true, batch=nothing)
795+
796+
Creates a DataFrame containing information about the edges in a Network.
797+
798+
# Arguments
799+
- `nw::Network`: The network to describe
800+
- `extras...`: Additional pairs of (key, function) to include as columns,
801+
where the function gets the [`EdgeModel`](@ref) as its only parameter
802+
to extract a custom metadata field for example..
803+
- `parameters=true`: Whether to include parameter values
804+
- `states=true`: Whether to include state values
805+
- `batch=nothing`: Optionally filter by specific batches
806+
807+
# Returns
808+
A DataFrame with columns for edge indices, source-destination pairs, names, batch numbers, and any parameter/state values.
809+
"""
775810
function describe_edges end

0 commit comments

Comments
 (0)