Skip to content

Changes from Sven#64

Open
vladdez wants to merge 28 commits into
mainfrom
SNaber-main
Open

Changes from Sven#64
vladdez wants to merge 28 commits into
mainfrom
SNaber-main

Conversation

@vladdez

@vladdez vladdez commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator
  • add AoG for automatic style building using PlotSpec use AoG experimental backend? #58
  • update Makie, WGLMakie, TopoPlot
  • explore(...) gained new keyword options:
    axis_options - labels, limits, ticks, tickformat, scale for x and y
    auto_reset_view - recentering
    fit_window - fitting window to viewport
  • Disabling linestyle if the same term is used for linestyle and row/col facet.
  • Creating the testing system checking each dashboard option
  • Dashboard testing #44 enabled

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

JuliaFormatter

[JuliaFormatter] reported by reviewdog 🐶

topo_widget_obs =
Observable{Any}(ERPExplorer.topoplot_widget(pos_sets[pos_keys[1]], channel_chosen; size = topo_size))


[JuliaFormatter] reported by reviewdog 🐶

topo_widget_obs[] =
ERPExplorer.topoplot_widget(pos_sets[key], channel_chosen; size = topo_size)


[JuliaFormatter] reported by reviewdog 🐶

topo_widget = ERPExplorer.topoplot_widget(positions, channel_chosen; size = topo_size)


[JuliaFormatter] reported by reviewdog 🐶

auto_action_names = BENCH_LIVE_AUTO ? read_livebench_action_names(BENCH_LIVE_ACTIONS_FILE) : String[]
invalid_auto_actions = [n for n in auto_action_names if !haskey(available_auto_actions, n)]


[JuliaFormatter] reported by reviewdog 🐶

auto_actions = [
(name, available_auto_actions[name]) for name in auto_action_names
]


[JuliaFormatter] reported by reviewdog 🐶

isempty(BENCH_LIVE_REPORT) ? default_livebench_report_path(BENCH_LIVE_ACTIONS_FILE) :
BENCH_LIVE_REPORT


[JuliaFormatter] reported by reviewdog 🐶

println("auto-livebench action failed: ", name, " :: ", sprint(showerror, err))


[JuliaFormatter] reported by reviewdog 🐶

effects_value = isnothing(pending_effects_ms[]) ? NaN : pending_effects_ms[]
effects_text = isnan(effects_value) ? "n/a" : @sprintf("%.2f", effects_value)


[JuliaFormatter] reported by reviewdog 🐶

return DOM.div(
css,
Bonito.TailwindCSS,
cards;
style = container_style,
)


[JuliaFormatter] reported by reviewdog 🐶

BENCH_LIVE ?
build_live_bench_app(model; positions = positions_sets) :


[JuliaFormatter] reported by reviewdog 🐶

println("Live bench enabled. Interact with the UI; each update prints `livebench #... total_ms=...`")

vladdez and others added 9 commits April 27, 2026 15:12
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@vladdez vladdez mentioned this pull request Apr 27, 2026
5 tasks
Comment thread src/explore.jl
@behinger

behinger commented May 5, 2026

Copy link
Copy Markdown
Member

seems like CI / tests are running - they take ~18min
grafik
this looks correct?

@vladdez

vladdez commented May 8, 2026

Copy link
Copy Markdown
Collaborator Author

Yes, it seems correct!

@vladdez vladdez mentioned this pull request May 8, 2026
16 tasks

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

JuliaFormatter

[JuliaFormatter] reported by reviewdog 🐶

yhat_dict[term] = ERPExplorer.widget_value(value_state[2], value_state[3])


[JuliaFormatter] reported by reviewdog 🐶

bindings = LiveUiBindings(set_term_enabled!, set_mapping_slot!, set_channel!, reset_view!)
maybe_start_auto!() = maybe_start_auto_playback!(playback, bindings, config.live_actions_file)


[JuliaFormatter] reported by reviewdog 🐶

spec =
ERPExplorer.update_grid(erp_state, formula_values, cat_terms, cont_terms, mapping_value)


[JuliaFormatter] reported by reviewdog 🐶

println("auto-livebench warmup failed: ", action_id, " :: ", sprint(showerror, err))


[JuliaFormatter] reported by reviewdog 🐶

println("auto-livebench action failed: ", action_id, " :: ", sprint(showerror, err))


[JuliaFormatter] reported by reviewdog 🐶

function start_harness_server(app; host::AbstractString = DEFAULT_HOST, port::Int = DEFAULT_PORT)


