update(notebook): slavelog check

This commit is contained in:
Wataru Otsubo 2025-05-16 03:23:39 +09:00
parent 18f5907d41
commit 4faf48cfcc

View file

@ -10,9 +10,13 @@ begin
Pkg.activate(".")
using CSV
using DataFrames
using PlutoUI
using PSBoardDataBase
end
# ╔═╡ 3bf488c4-cd2a-4b2c-b2ee-a6f8d84368df
TableOfContents(depth = 3)
# ╔═╡ f8b25d6d-5756-42fa-ac9f-a238d815dad2
second_run_result = let
result_file = PSBoardDataBase.DownloadCSVs.download_second_run_csv()
@ -21,6 +25,11 @@ second_run_result = let
df
end
# ╔═╡ 7d7c80a3-800f-48cf-908b-172730320571
md"""
# Count summary
"""
# ╔═╡ d597786d-3112-476e-a640-d494aed630bd
filter(:motherboard_id => ismissing, second_run_result)
@ -47,9 +56,47 @@ end
# ╔═╡ c7adb9ed-ef92-4727-a446-556d65cf6f3f
falied_boards = [895, 896, 1142, 1276, 1094, 1095]
# ╔═╡ b8b31ee3-ffc9-4d55-80ff-001dfebfc776
md"""
# slave log validation
"""
# ╔═╡ f464ed57-7d42-42e5-a388-c815bba0ad60
map(eachrow(second_run_result)) do row
row
end
# ╔═╡ 2bd267ea-78ab-454e-93e4-81a2f7a5d671
second_run_writing_result = filter(:motherboard_id => (id -> begin
coalesce(id != 999999, false)
end), second_run_result)
# ╔═╡ 383e1e04-ba3e-49bf-9f99-46c53b37204b
map(eachrow(second_run_writing_result)) do row
slavelog_dir = "../test/input/slavelogs/main/"
logfilename = "$(row.motherboard_id)_$(row.runid).txt"
logfilepath = joinpath(slavelog_dir, logfilename)
if !ispath(logfilepath)
return (psbid = row.motherboard_id, slavelog_psbid = missing, qspip = row.qspip)
end
if row.qspip != 1
return (psbid = row.motherboard_id, slavelog_psbid = missing, qspip = row.qspip)
end
psbid = PSBoardDataBase.SlaveLogParserV2.parse_slave_log_v2(logfilepath)
(psbid = row.motherboard_id, slavelog_psbid = psbid, qspip = row.qspip)
end |> DataFrame
# ╔═╡ 162ef015-7acd-4431-91bd-f3c5f1d26f8a
md"""
## result
**Looks OK**
"""
# ╔═╡ Cell order:
# ╠═1d057382-316a-11f0-1fbd-c9c7f879bbb1
# ╠═3bf488c4-cd2a-4b2c-b2ee-a6f8d84368df
# ╠═f8b25d6d-5756-42fa-ac9f-a238d815dad2
# ╠═7d7c80a3-800f-48cf-908b-172730320571
# ╠═d597786d-3112-476e-a640-d494aed630bd
# ╠═da2d6bb7-d970-4eeb-9a1a-bbdda6506312
# ╠═9dae37ff-614a-4d50-9f32-908e799e325e
@ -57,3 +104,8 @@ falied_boards = [895, 896, 1142, 1276, 1094, 1095]
# ╠═157a0ca3-a92a-4f6d-a3d3-c9650b4bf573
# ╠═346993ff-fdb0-4f0f-a83f-23584e2bc540
# ╠═c7adb9ed-ef92-4727-a446-556d65cf6f3f
# ╠═b8b31ee3-ffc9-4d55-80ff-001dfebfc776
# ╠═f464ed57-7d42-42e5-a388-c815bba0ad60
# ╠═2bd267ea-78ab-454e-93e4-81a2f7a5d671
# ╠═383e1e04-ba3e-49bf-9f99-46c53b37204b
# ╠═162ef015-7acd-4431-91bd-f3c5f1d26f8a