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

AttributeDict centralization #39

Closed
vreuter opened this issue Jul 17, 2017 · 5 comments
Closed

AttributeDict centralization #39

vreuter opened this issue Jul 17, 2017 · 5 comments

Comments

@vreuter
Copy link
Member

vreuter commented Jul 17, 2017

There are (behaviorally) different versions of AttributeDict in looper.models and here in pypiper. Since they're meant to accomplish the same things and be used in similar ways, it would be great to share a single implementation. Maybe this will be simplified with the migration of some of the core looper classes to a more general repository.

@nsheff
Copy link
Member

nsheff commented Jul 17, 2017

Yeah, this has been on my radar for awhile.
for now let's just leave them duplicated since it's working and I don't want to open this box quite yet.

long term I think the answer is that AttributeDict will reside in models, and both looper and pypiper will import it from models. So this will happen at the models/looper division.

@nsheff
Copy link
Member

nsheff commented Oct 22, 2018

@vreuter what do you think of making AttributeDIct a separate project and putting it on pypi?

Actually, looks there someone else has already done something similar... https://pypi.org/project/attributedict/

And here's a more popular, older project that does the same thing: https://pypi.org/project/attrdict/

any chance to we can use those...?

@nsheff
Copy link
Member

nsheff commented Oct 22, 2018

related to #68

@vreuter
Copy link
Member Author

vreuter commented Nov 12, 2018

Definitely in favor of centralizing. I think the implementation used in this project may have slightly different default behavior regarding things like the "identity" return for missing attributes (since, e.g., requesting samtools and returning "samtools" is more likely to make sense in the pipeline context than in the project context.) That's just something that we should be aware/careful of when this is done.

Also fine with moving to an external implementation like you suggest. There are some custom behaviors like the identity thing just mentioned, and probably some others like path expansions that are automatic for us that we'd need to make accommodating changes for, or extend the functionality offered by an external project's data types.

@nsheff
Copy link
Member

nsheff commented Mar 18, 2019

Closed in favor of #122

@nsheff nsheff closed this as completed Mar 18, 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

No branches or pull requests

2 participants