[JuliaFormatter] reported by reviewdog 🐶

categorical_terms = [term for (ix, term) in enumerate(var_names) if var_types[ix] == :CategoricalTerm]


[JuliaFormatter] reported by reviewdog 🐶

Row(DOM.div("linestyle:"), linestyle_dd, align_items = "center", justify_items = "end"),


[JuliaFormatter] reported by reviewdog 🐶

topo_obs[] = ERPExplorer.topoplot_widget(pos_sets[key], channel_chosen; size = size)


[JuliaFormatter] reported by reviewdog 🐶

d1 .+
3 * sin.(0.1 * pi * i .+ Random.rand() * 2π) .+
2 * sin.(0.3 * pi * i .* (1:n_timepoints)) .+
Random.randn(size(d1)...) .* 5 .+


[JuliaFormatter] reported by reviewdog 🐶

:fruit => Random.shuffle(repeat(["orange", "banana"], outer = div(n_events, 2))),


[JuliaFormatter] reported by reviewdog 🐶

DashboardBenchHarness.begin_auto_action!(render_timeout_state, "toggle_luminance_on", true)


[JuliaFormatter] reported by reviewdog 🐶

[
(
action_id = "baseline",
success = true,
runs_completed = 1,
runs_requested = 1,
effects_median_ms = 1.0,
update_grid_median_ms = 2.0,
total_median_ms = 3.0,
error_message = "",
),
],


[JuliaFormatter] reported by reviewdog 🐶

[
(
sequence = 1,
event_source = "auto:baseline",
action_id = "baseline",
effects_ms = 1.0,
plot_layout_ms = 2.0,
total_ms = 3.0,
),
],

term_type(t) = typeof(t).name.name

is_continuous_like(term_type::Symbol) = term_type in (:ContinuousTerm, :BSplineTerm)
is_supported_plot_term(term_type::Symbol) = term_type in (:CategoricalTerm, :ContinuousTerm, :BSplineTerm)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
is_supported_plot_term(term_type::Symbol) = term_type in (:CategoricalTerm, :ContinuousTerm, :BSplineTerm)
is_supported_plot_term(term_type::Symbol) =
term_type in (:CategoricalTerm, :ContinuousTerm, :BSplineTerm)

Comment thread test/actions_registry.jl
live_ids = Set(action_ids_for_scope(ACTION_SCOPE_LIVE))
bench_ids = Set(action_ids_for_scope(ACTION_SCOPE_BENCH))

default_live_ids = read_action_scenario(joinpath(@__DIR__, "livebench_actions_default.txt"))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
default_live_ids = read_action_scenario(joinpath(@__DIR__, "livebench_actions_default.txt"))
default_live_ids =
read_action_scenario(joinpath(@__DIR__, "livebench_actions_default.txt"))

Comment thread test/cli_config.jl
@test live_cfg.live_start_delay_sec == 2.5
@test live_cfg.live_action_timeout_sec == 30.0

default_live_cfg = parse_harness_config(["--mode=bench-live-auto"]; script_dir = script_dir)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
default_live_cfg = parse_harness_config(["--mode=bench-live-auto"]; script_dir = script_dir)
default_live_cfg =
parse_harness_config(["--mode=bench-live-auto"]; script_dir = script_dir)

