Skip to content
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

Prevent running of model with non-parseable data.json. #230

Closed
wants to merge 3 commits into from

Conversation

jsoules
Copy link
Collaborator

@jsoules jsoules commented Oct 29, 2024

Fix #226.

This PR makes the handleRun callback (defined in RunPanel.tsx and used as a parameter to the CompiledRunPanel component) nullable. The callback will be undefined if the data.json does not parse successfully.

In turn, in the CompiledRunPanel component, the Run Sampling button will be disabled if the handleRun parameter is undefined. This prevents a downstream error in model execution caused by the failed parse.

I've added a tooltip to the "Run sampling" button that explains to the user why it is disabled in the data-did-not-parse case, and describes the function in the success case. (I also covered the cases where the model is loading or sampling is already in progress.

@jsoules jsoules closed this Oct 29, 2024
@jsoules
Copy link
Collaborator Author

jsoules commented Oct 29, 2024

On further conversation with @WardBrian, it's desirable to allow an empty string in data.json. See updated PR.

@jsoules jsoules deleted the bugfix-226-data-type-issue branch October 30, 2024 14:27
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.

Sampling with an empty Data window causes TypeError
1 participant