-
Notifications
You must be signed in to change notification settings - Fork 2
Add two-output graph for visualization.py. Add csv validation for dashboard. #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tupui
merged 22 commits into
Simulation-Decomposition:main
from
justushelo:45-two-output-graph
Apr 27, 2026
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
8e4beda
Add two-output graph for visualization.py. Add csv validation for das…
justushelo d90dd4d
Add two-output visualization and robust CSV parsing
justushelo a9af109
Fix column name regex validation
justushelo 8718ee6
feat: Client-side deployment, two-output graph, csv-validation
justushelo d4c90f9
build_wasm.sh update
justushelo decc2ff
Update build script command to use bash
justushelo d0f011e
Guard rails for build_wasm.sh
justushelo 3c3f762
Update package.json
justushelo 2aa9e96
Update paths for Pyodide worker conversion
justushelo e01b7a3
Enable logging in build_wasm.sh
justushelo 29a7d12
Refactor panel convert command in build_wasm.sh
justushelo 3653fca
Linter
tupui 0c15a87
Fix paths for output and requirements in build_wasm.sh
justushelo ae8e1c0
Comment favicon out from template in panel
justushelo 8dfd4ae
Copy _static assets for Netlify build_wasm.sh
justushelo dadc230
Prepare output directory with data
justushelo 76814aa
Try relative paths for conversion
justushelo 92a9f6c
Add directory changing for build
justushelo 8a1f9c8
Edit resources directory to resolve path issue.
justushelo b2fd367
Create data folder into Panel and copy wheel temporarily
justushelo 3b581ab
Ensure data/stress.csv exists.
justushelo bec20d8
Fix Netlify build and add two-output function to simdec_app.py
justushelo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import pytest | ||
| import pandas as pd | ||
| import matplotlib.pyplot as plt | ||
| import simdec as sd | ||
|
|
||
|
|
||
| def test_visualization_single_output(): | ||
| bins = pd.DataFrame({"s1": [1, 2], "s2": [3, 4]}) | ||
| palette = [[1, 0, 0, 1], [0, 1, 0, 1]] | ||
|
|
||
| ax = sd.visualization(bins=bins, palette=palette, kind="histogram") | ||
| assert isinstance(ax, plt.Axes) | ||
|
|
||
| ax_box = sd.visualization(bins=bins, palette=palette, kind="boxplot") | ||
| assert isinstance(ax_box, plt.Axes) | ||
|
|
||
|
|
||
| def test_visualization_two_outputs(): | ||
| bins = pd.DataFrame({"s1": [1, 2]}) | ||
| bins2 = pd.DataFrame({"s1": [5, 6]}) | ||
| palette = [[1, 0, 0, 1]] | ||
|
|
||
| ax = sd.visualization(bins=bins, bins2=bins2, palette=palette) | ||
|
|
||
| assert ax.get_xlabel() == "Output 1" | ||
| assert len(ax.figure.axes) == 4 | ||
|
|
||
|
|
||
| def test_visualization_invalid_kind(): | ||
| bins = pd.DataFrame({"s1": [1]}) | ||
| with pytest.raises(ValueError, match="'kind' can only be 'histogram' or 'boxplot'"): | ||
| sd.visualization(bins=bins, palette=[[1, 0, 0, 1]], kind="invalid") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.