-
Notifications
You must be signed in to change notification settings - Fork 28
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 getRelatedReferences
#847
Comments
Proposal:
Then for #16: |
Do we mean |
Capturing offline discussion:
Proposal: Sleep on it, and if we can't come up with a better option by e.o.d 14th the just go with this: entitiesWithRelationship(entityRefs, relationship, ... )
entitiesWithRelationsips(entityRef, relationships, ... )
addRelationship(targetRefs, relationship, listOfRefLists, ... )
addRelationships(targetRef, relationships, listOReffLists, ... )
removeRelationship(targetRefs, relationship, listOfRefLists, ... )
removeRelationships(targetRef, relationships, listOfRefLists, ... ) |
Subsequent to some further discussion/casual surveying have renamed the query methods to better align with their counterparts and other API methods:
|
The old "two lists" formulation was hard to grok, and difficult to implement effectively. Splitting into two discrete methods better outlines the two potential batch axis. This new approach makes it clear the two well-known divergent use cases and allows for a simpler code path in each - without the need to interrogate the input arrays to work out which pattern is being used (one-to-many or many-to-one). Naming this was hard, after assorted rounds, this option emerged as a 'best of a bad bunch', as it is at least consitent with future 'addRelationship' and 'removeRelationship' methods, along with our more general noun/verb conventions. There is certainly ambiguity as the singular/plural difference is subtle, but it's the best we could come up with. Closes OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com>
We have always documented that supporting relationship queries is optional for a manager (though highly recommended). Despite this the API methods were marked as being abstract. We only got away with this as since the move to Python 3, ABC enforcement wasn't working. This adds default implementations of `getRelationship` and `getRelationships` that simply returns an empty list for each element of the batch. Part of OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com>
The old "two lists" formulation was hard to grok, and difficult to implement effectively. Splitting into two discrete methods better outlines the two potential batch axis. This new approach makes it clear the two well-known divergent use cases and allows for a simpler code path in each - without the need to interrogate the input arrays to work out which pattern is being used (one-to-many or many-to-one). Naming this was hard, after assorted rounds, this option emerged as a 'best of a bad bunch', as it is at least consitent with future 'addRelationship' and 'removeRelationship' methods, along with our more general noun/verb conventions. There is certainly ambiguity as the singular/plural difference is subtle, but it's the best we could come up with. Closes OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com>
We have always documented that supporting relationship queries is optional for a manager (though highly recommended). Despite this the API methods were marked as being abstract. We only got away with this as since the move to Python 3, ABC enforcement wasn't working. This adds default implementations of `getRelationship` and `getRelationships` that simply returns an empty list for each element of the batch. Part of OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com>
The old "two lists" formulation was hard to grok, and difficult to implement effectively. Splitting into two discrete methods better outlines the two potential batch axis. This new approach makes it clear the two well-known divergent use cases and allows for a simpler code path in each - without the need to interrogate the input arrays to work out which pattern is being used (one-to-many or many-to-one). Naming this was hard, after assorted rounds, this option emerged as a 'best of a bad bunch', as it is at least consitent with future 'addRelationship' and 'removeRelationship' methods, along with our more general noun/verb conventions. There is certainly ambiguity as the singular/plural difference is subtle, but it's the best we could come up with. Closes OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com>
We have always documented that supporting relationship queries is optional for a manager (though highly recommended). Despite this the API methods were marked as being abstract. We only got away with this as since the move to Python 3, ABC enforcement wasn't working. This adds default implementations of `getRelationship` and `getRelationships` that simply returns an empty list for each element of the batch. Part of OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com>
The old "two lists" formulation was hard to grok, and difficult to implement effectively. Splitting into two discrete methods better outlines the two potential batch axis. This new approach makes it clear the two well-known divergent use cases and allows for a simpler code path in each - without the need to interrogate the input arrays to work out which pattern is being used (one-to-many or many-to-one). Naming this was hard, after assorted rounds, this option emerged as a 'best of a bad bunch', as it is at least consitent with future 'addRelationship' and 'removeRelationship' methods, along with our more general noun/verb conventions. There is certainly ambiguity as the singular/plural difference is subtle, but it's the best we could come up with. Closes OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com>
We have always documented that supporting relationship queries is optional for a manager (though highly recommended). Despite this the API methods were marked as being abstract. We only got away with this as since the move to Python 3, ABC enforcement wasn't working. This adds default implementations of `getRelationship` and `getRelationships` that simply returns an empty list for each element of the batch. Part of OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com>
The old "two lists" formulation was hard to grok, and difficult to implement effectively. Splitting into two discrete methods better outlines the two potential batch axis. This new approach makes it clear the two well-known divergent use cases and allows for a simpler code path in each - without the need to interrogate the input arrays to work out which pattern is being used (one-to-many or many-to-one). Naming this was hard, after assorted rounds, this option emerged as a 'best of a bad bunch', as it is at least consitent with future 'addRelationship' and 'removeRelationship' methods, along with our more general noun/verb conventions. There is certainly ambiguity as the singular/plural difference is subtle, but it's the best we could come up with. Closes OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com>
We have always documented that supporting relationship queries is optional for a manager (though highly recommended). Despite this the API methods were marked as being abstract. We only got away with this as since the move to Python 3, ABC enforcement wasn't working. This adds default implementations of `getWithRelationship` and `getWithRelationships` that simply returns an empty list for each element of the batch. Part of OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com> Signed-off-by: Tom Cowland <tom@foundry.com>
The old "two lists" formulation was hard to grok, and difficult to implement effectively. Splitting into two discrete methods better outlines the two potential batch axis. This new approach makes it clear the two well-known divergent use cases and allows for a simpler code path in each - without the need to interrogate the input arrays to work out which pattern is being used (one-to-many or many-to-one). Naming this was hard, after assorted rounds, this option emerged as a 'best of a bad bunch', as it is at least consitent with future 'addRelationship' and 'removeRelationship' methods, along with our more general noun/verb conventions. There is certainly ambiguity as the singular/plural difference is subtle, but it's the best we could come up with. Closes OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com>
We have always documented that supporting relationship queries is optional for a manager (though highly recommended). Despite this the API methods were marked as being abstract. We only got away with this as since the move to Python 3, ABC enforcement wasn't working. This adds default implementations of `getWithRelationship` and `getWithRelationships` that simply returns an empty list for each element of the batch. Part of OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com> Signed-off-by: Tom Cowland <tom@foundry.com>
The old "two lists" formulation was hard to grok, and difficult to implement effectively. Splitting into two discrete methods better outlines the two potential batch axis. This new approach makes it clear the two well-known divergent use cases and allows for a simpler code path in each - without the need to interrogate the input arrays to work out which pattern is being used (one-to-many or many-to-one). Naming this was hard, after assorted rounds, this option emerged as a 'best of a bad bunch', as it is at least consitent with future 'addRelationship' and 'removeRelationship' methods, along with our more general noun/verb conventions. There is certainly ambiguity as the singular/plural difference is subtle, but it's the best we could come up with. Closes OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com>
We have always documented that supporting relationship queries is optional for a manager (though highly recommended). Despite this the API methods were marked as being abstract. We only got away with this as since the move to Python 3, ABC enforcement wasn't working. This adds default implementations of `getWithRelationship` and `getWithRelationships` that simply returns an empty list for each element of the batch. Part of OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com> Signed-off-by: Tom Cowland <tom@foundry.com>
We have always documented that supporting relationship queries is optional for a manager (though highly recommended). Despite this the API methods were marked as being abstract. We only got away with this as since the move to Python 3, ABC enforcement wasn't working. This adds default implementations of `getWithRelationship` and `getWithRelationships` that simply returns an empty list for each element of the batch. Part of OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com> Signed-off-by: Tom Cowland <tom@foundry.com>
The old "two lists" formulation was hard to grok, and difficult to implement effectively. Splitting into two discrete methods better outlines the two potential batch axis. This new approach makes it clear the two well-known divergent use cases and allows for a simpler code path in each - without the need to interrogate the input arrays to work out which pattern is being used (one-to-many or many-to-one). Naming this was hard, after assorted rounds, this option emerged as a 'best of a bad bunch', as it is at least consitent with future 'addRelationship' and 'removeRelationship' methods, along with our more general noun/verb conventions. There is certainly ambiguity as the singular/plural difference is subtle, but it's the best we could come up with. Closes OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com>
We have always documented that supporting relationship queries is optional for a manager (though highly recommended). Despite this the API methods were marked as being abstract. We only got away with this as since the move to Python 3, ABC enforcement wasn't working. This adds default implementations of `getWithRelationship` and `getWithRelationships` that simply returns an empty list for each element of the batch. Part of OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com> Signed-off-by: Tom Cowland <tom@foundry.com>
The old "two lists" formulation was hard to grok, and difficult to implement effectively. Splitting into two discrete methods better outlines the two potential batch axis. This new approach makes it clear the two well-known divergent use cases and allows for a simpler code path in each - without the need to interrogate the input arrays to work out which pattern is being used (one-to-many or many-to-one). Naming this was hard, after assorted rounds, this option emerged as a 'best of a bad bunch', as it is at least consistent with future 'addRelationship' and 'removeRelationship' methods, along with our more general noun/verb conventions. There is certainly ambiguity as the singular/plural difference is subtle, but it's the best we could come up with. These new methods also use the batch callback pattern established with the other batch API signatures. In addition, we have always documented that supporting relationship queries is optional for a manager (though highly recommended). Despite this the API methods were marked as being abstract. We only got away with this as since the move to Python 3, ABC enforcement wasn't working. There are now default implementations of `getWithRelationship` and `getWithRelationships` that simply return an empty list for each element of the batch. NB. This commit disables BAL integration tests due to the API break. Closes #847 Closes #919 Signed-off-by: Tom Cowland <tom@foundry.com>
Until a13 is released, we need to build our own OpenAssetIO from src due to API changes. See OpenAssetIO/OpenAssetIO#847 Signed-off-by: Tom Cowland <tom@foundry.com>
What
The current 'three methods in one' should be refactored in to individual methods.
Why
It has been noted that 'remembering all the rules for the lengths of the input arrays' is confusing and fragile.
The text was updated successfully, but these errors were encountered: