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

Support subclasses by passing type-constraints with model #51

Merged
merged 6 commits into from Oct 6, 2020

Conversation

heralden
Copy link
Member

@heralden heralden commented Aug 27, 2020

There were two alternatives to passing type-constraints to imcljs.path/walk so that all functions would work with subclass constraints:

  • Pass as optional argument, which would need to be added to every function dependent (directly or indirectly) on walk
  • Pass assoc'ed to model

The latter approach was chosen as it would require much less refactoring in Bluegenes, the downside being it's more subtle. Hopefully mentioning this in every docstring will be enough.

Resolves #50 by making the docstring clearer.

I will wait with merging this until I have the Bluegenes PR utilizing this ready.

There were two alternatives to passing type-constraints to `walk` so
that all functions would work with subclass constraints:
- Pass as optional argument, which would need to be added to every
function dependent (directly or indirectly) on `walk`
- Pass assoc'ed to model
The latter approach was chosen as it would require much less refactoring
in Bluegenes, the downside being it's more subtle. Hopefully mentioning
this in every docstring will be enough.
…subclass

This function was also in dire need of proper documentation.
This is invalid according to the PathQuery API, as type constraints
can't participate in constraint logic.
@heralden heralden merged commit 4d0c1be into intermine:dev Oct 6, 2020
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.

path/subclasses doesn't return all subclasses
1 participant