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: [VRD-818] Implement BuildScan
class
#3757
Conversation
{% if objname.endswith("Enum") -%} | ||
:undoc-members: | ||
:member-order: bysource | ||
{% endif -%} |
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.
Enum
variants are technically class members, and there isn't a clean way to attach meaningful docstrings to them, so we have to clumsily tell our documentation, "If a class's name ends with Enum
, go ahead and render its undocumented members" as a bit of a hack.
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.
This bit gives you the OPTION = 'option'
style listing of all the possible options at the end of the doc string I assume?
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.
Yes
|
||
assert build.get_scan().progress == "scanned" | ||
|
||
""" |
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.
|
||
assert build.get_scan().status == "safe" | ||
|
||
""" |
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.
|
||
(build_scan.progress == "scanned") and (build_scan.get_status() == "safe") | ||
|
||
""" |
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.
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.
Note Build.get_scan()
isn't hyperlinked, because it isn't implemented until #3758.
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.
The only minor concern I have is the use of the term "status" , as it could be a bit confusing and potentially be conflated with "progress". (Checking the progress of a scan could arguably mean the same thing as checking the status of a scan). I wonder if something like ScanResultEnum
/ Buildscan.result
might make it more explicit that this object represents the outcome/result of a completed scan.
I've addressed @ewagner-verta's feedback by replacing any references to a build scan's "status" with "result". Tests still pass, screenshots of documentation have been updated, and a cmd+F of this PR's diff for "status" confirms that the word is no longer being used in the user-facing client API. |
Impact and Context
Now we have a user-facing class to represent the results of a model build scan!
Risks and Area of Effect
None; entirely new functionality, covered by tests.
Testing
In Python 3.10:
Reverting
Revert this PR.