-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: ✨ add functions to check required and blank fields [3/7] #963
base: feat/sprout-checks-2-simple-helper-functions
Are you sure you want to change the base?
feat: ✨ add functions to check required and blank fields [3/7] #963
Conversation
errors += check_list_item_field_not_blank(properties, "contributors", "title") | ||
errors += check_list_item_field_not_blank(properties, "sources", "title") | ||
errors += check_list_item_field_not_blank(properties, "licenses", "name") | ||
errors += check_list_item_field_not_blank(properties, "licenses", "path") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are nested package properties fields (so, technically, fields on contributor properties, source properties, etc.). It would be nice if they were also coming from a constant like the top-level fields from PACKAGE_SPROUT_REQUIRED_FIELDS
. Something to keep in mind / return to when we look at these nested properties more closely?
…/sprout-checks-3-required-and-blank-checks
…/sprout-checks-3-required-and-blank-checks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Only same comments/suggestions from the PR this is stacked on.
seedcase_sprout/core/sprout_checks/check_list_item_field_not_blank.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oo, just saw that I never finished my review from last week. Added it now 👍
A list of errors. An empty list if no errors were found. | ||
""" | ||
errors = check_fields_not_blank(properties, PACKAGE_SPROUT_REQUIRED_FIELDS) | ||
errors += check_list_item_field_not_blank(properties, "contributors", "title") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't contributor title
just recommended and not required as described here?
Same with sources title
?
They are required
to have one property, but which property it is isn't specified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but we have checks for recommendations turned on in Sprout. At least, I turned them on :P
…/sprout-checks-3-required-and-blank-checks
Description
This PR adds functions for checking that (Sprout-specific) required fields are present and not blank.
This PR needs an in-depth review.
Checklist
just run-all