Commit 031c027
committed
LazyToolBox: stamp guid + tool-shed metadata on shed-install entries, refresh views
Two follow-on issues from the prior shed-install commit:
- ``test_run_workflow_optional_data_provided_runs_step``: workflow
invocation looked up the installed tool by full toolshed guid via
``has_tool(guid)``. ``_make_index_entry`` keys the entry on
``tool_source.parse_id()`` (the short id from the XML body, e.g.
``map_param_value``); the install path supplied the guid as
``fallback_tool_id`` but ``parse_id()`` won and the index ended up
keyed on the short id. ``has_tool(guid)`` then missed and
invocation 400'd with "required tools are not installed".
- ``test_only_latest_version_in_panel_fastp``: install put fastp in
``test_section_multi`` and ``custom_13`` panel view should expose
it. The view's ``_tool_panel_view_rendered`` snapshot was rendered
at boot — ``StaticToolPanelView.apply_view`` calls
``closest_section.copy(merge_tools=True)`` which freezes the
section's elems at render time, so a post-boot install was
invisible to ``tools?in_panel=True&view=...``.
Fix:
- After ``_build_index_entry_from_stored`` returns, override
``entry.id`` with the install guid and stamp
``is_local=False`` plus the tool_shed/repository_name/owner/
changeset_revision pulled from the install elem. ``add_entry``
then indexes both ``entries[guid]`` and ``entries_by_version[guid]``.
- Pass ``guid=stored.tool_id`` into ``create_tool_from_source`` when
the stored ``tool_id`` is a toolshed guid so the lazy-loaded
Tool's ``id`` matches.
- After a section install, invalidate
``_integrated_tool_panel._materialised_sections`` for the affected
section and re-run ``_load_tool_panel_views`` so static views
re-render with the new tool.1 parent 1c1ad02 commit 031c027
1 file changed
Lines changed: 66 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1230 | 1230 | | |
1231 | 1231 | | |
1232 | 1232 | | |
1233 | | - | |
| 1233 | + | |
1234 | 1234 | | |
1235 | | - | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
1236 | 1253 | | |
1237 | 1254 | | |
1238 | 1255 | | |
| |||
1249 | 1266 | | |
1250 | 1267 | | |
1251 | 1268 | | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
1252 | 1283 | | |
1253 | 1284 | | |
1254 | 1285 | | |
| |||
1316 | 1347 | | |
1317 | 1348 | | |
1318 | 1349 | | |
1319 | | - | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
1320 | 1374 | | |
1321 | 1375 | | |
1322 | 1376 | | |
| |||
1646 | 1700 | | |
1647 | 1701 | | |
1648 | 1702 | | |
1649 | | - | |
1650 | | - | |
1651 | | - | |
1652 | | - | |
1653 | | - | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
1654 | 1712 | | |
1655 | 1713 | | |
1656 | 1714 | | |
| |||
0 commit comments