Skip to content

Commit

Permalink
fixup! [Docs] Add hybrid plugin system notebook
Browse files Browse the repository at this point in the history
Update CI to execute notebok

Signed-off-by: David Feltell <[email protected]>
  • Loading branch information
feltech committed Aug 30, 2024
1 parent 5c47252 commit b2c830e
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 23 deletions.
5 changes: 3 additions & 2 deletions .github/build_openassetio/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2023 The Foundry Visionmongers Ltd
# Copyright 2023-2024 The Foundry Visionmongers Ltd

# Composite action for reuse within other workflows.
# Builds OpenAssetIO.
Expand All @@ -15,13 +15,14 @@ runs:
with:
repository: OpenAssetIO/OpenAssetIO
path: openassetio-checkout
ref: v1.0.0-rc.1.0

- name: Build OpenAssetIO
shell: bash
run: |
cd openassetio-checkout
mkdir build
cmake -G Ninja -S . -B build
cmake -G Ninja -S . -B build -DOPENASSETIO_ENABLE_SIMPLECPPMANAGER=ON
cmake --build build
cmake --install build
- uses: actions/upload-artifact@v3
Expand Down
40 changes: 39 additions & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
matrix:
os: ["windows-2022", "ubuntu-22.04", "macos-13"]
python: ["3.10", "3.11"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -28,4 +31,39 @@ jobs:
python -m pip install .
python -m pip install -r examples/resources/requirements.txt
- name: Test Notebooks
run: jupyter nbconvert --to html --execute examples/*.ipynb
# Execute all the notebooks apart from the Hybrid Plugin System,
# which requires a build of SimpleCppManager
run: >
find examples -maxdepth 1 -name "*.ipynb"
! -name "hybrid_plugin_system.ipynb"
-exec jupyter nbconvert --to html --execute {} \;
test-cpp-notebooks:
# A special job just for the Hybrid Plugin System because it needs a
# build of SimpleCppManager. Use the OpenAssetIO Docker container to
# get a build. More notebooks may be added here in the future, if
# they need a C++ build (as opposed to Python `pip install`) of
# OpenAssetIO.
name: Test Hybrid Plugin System notebook
runs-on: ubuntu-latest
container:
image: ghcr.io/openassetio/openassetio-build
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
python -m pip install .
python -m pip install -r examples/resources/requirements.txt
- name: Build SimpleCppManager
uses: ./.github/build_openassetio

- name: Copy SimpleCppManager to expected location for notebook
run: >
cp openassetio-checkout/build/dist/SimpleCppManager.so
examples/resources/hybrid_plugin_system/SimpleCppManager/
- name: Test notebook
run: jupyter nbconvert --to html --execute examples/hybrid_plugin_system.ipynb


43 changes: 25 additions & 18 deletions examples/hybrid_plugin_system.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2024-07-29T08:53:11.933821Z",
"start_time": "2024-07-29T08:53:11.870536Z"
"end_time": "2024-08-29T16:33:45.949575Z",
"start_time": "2024-08-29T16:33:45.918489Z"
}
},
"cell_type": "code",
Expand Down Expand Up @@ -102,8 +102,8 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2024-07-29T08:53:11.937984Z",
"start_time": "2024-07-29T08:53:11.935275Z"
"end_time": "2024-08-29T16:33:45.964636Z",
"start_time": "2024-08-29T16:33:45.962034Z"
}
},
"cell_type": "code",
Expand All @@ -128,8 +128,8 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2024-07-29T08:53:11.946555Z",
"start_time": "2024-07-29T08:53:11.939169Z"
"end_time": "2024-08-29T16:33:46.064153Z",
"start_time": "2024-08-29T16:33:46.061796Z"
}
},
"cell_type": "code",
Expand All @@ -154,8 +154,8 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2024-07-29T08:53:11.983827Z",
"start_time": "2024-07-29T08:53:11.947864Z"
"end_time": "2024-08-29T16:33:46.125305Z",
"start_time": "2024-08-29T16:33:46.108742Z"
}
},
"cell_type": "code",
Expand Down Expand Up @@ -198,6 +198,13 @@
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001B[0;33m warning: PythonPluginSystem: Use of top-level 'plugin' variable is deprecated, use `openassetioPlugin` instead. /home/dave/workspace/cloud/assetapi/OpenAssetIO-MediaCreation/.venv-conda-vfx24/lib/python3.11/site-packages/openassetio_manager_bal/__init__.py\u001B[0m\n"
]
},
{
"data": {
"text/markdown": "> **Result:**\n> `Python plugin error: Manager implementation for 'org.openassetio.examples.manager.hybrid' does not support the required capabilities: entityReferenceIdentification`"
Expand Down Expand Up @@ -227,8 +234,8 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2024-07-29T08:53:11.989384Z",
"start_time": "2024-07-29T08:53:11.985075Z"
"end_time": "2024-08-29T16:33:46.311240Z",
"start_time": "2024-08-29T16:33:46.307840Z"
}
},
"cell_type": "code",
Expand Down Expand Up @@ -258,8 +265,8 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2024-07-29T08:53:11.995639Z",
"start_time": "2024-07-29T08:53:11.990896Z"
"end_time": "2024-08-29T16:33:46.369557Z",
"start_time": "2024-08-29T16:33:46.366356Z"
}
},
"cell_type": "code",
Expand Down Expand Up @@ -300,8 +307,8 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2024-07-29T08:53:12.000903Z",
"start_time": "2024-07-29T08:53:11.997023Z"
"end_time": "2024-08-29T16:33:46.420316Z",
"start_time": "2024-08-29T16:33:46.417229Z"
}
},
"cell_type": "code",
Expand All @@ -317,7 +324,7 @@
"outputs": [
{
"data": {
"text/markdown": "> **Result:**\n> `{'openassetio-mediacreation:usage.Entity', 'openassetio-mediacreation:identity.DisplayName', 'openassetio-mediacreation:twoDimensional.Image'}`"
"text/markdown": "> **Result:**\n> `{'openassetio-mediacreation:usage.Entity', 'openassetio-mediacreation:twoDimensional.Image', 'openassetio-mediacreation:identity.DisplayName'}`"
},
"metadata": {},
"output_type": "display_data"
Expand All @@ -334,8 +341,8 @@
{
"metadata": {
"ExecuteTime": {
"end_time": "2024-07-29T08:53:12.017865Z",
"start_time": "2024-07-29T08:53:12.001978Z"
"end_time": "2024-08-29T16:33:46.482571Z",
"start_time": "2024-08-29T16:33:46.468873Z"
}
},
"cell_type": "code",
Expand All @@ -357,7 +364,7 @@
"outputs": [
{
"data": {
"text/markdown": "> **Result:**\n> `{'openassetio-mediacreation:twoDimensional.Image', 'openassetio-mediacreation:lifecycle.Version', 'openassetio-mediacreation:identity.DisplayName', 'openassetio-mediacreation:timeDomain.FrameRanged', 'openassetio-mediacreation:usage.Entity', 'openassetio-mediacreation:content.LocatableContent'}`"
"text/markdown": "> **Result:**\n> `{'openassetio-mediacreation:content.LocatableContent', 'openassetio-mediacreation:identity.DisplayName', 'openassetio-mediacreation:twoDimensional.Image', 'openassetio-mediacreation:lifecycle.Version', 'openassetio-mediacreation:usage.Entity', 'openassetio-mediacreation:timeDomain.FrameRanged'}`"
},
"metadata": {},
"output_type": "display_data"
Expand Down
4 changes: 2 additions & 2 deletions examples/resources/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
jupyter
openassetio>=v1.0.0b2rev0
openassetio-manager-bal>=v1.0.0a14
openassetio>=v1.0.0rc1.rev0
openassetio-manager-bal>=v1.0.0b1.rev0
openassetio-mediacreation
Pillow

0 comments on commit b2c830e

Please sign in to comment.