-
Notifications
You must be signed in to change notification settings - Fork 7
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
Introduce _id
keyword for manually giving testitems a stable identifer
#89
Conversation
… stable identifer
…tting a stable identifer
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.
So is the idea here users can provide an id="XYZ"
keyword arg to uniquely identify, but they don't have to provide a name? Are we doing any checking that the provided id
is actually unique vs. all other parsed test items?
currently, testitems must have a But, if you know that you're setting a |
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.
Sounds good; thanks @nickrobinson251! I wonder if we even call it something like _id
just to try and emphasize that this really shouldn't be needed in the non-us case.
function check_ids(testitems) | ||
ids = getproperty.(testitems, :id) | ||
# This should only be possible to trip if users are manually passing the `_id` keyword. | ||
allunique(ids) || _throw_duplicate_ids(testitems) |
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.
Are we happy throwing on this? I suppose hash collisions are possible, right?
id
keyword for manually giving testitems setting a stable identiferid
keyword for manually giving testitems a stable identifer
id
keyword for manually giving testitems a stable identifer_id
keyword for manually giving testitems a stable identifer
if the testitem
name
is being automatically set to something liable to change, e.g.file:line
location of the testitem, then for the sake of reporting you might want to automatically attach an identifier that's less liable to change (while still keeping the more informativename
for the sake of logging).Part of https://relationalai.atlassian.net/jira/software/c/projects/RAI/issues/RAI-13793