Comment thread test/dashboard_options.jl
Comment on lines +33 to +36
const CONFIG = parse_harness_config(
ARGS;
script_dir = SCRIPT_DIR,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
const CONFIG = parse_harness_config(
ARGS;
script_dir = SCRIPT_DIR,
)
const CONFIG = parse_harness_config(ARGS; script_dir = SCRIPT_DIR)

Comment on lines +43 to +78
HarnessConfig,
MODE_HELP,
MODE_SERVE,
MODE_BENCH,
MODE_BENCH_LIVE_AUTO,
DEFAULT_HOST,
DEFAULT_PORT,
DEFAULT_SFREQ,
DEFAULT_BENCH_REPEATS,
DEFAULT_BENCH_WARMUP,
DEFAULT_BENCH_CHANNEL,
DEFAULT_LIVE_START_DELAY_SEC,
DEFAULT_LIVE_STEP_DELAY_SEC,
DEFAULT_LIVE_RENDER_SETTLE_DELAY_SEC,
DEFAULT_LIVE_ACTION_TIMEOUT_SEC,
parse_cli_args,
parse_harness_config,
usage_text,
action_registry,
registered_action_ids,
action_ids_for_scope,
live_action_triggers_render,
default_bench_scenario,
ensure_registered_action_ids,
read_action_scenario,
load_validated_scenario,
default_bench_report_path,
default_live_report_path,
write_bench_csv,
write_live_csv,
run_offline_benchmark,
build_live_benchmark_app,
start_harness_server,
build_benchmark_fixture,
ACTION_SCOPE_BENCH,
ACTION_SCOPE_LIVE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
HarnessConfig,
MODE_HELP,
MODE_SERVE,
MODE_BENCH,
MODE_BENCH_LIVE_AUTO,
DEFAULT_HOST,
DEFAULT_PORT,
DEFAULT_SFREQ,
DEFAULT_BENCH_REPEATS,
DEFAULT_BENCH_WARMUP,
DEFAULT_BENCH_CHANNEL,
DEFAULT_LIVE_START_DELAY_SEC,
DEFAULT_LIVE_STEP_DELAY_SEC,
DEFAULT_LIVE_RENDER_SETTLE_DELAY_SEC,
DEFAULT_LIVE_ACTION_TIMEOUT_SEC,
parse_cli_args,
parse_harness_config,
usage_text,
action_registry,
registered_action_ids,
action_ids_for_scope,
live_action_triggers_render,
default_bench_scenario,
ensure_registered_action_ids,
read_action_scenario,
load_validated_scenario,
default_bench_report_path,
default_live_report_path,
write_bench_csv,
write_live_csv,
run_offline_benchmark,
build_live_benchmark_app,
start_harness_server,
build_benchmark_fixture,
ACTION_SCOPE_BENCH,
ACTION_SCOPE_LIVE
HarnessConfig,
MODE_HELP,
MODE_SERVE,
MODE_BENCH,
MODE_BENCH_LIVE_AUTO,
DEFAULT_HOST,
DEFAULT_PORT,
DEFAULT_SFREQ,
DEFAULT_BENCH_REPEATS,
DEFAULT_BENCH_WARMUP,
DEFAULT_BENCH_CHANNEL,
DEFAULT_LIVE_START_DELAY_SEC,
DEFAULT_LIVE_STEP_DELAY_SEC,
DEFAULT_LIVE_RENDER_SETTLE_DELAY_SEC,
DEFAULT_LIVE_ACTION_TIMEOUT_SEC,
parse_cli_args,
parse_harness_config,
usage_text,
action_registry,
registered_action_ids,
action_ids_for_scope,
live_action_triggers_render,
default_bench_scenario,
ensure_registered_action_ids,
read_action_scenario,
load_validated_scenario,
default_bench_report_path,
default_live_report_path,
write_bench_csv,
write_live_csv,
run_offline_benchmark,
build_live_benchmark_app,
start_harness_server,
build_benchmark_fixture,
ACTION_SCOPE_BENCH,
ACTION_SCOPE_LIVE

Comment thread test/lib/cli.jl
Comment on lines +140 to +141
isempty(unknown_flags) ||
error("Unknown flag(s): $(join("--" .* unknown_flags, ", ")). Use --help for usage.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
isempty(unknown_flags) ||
error("Unknown flag(s): $(join("--" .* unknown_flags, ", ")). Use --help for usage.")
isempty(unknown_flags) || error(
"Unknown flag(s): $(join("--" .* unknown_flags, ", ")). Use --help for usage.",
)

Comment thread test/lib/cli.jl
Comment on lines +209 to +211
bench_repeats = _parse_int(parsed.options, "bench-repeats", DEFAULT_BENCH_REPEATS; min_value = 1)
bench_warmup = _parse_int(parsed.options, "bench-warmup", DEFAULT_BENCH_WARMUP; min_value = 0)
bench_channel = _parse_int(parsed.options, "bench-channel", DEFAULT_BENCH_CHANNEL; min_value = 1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
bench_repeats = _parse_int(parsed.options, "bench-repeats", DEFAULT_BENCH_REPEATS; min_value = 1)
bench_warmup = _parse_int(parsed.options, "bench-warmup", DEFAULT_BENCH_WARMUP; min_value = 0)
bench_channel = _parse_int(parsed.options, "bench-channel", DEFAULT_BENCH_CHANNEL; min_value = 1)
bench_repeats =
_parse_int(parsed.options, "bench-repeats", DEFAULT_BENCH_REPEATS; min_value = 1)
bench_warmup =
_parse_int(parsed.options, "bench-warmup", DEFAULT_BENCH_WARMUP; min_value = 0)
bench_channel =
_parse_int(parsed.options, "bench-channel", DEFAULT_BENCH_CHANNEL; min_value = 1)

Comment thread test/lib/cli.jl
Comment on lines +231 to +233
live_action_timeout_sec <= 0.0 && error(
"Option --bench-live-timeout must be > 0, got $(live_action_timeout_sec).",
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
live_action_timeout_sec <= 0.0 && error(
"Option --bench-live-timeout must be > 0, got $(live_action_timeout_sec).",
)
live_action_timeout_sec <= 0.0 &&
error("Option --bench-live-timeout must be > 0, got $(live_action_timeout_sec).")

Comment on lines +20 to +21
default_live_report_path(config, config.live_actions_file) :
config.live_report_file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
default_live_report_path(config, config.live_actions_file) :
config.live_report_file
default_live_report_path(config, config.live_actions_file) : config.live_report_file

cat_terms = var_names[var_types .== :CategoricalTerm]
cont_terms = var_names[ERPExplorer.is_continuous_like.(var_types)]

mapping, mapping_dom, mapping_controls = build_mapping_controls(var_names, var_types)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
mapping, mapping_dom, mapping_controls = build_mapping_controls(var_names, var_types)
mapping, mapping_dom, mapping_controls =
build_mapping_controls(var_names, var_types)

for (term, value_state) in formula_state
if !isempty(value_state) && value_state[1] && !isempty(value_state[2])
push!(active_terms, term)
yhat_dict[term] = ERPExplorer.widget_value(value_state[2], value_state[3])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
yhat_dict[term] = ERPExplorer.widget_value(value_state[2], value_state[3])
yhat_dict[term] =
ERPExplorer.widget_value(value_state[2], value_state[3])

Comment on lines +82 to +83
bindings = LiveUiBindings(set_term_enabled!, set_mapping_slot!, set_channel!, reset_view!)
maybe_start_auto!() = maybe_start_auto_playback!(playback, bindings, config.live_actions_file)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
bindings = LiveUiBindings(set_term_enabled!, set_mapping_slot!, set_channel!, reset_view!)
maybe_start_auto!() = maybe_start_auto_playback!(playback, bindings, config.live_actions_file)
bindings =
LiveUiBindings(set_term_enabled!, set_mapping_slot!, set_channel!, reset_view!)
maybe_start_auto!() =
maybe_start_auto_playback!(playback, bindings, config.live_actions_file)

try
apply_live_action!(bindings, action_id)
catch err
println("auto-livebench warmup failed: ", action_id, " :: ", sprint(showerror, err))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
println("auto-livebench warmup failed: ", action_id, " :: ", sprint(showerror, err))
println(
"auto-livebench warmup failed: ",
action_id,
" :: ",
sprint(showerror, err),
)

try
apply_live_action!(bindings, action_id)
catch err
println("auto-livebench action failed: ", action_id, " :: ", sprint(showerror, err))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
println("auto-livebench action failed: ", action_id, " :: ", sprint(showerror, err))
println(
"auto-livebench action failed: ",
action_id,
" :: ",
sprint(showerror, err),
)

Comment thread test/lib/live/server.jl

Start the Bonito server for the harness app and print the URL.
"""
function start_harness_server(app; host::AbstractString = DEFAULT_HOST, port::Int = DEFAULT_PORT)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
function start_harness_server(app; host::AbstractString = DEFAULT_HOST, port::Int = DEFAULT_PORT)
function start_harness_server(
app;
host::AbstractString = DEFAULT_HOST,
port::Int = DEFAULT_PORT,
)

Comment on lines +17 to +20
d1 .+
3 * sin.(0.1 * pi * i .+ Random.rand() * 2π) .+
2 * sin.(0.3 * pi * i .* (1:n_timepoints)) .+
Random.randn(size(d1)...) .* 5 .+

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
d1 .+
3 * sin.(0.1 * pi * i .+ Random.rand() * 2π) .+
2 * sin.(0.3 * pi * i .* (1:n_timepoints)) .+
Random.randn(size(d1)...) .* 5 .+
d1 .+ 3 * sin.(0.1 * pi * i .+ Random.rand() * 2π) .+
2 * sin.(0.3 * pi * i .* (1:n_timepoints)) .+ Random.randn(size(d1)...) .* 5 .+

),
),
:animal => Random.shuffle(repeat(["cat", "dog"], outer = div(n_events, 2))),
:fruit => Random.shuffle(repeat(["orange", "banana"], outer = div(n_events, 2))),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
:fruit => Random.shuffle(repeat(["orange", "banana"], outer = div(n_events, 2))),
:fruit =>
Random.shuffle(repeat(["orange", "banana"], outer = div(n_events, 2))),

Comment thread test/live_playback.jl
["toggle_luminance_on"],
joinpath(mktempdir(), "render_timeout.csv"),
)
DashboardBenchHarness.begin_auto_action!(render_timeout_state, "toggle_luminance_on", true)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
DashboardBenchHarness.begin_auto_action!(render_timeout_state, "toggle_luminance_on", true)
DashboardBenchHarness.begin_auto_action!(
render_timeout_state,
"toggle_luminance_on",
true,
)

Comment thread test/report_io.jl
Comment on lines +31 to +42
[
(
action_id = "baseline",
success = true,
runs_completed = 1,
runs_requested = 1,
effects_median_ms = 1.0,
update_grid_median_ms = 2.0,
total_median_ms = 3.0,
error_message = "",
),
],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
[
(
action_id = "baseline",
success = true,
runs_completed = 1,
runs_requested = 1,
effects_median_ms = 1.0,
update_grid_median_ms = 2.0,
total_median_ms = 3.0,
error_message = "",
),
],
[(
action_id = "baseline",
success = true,
runs_completed = 1,
runs_requested = 1,
effects_median_ms = 1.0,
update_grid_median_ms = 2.0,
total_median_ms = 3.0,
error_message = "",
),],

Comment thread test/report_io.jl
Comment on lines +50 to +59
[
(
sequence = 1,
event_source = "auto:baseline",
action_id = "baseline",
effects_ms = 1.0,
plot_layout_ms = 2.0,
total_ms = 3.0,
),
],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
[
(
sequence = 1,
event_source = "auto:baseline",
action_id = "baseline",
effects_ms = 1.0,
plot_layout_ms = 2.0,
total_ms = 3.0,
),
],
[(
sequence = 1,
event_source = "auto:baseline",
action_id = "baseline",
effects_ms = 1.0,
plot_layout_ms = 2.0,
total_ms = 3.0,
),],

Comment thread src/explore.jl
end
render_count[] += 1
elapsed_ms = (time_ns() - t0) / 1e6
println("render #", render_count[], " update_grid -> layout in ", round(elapsed_ms; digits = 2), " ms")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
println("render #", render_count[], " update_grid -> layout in ", round(elapsed_ms; digits = 2), " ms")
println(
"render #",
render_count[],
" update_grid -> layout in ",
round(elapsed_ms; digits = 2),
" ms",
)

Comment thread src/explore.jl
Comment on lines 223 to 228
res = DOM.div(
css,
Bonito.TailwindCSS,
cards;
style = Styles(
"height" => "$(1.2*size[2])px",
"width" => "$(size[1])px",
"margin" => "20px",
"position" => :relative,
),
style = container_style,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
res = DOM.div(
css,
Bonito.TailwindCSS,
cards;
style = Styles(
"height" => "$(1.2*size[2])px",
"width" => "$(size[1])px",
"margin" => "20px",
"position" => :relative,
),
style = container_style,
)
res = DOM.div(css, Bonito.TailwindCSS, cards; style = container_style)

Comment thread src/functions_plotting.jl
Comment on lines +228 to +229
cat_color = get(cat_active, mapping_state[:color], false) ? mapping_state[:color] : nothing
cat_marker = get(cat_active, mapping_state[:marker], false) ? mapping_state[:marker] : nothing

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
cat_color = get(cat_active, mapping_state[:color], false) ? mapping_state[:color] : nothing
cat_marker = get(cat_active, mapping_state[:marker], false) ? mapping_state[:marker] : nothing
cat_color =
get(cat_active, mapping_state[:color], false) ? mapping_state[:color] : nothing
cat_marker =
get(cat_active, mapping_state[:marker], false) ? mapping_state[:marker] : nothing

Comment thread src/functions_plotting.jl
Comment on lines +314 to +315
base = AlgebraOfGraphics.data(plot_data) *
AlgebraOfGraphics.mapping(:time_axis, :yhat; pairs(facet_aes)...)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
base = AlgebraOfGraphics.data(plot_data) *
AlgebraOfGraphics.mapping(:time_axis, :yhat; pairs(facet_aes)...)
base =
AlgebraOfGraphics.data(plot_data) *
AlgebraOfGraphics.mapping(:time_axis, :yhat; pairs(facet_aes)...)

Comment thread src/functions_plotting.jl
Comment on lines +344 to +356
scatter_layer = AlgebraOfGraphics.mapping(; pairs(scatter_aes)...) *
AlgebraOfGraphics.visual(
Scatter;
markersize = plot_markersize,
legend = (; markersize = 10.0),
scatter_visual_kwargs...,
)
line_layer = AlgebraOfGraphics.mapping(; pairs(line_aes)...) *
AlgebraOfGraphics.visual(
Lines;
legend = (; linewidth = 1.5),
line_visual_kwargs...,
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
scatter_layer = AlgebraOfGraphics.mapping(; pairs(scatter_aes)...) *
AlgebraOfGraphics.visual(
Scatter;
markersize = plot_markersize,
legend = (; markersize = 10.0),
scatter_visual_kwargs...,
)
line_layer = AlgebraOfGraphics.mapping(; pairs(line_aes)...) *
AlgebraOfGraphics.visual(
Lines;
legend = (; linewidth = 1.5),
line_visual_kwargs...,
)
scatter_layer =
AlgebraOfGraphics.mapping(; pairs(scatter_aes)...) * AlgebraOfGraphics.visual(
Scatter;
markersize = plot_markersize,
legend = (; markersize = 10.0),
scatter_visual_kwargs...,
)
line_layer =
AlgebraOfGraphics.mapping(; pairs(line_aes)...) *
AlgebraOfGraphics.visual(Lines; legend = (; linewidth = 1.5), line_visual_kwargs...)

Comment thread src/functions_plotting.jl
Comment on lines +368 to +372
scales_kwargs[:Marker] =
(;
palette = [:circle, :xcross, :star4, :diamond],
categories = categorical_levels(cat_marker),
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
scales_kwargs[:Marker] =
(;
palette = [:circle, :xcross, :star4, :diamond],
categories = categorical_levels(cat_marker),
)
scales_kwargs[:Marker] = (;
palette = [:circle, :xcross, :star4, :diamond],
categories = categorical_levels(cat_marker),
)

Comment thread src/functions_plotting.jl
# Translate validated axis config into kwargs consumed by AoG draw.
# `xlabel` falls back to x-unit dependent default when not explicitly set.
axis_kwargs = Dict{Symbol,Any}()
axis_kwargs[:xlabel] = isnothing(axis_config[:xlabel]) ? default_xlabel : axis_config[:xlabel]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
axis_kwargs[:xlabel] = isnothing(axis_config[:xlabel]) ? default_xlabel : axis_config[:xlabel]
axis_kwargs[:xlabel] =
isnothing(axis_config[:xlabel]) ? default_xlabel : axis_config[:xlabel]

Comment thread src/functions_plotting.jl
axis_kwargs = Dict{Symbol,Any}()
axis_kwargs[:xlabel] = isnothing(axis_config[:xlabel]) ? default_xlabel : axis_config[:xlabel]
axis_kwargs[:ylabel] = axis_config[:ylabel]
for key in (:xlimits, :ylimits, :xticks, :yticks, :xtickformat, :ytickformat, :xscale, :yscale)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
for key in (:xlimits, :ylimits, :xticks, :yticks, :xtickformat, :ytickformat, :xscale, :yscale)
for key in
(:xlimits, :ylimits, :xticks, :yticks, :xtickformat, :ytickformat, :xscale, :yscale)

Comment thread test/basic.jl
var_names = first.(variables)
categorical_terms = var_names[var_types .== :CategoricalTerm]
continuous_terms = var_names[ERPExplorer.is_continuous_like.(var_types)]
mapping = Dict(:color => :none, :marker => :none, :linestyle => :none, :col => :none, :row => :none)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
mapping = Dict(:color => :none, :marker => :none, :linestyle => :none, :col => :none, :row => :none)
mapping = Dict(
:color => :none,
:marker => :none,
:linestyle => :none,
:col => :none,
:row => :none,
)

Comment thread test/basic.jl
formula_values,
categorical_terms,
continuous_terms,
merge(mapping, Dict(:marker => :fruit, :linestyle => :animal, :row => :fruit, :col => :animal));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
merge(mapping, Dict(:marker => :fruit, :linestyle => :animal, :row => :fruit, :col => :animal));
merge(
mapping,
Dict(:marker => :fruit, :linestyle => :animal, :row => :fruit, :col => :animal),
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants