Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[ui] Attribute / Node: Refacto of the attribute validation paradigm#2725

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
nicolas-lambert-tc wants to merge13 commits intodevelop
base:develop
Choose a base branch
Loading
fromfeature/node-valididy-check

Conversation

@nicolas-lambert-tc
Copy link
Contributor

@nicolas-lambert-tcnicolas-lambert-tc commentedMay 22, 2025
edited
Loading

Description

Alicevision related PR

Add a standard way to validate the attribute value.
It add a way to apply validators to an attribute description and to represent in the UI when these attributes are not valid.

Screenshot_2025-05-23_17-35-17

image

Validators

classAttributeValidator(object):def__call__(self,node:"Node",attribute:"Attribute")->tuple[bool,list[str]]:raiseNotImplementedError()classNotEmptyValidator(AttributeValidator):def__call__(self,node:"Node",attribute:"Attribute")->tuple[bool,list[str]]:ifattribute.valueisNoneorattribute.value=="":returnerror("Empty value are not allowed")returnsuccess()

Validators usage (can be a lambda)

desc.StringParam(name="input",label="Test input",description="",value="",validators=[NotEmptyValidator(),lambdanode,attribute:success()ifattribute=="test"elseerror("Attribute value should be 'test'")                ]        ),

Features list

  • Add the notion of reusable validators
  • Validator embed the error messages
  • Validator can be a lambda
  • An icon with error message appear when an attribute value is invalid (at least one validator return error messages)
  • A node containing an invalid attribute is tagged with an orange icon and the selection rectangle is orange
  • Attribute value is checked every time the attribute value is set (in the Command)
  • A Warning Dialog is displayed before trying to submit a graph where a node is in warning state

@codecov
Copy link

codecovbot commentedMay 22, 2025
edited
Loading

Codecov Report

Attention: Patch coverage is94.39252% with6 lines in your changes missing coverage. Please review.

Project coverage is 78.89%. Comparing base(49ab4b5) to head(48acfec).
Report is 71 commits behind head on develop.

✅ All tests successful. No failed tests found.

Files with missing linesPatch %Lines
meshroom/core/desc/validators.py87.50%3 Missing⚠️
meshroom/core/desc/attribute.py83.33%2 Missing⚠️
meshroom/core/attribute.py96.00%1 Missing⚠️
Additional details and impacted files
@@             Coverage Diff             @@##           develop    #2725      +/-   ##===========================================+ Coverage    78.57%   78.89%   +0.32%===========================================  Files           48       50       +2       Lines         6577     6663      +86     ===========================================+ Hits          5168     5257      +89+ Misses        1409     1406       -3

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • 📦JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nicolas-lambert-tcnicolas-lambert-tcforce-pushed thefeature/node-valididy-check branch fromaca1a11 toa6e26b9CompareMay 23, 2025 15:22
@nicolas-lambert-tcnicolas-lambert-tc added featurenew feature (proposed as PR or issue planned by dev) UI labelsMay 23, 2025
@nicolas-lambert-tcnicolas-lambert-tcforce-pushed thefeature/node-valididy-check branch 2 times, most recently from458de57 to404056dCompareJune 4, 2025 14:34
@nicolas-lambert-tcnicolas-lambert-tc marked this pull request as ready for reviewJune 5, 2025 06:52
@nicolas-lambert-tcnicolas-lambert-tcforce-pushed thefeature/node-valididy-check branch 2 times, most recently from528c611 to2a34f27CompareJune 5, 2025 07:18
@fabiencastanfabiencastan added this to theMeshroom 2025.1.0 milestoneJun 14, 2025
…range icon if an error exists. Mandatory atribute have a '*'
…splays a warning icon, and selection border is orange
nicolas-lambert-tcand others added3 commitsJune 16, 2025 17:37
Co-authored-by: Fabien Castan <fabcastan@gmail.com>
Co-authored-by: Fabien Castan <fabcastan@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cbentejaccbentejacAwaiting requested review from cbentejac

@mh0gmh0gAwaiting requested review from mh0g

@servantftransperfectservantftransperfectAwaiting requested review from servantftransperfect

@fabiencastanfabiencastanAwaiting requested review from fabiencastan

At least 1 approving review is required to merge this pull request.

Labels

featurenew feature (proposed as PR or issue planned by dev)UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@nicolas-lambert-tc@fabiencastan

[8]ページ先頭

©2009-2025 Movatter.jp