-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
Track traits and overrides with FactoryProf #296
Track traits and overrides with FactoryProf #296
Conversation
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.
Thanks!
Let's move the other variation (...
) check to the tracking method instead of dealing with this compressed_variations
logic (and duplicating it).
We can use the :__other__
variation name for off limit variations and track it like that; only when we use the simple printer, we need to treat this key differently (show at the bottom of the variations list).
private | ||
|
||
def compress_variations(variations, variations_limit) | ||
limited_variation = { |
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.
Let's rename it to other_variation
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.
I moved this logic to the #track
method https://github.com/test-prof/test-prof/pull/296/files#diff-5bdf54a38f0e448125dcf0c2342a75e4c65f46ebb5a85f5ec8510dbba1b55f9eR139
So we immediately write other variation ( |
Good point. I think, for now it's okay to have "other" in the JSON output as well. |
97ea04a
to
c015654
Compare
c015654
to
b4c7856
Compare
Thanks! Merged (via f1ee78b) |
What is the purpose of this pull request?
Add factory variants (such as traits/overrides) to the output in simple mode. This information will also be in the resulting json file.
Add
variants_limit
config parameter forFactoryProf
to use special ID ([...]
) for factories with too many traits/overrides. The default value is 2.Is there anything you'd like reviewers to focus on?
Checklist
Closes #292