Skip to content

Commit 722b7bb

Browse files
committed
node_attributes already existed, renamed the old one into parse_node_attributes
1 parent eb9b3ca commit 722b7bb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/read_MTG/parse_mtg.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ function parse_MTG_node_attr(node_data, attr_type, features, attr_column_start,
217217
end
218218
end
219219

220-
node_attributes(attr_type, node_attr)
220+
parse_node_attributes(attr_type, node_attr)
221221
end
222222

223223
"""
@@ -229,16 +229,16 @@ Instantiate a `attr_type` struct with `node_attr` keys and values
229229
- `attr_type::DataType`: the type of the structure used to hold the attributes
230230
- `node_attr::String`: The node attributes as a `Dict`
231231
"""
232-
function node_attributes(attr_type::Type{T}, node_attr) where {T<:Union{NamedTuple,MutableNamedTuple}}
232+
function parse_node_attributes(attr_type::Type{T}, node_attr) where {T<:Union{NamedTuple,MutableNamedTuple}}
233233
attr_type{tuple(Symbol.(keys(node_attr))...)}(tuple(values(node_attr)...))
234234
end
235235

236-
function node_attributes(attr_type::Type{T}, node_attr) where {T<:Union{AbstractDict}}
236+
function parse_node_attributes(attr_type::Type{T}, node_attr) where {T<:Union{AbstractDict}}
237237
Dict{Symbol,Any}(zip(Symbol.(keys(node_attr)), values(node_attr)))
238238
end
239239

240240
# node_attributes for DataFrame
241-
function node_attributes(::Type{DataFrame}, node_attr)
241+
function parse_node_attributes(::Type{DataFrame}, node_attr)
242242
DataFrame(node_attr)
243243
end
244244

0 commit comments

Comments
 (0)