SG-43421 Add Flow AM publish hooks to hooks/flowam/#217
Conversation
Move Flow AM publish hooks from tk-config-flowam POC into upstream tk-multi-publish2 as a lift-and-shift with no logic changes. Added hooks/flowam/: - collector_dcc.py: DCC-specific collector extending base collector - pre_publish.py: pre-publish validation for Flow AM draft state - publish_alembic_derivative.py: publish alembic derivative workflow - publish_to_flow.py: base publish to Flow AM hook - publish_to_flow_dcc.py: DCC-specific publish to Flow AM hook - icons/alembic.png, icons/flow.png: icons referenced by publish hooks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #217 +/- ##
==========================================
+ Coverage 40.18% 40.81% +0.62%
==========================================
Files 61 63 +2
Lines 5027 5109 +82
==========================================
+ Hits 2020 2085 +65
- Misses 3007 3024 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
carlos-villavicencio-adsk
left a comment
There was a problem hiding this comment.
Looks good for a first phase. I'm not sure if this is considered to change and merge it into the existing hook workflow once the dependencies (framework, etc) are migrated.
My understanding was that the initial plan was to first get the hook in place, and then, after the framework dependency migration, design it so the hooks are picked up automatically when sg_flow_am_id and the draft ID (for publisher) are available in the context. |
- Remove collector_dcc.py - only called super() with no additional logic; Toolkit hook chain handles passthrough automatically - Remove alembic.png icon - licensing concern; icon() now returns the alembic icon under hooks/icons/alembic.png - Remove unused `settings` param from _publish_to_flow() across in publish_to_flow.py and its children - Add return type annotations to new (non-overridden) methods: _get_flow_module() -> ModuleType, _get_draft_id() -> str | None - Update class docstrings to accurately describe responsibilities and expected hook chain configuration for each hook - Add finalize() docstring explaining why the no-op override is needed
20fd6c2 to
d85e923
Compare
Summary
Moves Flow AM publish hooks from
tk-config-flowamPOC into upstreamtk-multi-publish2as a lift-and-shift with no logic changes (Phase 1 of SG-43421). Currently the following hooks will only triggered with custom config. The trigger mechanism will be updated in phase2.hooks/flowam/collector_dcc.py- DCC-specific collectorhooks/flowam/pre_publish.py- pre-publish Flow AM draft validationhooks/flowam/publish_alembic_derivative.py- Alembic derivative publish workflowhooks/flowam/publish_to_flow.py- base publish to Flow AM hookhooks/flowam/publish_to_flow_dcc.py- DCC-specific publish to Flow AM hookConfig requirements
More information on tk-config-flowam PR 242
env/includes/maya/apps.yml(same for houdini, nuke)env/includes/desktop/project.ymlTest plan
hooks/flowam/never invoked