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

Switch MC to using openassetio-traitgen #10

Closed
Tracked by #13
foundrytom opened this issue Nov 1, 2022 · 0 comments · Fixed by #15
Closed
Tracked by #13

Switch MC to using openassetio-traitgen #10

foundrytom opened this issue Nov 1, 2022 · 0 comments · Fixed by #15
Assignees

Comments

@foundrytom
Copy link
Contributor

foundrytom commented Nov 1, 2022

What

Once openassetio-traitgen is available in PyPI, convert the traits in the repo to .yml definitions, and build with openassetio-traitgen as part of setup.py.

Why

Manual authoring of Trait/Specification code is deprecated as it is prohibitively slow.

Notes

Requires OpenAssetIO/OpenAssetIO-TraitGen#2

We currently have the strategy that we "trust" traitgen code through its own testing, so there isn't need to write extensive tests for autogenerated classes.

It's to be expected that the resulting Python namespace will change.

Be good to hard code the yaml hints to the JSON schema in github for traitgen.

  • Timeline, Track and Clip traits -> a timeline namespace
  • LoatableContent -> a content namespace(?)

ACs

  • Uses PyPI OpenAssetIO-TraitGen
  • python -m pip install . installs an importable openassetio_mediacreation module in Python 3.7+
  • Test coverage of the resulting module similar to OpenAssetIO test_imports.
  • MC traits/specifications defined in yaml.
  • No yaml-generated python code in the repo.
  • User and developer documentation etc. updated
  • TraitGen pinned to minor semver (ie, pick up patches).
  • The source YAML file is included in the installed module at the root.
@foundrytom foundrytom changed the title Switch to using openassetio-traitgen Switch MC to using openassetio-traitgen Nov 1, 2022
elliotcmorris referenced this issue in elliotcmorris/OpenAssetIO-MediaCreation Nov 25, 2022
Rather than have manually maintained traits, integrate traitgen to
generate the traits automatically in the build.

Issue #10

Signed-off-by: Elliot Morris <elliot.morris@foundry.com>
elliotcmorris referenced this issue in elliotcmorris/OpenAssetIO-MediaCreation Nov 25, 2022
Add import tests to mediacreation, to check that the generated traits
function.

Issue #10

Signed-off-by: Elliot Morris <elliot.morris@foundry.com>
elliotcmorris referenced this issue in elliotcmorris/OpenAssetIO-MediaCreation Nov 25, 2022
Run pytest on PRs, so we can have some CI going.

Issue #10

Signed-off-by: Elliot Morris <elliot.morris@foundry.com>
elliotcmorris referenced this issue in elliotcmorris/OpenAssetIO-MediaCreation Nov 25, 2022
Remove the tests that were testing the manually rolled traits.
Now that the traits are autogenerated, we rely on the tests in
openassetio-traitgen

Issue #10

Signed-off-by: Elliot Morris <elliot.morris@foundry.com>
elliotcmorris referenced this issue in elliotcmorris/OpenAssetIO-MediaCreation Dec 1, 2022
Rather than have manually maintained traits, integrate traitgen to
generate the traits automatically in the build.

Issue #10

Signed-off-by: Elliot Morris <elliot.morris@foundry.com>
elliotcmorris referenced this issue in elliotcmorris/OpenAssetIO-MediaCreation Dec 1, 2022
Add import tests to mediacreation, to check that the generated traits
function.

Issue #10

Signed-off-by: Elliot Morris <elliot.morris@foundry.com>
elliotcmorris referenced this issue in elliotcmorris/OpenAssetIO-MediaCreation Dec 1, 2022
Run pytest on PRs, so we can have some CI going.

Issue #10

Signed-off-by: Elliot Morris <elliot.morris@foundry.com>
elliotcmorris referenced this issue in elliotcmorris/OpenAssetIO-MediaCreation Dec 1, 2022
Remove the tests that were testing the manually rolled traits.
Now that the traits are autogenerated, we rely on the tests in
openassetio-traitgen

Issue #10

Signed-off-by: Elliot Morris <elliot.morris@foundry.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants