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

Pass errors to front end #18

Open
rikhuijzer opened this issue Jan 22, 2024 · 0 comments
Open

Pass errors to front end #18

rikhuijzer opened this issue Jan 22, 2024 · 0 comments
Labels

Comments

@rikhuijzer
Copy link
Member

It should be made more easy to pass errors to the front end. This came up during #17, where it can throw an error:

"withinRepeatedANOVA" => {
    let k = parse_i64(data, "k").unwrap();
    let m = parse_i64(data, "m").unwrap();
    let rho = parse_f64(data, "rho").unwrap();
    let epsilon = parse_f64(data, "epsilon").unwrap();
    if epsilon < (1.0 / (m as f64 - 1.0)) {
        Err(
            "lower bound of ε corresponds to 1 / (number of measurements - 1)"
                .to_string(),
        )
@rikhuijzer rikhuijzer mentioned this issue Jan 22, 2024
6 tasks
@storopoli storopoli mentioned this issue Feb 14, 2024
10 tasks
@storopoli storopoli mentioned this issue Feb 29, 2024
1 task
storopoli added a commit that referenced this issue Mar 3, 2024
We are moving to [Svelte](https://svelte.dev/) as the main UI/Fullstack
Framework:

- using Svelte 5 with the new [Runes
API](https://svelte.dev/blog/runes).

The idea is to not touch `pa` (the `power/` crate).
It will be still an `emscripten` WASM blob.
We need very little frontend in JS. Just to send the JSON to `pa` and
get back some JSON,
e.g. `{"test": "oneSampleTTest", "tail": "1", "analysis": "n", "n": 50,
"alpha": 0.05,"power": 0.95,"es": 0.5}` and then get back `{"n": 45}`.
This will enable us to get the reactive conditional rendering on the
analysis using Svelte components.
(Some tests have different greek letter for the Noncentrality parameter
and also different UI fields for the user to input, these are easy to
handle with Svelte)

Additionally, we can do better sanitization of the user inputs before
passing internally to `pa`'s WASM (related #19),
and better error handling possibilities (related #18).

Superseds #29.

## TODO

- [x] Replicate Current UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants