datalad / datalad-gooey

A graphical user interface for DataLad (datalad.org)
https://docs.datalad.org/projects/gooey
Other
4 stars 6 forks source link

Rewrite of command parameter handling #291

Closed mih closed 1 year ago

mih commented 1 year ago

This change replaces the previously used mixin pattern for parameter input widget. Now the Gooey parameter representation and the input widget are two connected but separate entities.

GooeyCommandParameter is the new base class that encapsulates all parameter value handling that is not internal to a single input widget.

The validator/constraint integration is improved. Any parameter value change will now trigger a validation run of the entire command configuration form. Invalid parameter values are flagged with a visual indicator next to the parameter name. As long as invalid parameter values exist, command submission is prevented. Because this is done immediately, and continuously, users also get an immediate indication of require command parameters -- something that required trail-and-error before.

https://user-images.githubusercontent.com/136479/193989384-44a1797c-7eb6-4638-9cdd-a4ab22e6f85b.mp4

codecov-commenter commented 1 year ago

Codecov Report

Base: 67.08% // Head: 65.56% // Decreases project coverage by -1.52% :warning:

Coverage data is based on head (12245e7) compared to base (bab2db0). Patch coverage: 65.03% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #291 +/- ## ========================================== - Coverage 67.08% 65.56% -1.53% ========================================== Files 42 42 Lines 2446 2489 +43 ========================================== - Hits 1641 1632 -9 - Misses 805 857 +52 ``` | [Impacted Files](https://codecov.io/gh/datalad/datalad-gooey/pull/291?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad) | Coverage Δ | | |---|---|---| | [datalad\_gooey/constraints.py](https://codecov.io/gh/datalad/datalad-gooey/pull/291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9jb25zdHJhaW50cy5weQ==) | `62.68% <ø> (ø)` | | | [datalad\_gooey/simplified\_api.py](https://codecov.io/gh/datalad/datalad-gooey/pull/291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9zaW1wbGlmaWVkX2FwaS5weQ==) | `100.00% <ø> (ø)` | | | [datalad\_gooey/param\_alt.py](https://codecov.io/gh/datalad/datalad-gooey/pull/291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9wYXJhbV9hbHQucHk=) | `20.00% <30.43%> (ø)` | | | [datalad\_gooey/param\_widgets.py](https://codecov.io/gh/datalad/datalad-gooey/pull/291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9wYXJhbV93aWRnZXRzLnB5) | `50.00% <51.04%> (-6.39%)` | :arrow_down: | | [datalad\_gooey/param\_path.py](https://codecov.io/gh/datalad/datalad-gooey/pull/291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9wYXJhbV9wYXRoLnB5) | `59.04% <51.92%> (ø)` | | | [datalad\_gooey/param\_form\_utils.py](https://codecov.io/gh/datalad/datalad-gooey/pull/291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9wYXJhbV9mb3JtX3V0aWxzLnB5) | `79.31% <63.82%> (-3.10%)` | :arrow_down: | | [datalad\_gooey/param\_multival.py](https://codecov.io/gh/datalad/datalad-gooey/pull/291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9wYXJhbV9tdWx0aXZhbC5weQ==) | `77.69% <73.77%> (ø)` | | | [datalad\_gooey/dataladcmd\_ui.py](https://codecov.io/gh/datalad/datalad-gooey/pull/291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9kYXRhbGFkY21kX3VpLnB5) | `88.57% <79.31%> (-3.93%)` | :arrow_down: | | [datalad\_gooey/param.py](https://codecov.io/gh/datalad/datalad-gooey/pull/291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS9wYXJhbS5weQ==) | `84.09% <84.09%> (ø)` | | | [datalad\_gooey/tests/test\_param\_widget.py](https://codecov.io/gh/datalad/datalad-gooey/pull/291/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad#diff-ZGF0YWxhZF9nb29leS90ZXN0cy90ZXN0X3BhcmFtX3dpZGdldC5weQ==) | `100.00% <100.00%> (ø)` | | | ... and [3 more](https://codecov.io/gh/datalad/datalad-gooey/pull/291/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=datalad)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.