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

Conveniences for entityTraits #1217

Closed
Tracked by #1167
foundrytom opened this issue Dec 1, 2023 · 0 comments · Fixed by #1272
Closed
Tracked by #1167

Conveniences for entityTraits #1217

foundrytom opened this issue Dec 1, 2023 · 0 comments · Fixed by #1272
Assignees
Labels
task Used to denote issues that are part of a larger topic, these tickets should not have milestones

Comments

@foundrytom
Copy link
Collaborator

foundrytom commented Dec 1, 2023

Acceptance Criteria

  • Variant return convenience for entityTraits added to Manager
  • Direct return exceptional return convenience for entityTraits added to Manager
  • Singular/Batch.
  • New methods bound to python
  • New methods tested via the established test pattern in python
  • Methods should be of signiature specified in linked notebook
@feltech feltech added this to the v1.0.0.beta.3 milestone Feb 19, 2024
@feltech feltech self-assigned this Feb 22, 2024
feltech added a commit to feltech/OpenAssetIO that referenced this issue Feb 23, 2024
Closes OpenAssetIO#1217. The batch-first callback-based API introduces a lot of
boilerplate for hosts that only need to query a single entity, or
prefer error cases to be realised as exceptions or alternate result
types. Other API methods already have convenience signatures wrapping
the core callback-based API, but many are still missing these,
`entityTraits` being one of them.

So add convenience signatures mirroring those that exist for other
member functions (e.g. `resolve`), largely duplicating the format of
the docstrings for `resolve`.

Signed-off-by: David Feltell <david.feltell@foundry.com>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Feb 23, 2024
Closes OpenAssetIO#1217. The batch-first callback-based API introduces a lot of
boilerplate for hosts that only need to query a single entity, or
prefer error cases to be realised as exceptions or alternate result
types. Other API methods already have convenience signatures wrapping
the core callback-based API, but many are still missing these,
`entityTraits` being one of them.

So add convenience signatures mirroring those that exist for other
member functions (e.g. `resolve`), largely duplicating the format of
the docstrings for `resolve`.

Signed-off-by: David Feltell <david.feltell@foundry.com>
feltech added a commit to feltech/OpenAssetIO-Manager-BAL that referenced this issue Feb 23, 2024
Discovered whilst updating OpenAssetIO/OpenAssetIO-MediaCreation#69
after OpenAssetIO/OpenAssetIO#1217. The API docs for `resolve` say

> Only traits that are applicable to each entity, and for which the
  manager has data, will be imbued in the result.

However, if an entity in the JSON library has a trait as part of its
trait set, but that trait has no properties (either because that trait
has no associated properties, or because it's not set in the JSON), then
it was imbued in the `TraitsData` regardless.

Signed-off-by: David Feltell <david.feltell@foundry.com>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Feb 27, 2024
Closes OpenAssetIO#1217. The batch-first callback-based API introduces a lot of
boilerplate for hosts that only need to query a single entity, or
prefer error cases to be realised as exceptions or alternate result
types. Other API methods already have convenience signatures wrapping
the core callback-based API, but many are still missing these,
`entityTraits` being one of them.

So add convenience signatures mirroring those that exist for other
member functions (e.g. `resolve`), largely duplicating the format of
the docstrings for `resolve`.

Signed-off-by: David Feltell <david.feltell@foundry.com>
feltech added a commit to feltech/OpenAssetIO that referenced this issue Feb 27, 2024
Closes OpenAssetIO#1217. The batch-first callback-based API introduces a lot of
boilerplate for hosts that only need to query a single entity, or
prefer error cases to be realised as exceptions or alternate result
types. Other API methods already have convenience signatures wrapping
the core callback-based API, but many are still missing these,
`entityTraits` being one of them.

So add convenience signatures mirroring those that exist for other
member functions (e.g. `resolve`), largely duplicating the format of
the docstrings for `resolve`.

Signed-off-by: David Feltell <david.feltell@foundry.com>
@elliotcmorris elliotcmorris added the task Used to denote issues that are part of a larger topic, these tickets should not have milestones label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Used to denote issues that are part of a larger topic, these tickets should not have milestones
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants