-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add template-summary and template-description fields to the Template Unit (New) #985
Conversation
Add two fields for the Template Unit: - template-summary - template-description These fields mimick the summary and description fields of the Job Unit to provide a quick explanation and a longer form one about what a template unit does. Both these fields are translatable, and validation is added for the template-summary field to make sure if a value is provided, it is one line only and is less than 80 characters.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #985 +/- ##
==========================================
+ Coverage 38.81% 38.84% +0.02%
==========================================
Files 333 333
Lines 37029 37046 +17
Branches 6321 6321
==========================================
+ Hits 14374 14391 +17
Misses 22022 22022
Partials 633 633
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Good stuff! +1
…Unit (New) (canonical#985) * Add template-summary and template-description fields and validators Add two fields for the Template Unit: - template-summary - template-description These fields mimick the summary and description fields of the Job Unit to provide a quick explanation and a longer form one about what a template unit does. Both these fields are translatable, and validation is added for the template-summary field to make sure if a value is provided, it is one line only and is less than 80 characters. * Add unit tests for the new Template Unit fields * Update Template Unit documentation * Add unit tests for the translation methods of the new fields
…Unit (New) (canonical#985) * Add template-summary and template-description fields and validators Add two fields for the Template Unit: - template-summary - template-description These fields mimick the summary and description fields of the Job Unit to provide a quick explanation and a longer form one about what a template unit does. Both these fields are translatable, and validation is added for the template-summary field to make sure if a value is provided, it is one line only and is less than 80 characters. * Add unit tests for the new Template Unit fields * Update Template Unit documentation * Add unit tests for the translation methods of the new fields
Description
Add two fields to Template Units:
template-summary
template-description
These fields mimick the summary and description fields of the Job Unit to provide a quick explanation and a longer form one about what a template unit does.
Both of these fields are translatable, and validation is added for the
template-summary
field to make sure if a value is provided, it is one line only and less than 80 characters.Resolved issues
https://warthogs.atlassian.net/browse/CHECKBOX-1239
Documentation
Template Unit reference page is updated to mention both fields.
Tests
pytest checkbox-ng/plainbox/impl/unit/test_template.py
)template-summary
field of more than 80 characters, or if the value for this field has more than one line, you will see warnings when running validation for the provider.For instance, if I add the following
template-summary
to an existingxxx
template unit in the base provider:and then run
./manage.py validate
for the base provider, I will see three warnings: