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

Allow the descendant fetcher to be more flexible by grouping uris by model #1275

Merged
merged 5 commits into from Aug 23, 2017

Conversation

cjcolvar
Copy link
Member

@cjcolvar cjcolvar commented Aug 4, 2017

This PR preserves previous functionality for grouping uris by priority/other but also adds the capability to get the uris grouped by model if you call descendant_and_self_uris_partitioned_by_model directly.

partitioned_uris[:priority] << rdf_resource.subject
else
partitioned_uris[:other] << rdf_resource.subject
rdf_graph_models.each do |model|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're not using the prioritized_object? method anymore, should it be deleted?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I'll take it out.

@jrochkind
Copy link
Contributor

jrochkind commented Aug 7, 2017

Is this new behavior API-compatible with old behavior, people setting "priority models" can still set them in the old way and get the same behavior? I think maybe so, can you confirm @cjcolvar ?

@jrochkind
Copy link
Contributor

@cjcolvar could it use any more docs explaining this use of descendant_and_self_uris_partitioned_by_model, and what it's intended for?

@cjcolvar
Copy link
Member Author

cjcolvar commented Aug 7, 2017

@jrochkind yes, I was intending to make it backwards compatible. I didn't touch the tests and they still pass
As for documentation, I was wondering if I should add more. I'll do that and add some tests as well.

@jrochkind
Copy link
Contributor

Awesome, thanks @cjcolvar, appreciate it!

@cjcolvar
Copy link
Member Author

cjcolvar commented Aug 7, 2017

@jrochkind This is ready for rereview now.

@atz
Copy link
Contributor

atz commented Aug 22, 2017

@cjcolvar Looks like you already have approval and just need a rebase

@cjcolvar cjcolvar merged commit a322543 into master Aug 23, 2017
@cjcolvar cjcolvar deleted the model_descendant_fetcher branch August 23, 2017 15:26
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.

None yet

4 participants