Skip to content

Commit

Permalink
Merge pull request #533 from WilhelmusLab/fix(preprocessing)--update-…
Browse files Browse the repository at this point in the history
…for-tiling-CLI

fix: method overwriting error
  • Loading branch information
hollandjg authored Dec 19, 2024
2 parents f94d206 + 1e7d9df commit a7065e8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "IceFloeTracker"
uuid = "04643c7a-9ac6-48c5-822f-2704f9e70bd3"
authors = ["bradford roarr <[email protected]> and contributors"]
version = "0.6.1"
version = "0.6.2"

[deps]
AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9"
Expand Down
35 changes: 16 additions & 19 deletions src/tracker/tracker-funcs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -556,16 +556,25 @@ function get_dt(props1, r, props2, s)
end

"""
adduuid!(props)
adduuid!(df)
Assign a unique ID to each floe in each table of floe properties.
Assign a unique ID to each floe in a table of floe properties.
"""
function adduuid!(props::Vector{DataFrame})
# Assign a unique ID to each floe in each image
for (i, prop) in enumerate(props)
props[i].uuid = [randstring(12) for _ in 1:nrow(prop)]
function adduuid!(df::DataFrame)
df.uuid = [randstring(12) for _ in 1:nrow(df)]
return df
end

"""
adduuid!(dfs)
Assign a unique ID to each floe in an vector of tables of floe properties.
"""
function adduuid!(dfs::Vector{DataFrame})
for (i, df) in enumerate(dfs)
adduuid!(dfs[i])
end
return nothing
return dfs
end

"""
Expand Down Expand Up @@ -683,15 +692,3 @@ function dropcols!(df, colstodrop)
select!(df, Not(colstodrop))
return nothing
end

function adduuid!(df::DataFrame)
df.uuid = [randstring(12) for _ in 1:nrow(df)]
return df
end

function adduuid!(dfs::Vector{DataFrame})
for (i, df) in enumerate(dfs)
adduuid!(dfs[i])
end
return dfs
end

0 comments on commit a7065e8

Please sign in to comment.