Skip to content
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

Refactor TraitsFeature #457

Closed
wants to merge 4 commits into from
Closed

Refactor TraitsFeature #457

wants to merge 4 commits into from

Conversation

jnm2
Copy link
Contributor

@jnm2 jnm2 commented Feb 21, 2018

When I came to implement the Explicit category for #47, I found TraitsFeature a bit daunting to wrap my head around.

The addition of tracking the Explicit category would introduce even more complexity, especially because I wanted to easily switch it between a trait, a category, and a brand new property. The cached representation List<Trait> was not very easy to tinker with, the way it was mapped back and forth to TestCases and from XmlNodes. So I did a spike.

This PR introduces TestTraitInfo as a way to isolate the logic of parsing, caching, combining, and applying of test properties from each other. I expect a performance increase due to several choices in the new implementation, but simplicity was the real goal.

So, for example, this would be the entire implementation of the new Explicit category: 0261bf6

@OsirisTerje Hopefully the commit messages are good explanations. If this is too many changes, that's no problem. It's just an idea.

@jnm2
Copy link
Contributor Author

jnm2 commented Feb 28, 2018

@OsirisTerje What do you say—skip this for 3.10 and do the equivalent of 0261bf6?

@OsirisTerje
Copy link
Member

Yes, that would be awesome.

About the refactoring, some of it looks good, some of it I don't understand, and some are in between :-) Let's talk a bit about it before we go further, but please get 0261bf6 in !

@jnm2 jnm2 mentioned this pull request Mar 2, 2018
@jnm2
Copy link
Contributor Author

jnm2 commented Mar 2, 2018

Haha, I don't know why I thought it was complicated before... 😄 PR is up already! #467

@jnm2
Copy link
Contributor Author

jnm2 commented Jul 10, 2019

This got stale and may be superseded by @OsirisTerje's plans.

@jnm2 jnm2 closed this Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants