[core] Graph: initial refactoring of graph loading API and logic

* API
Instead of having a single `load` function that exposes in its API
some elements only applicable to initializing a graph from a templates,
split it into 2 distinct functions: `load` and `initFromTemplate`.
Apply those changes to users of the API (UI, CLI), and simplify Graph
wrapper classes to better align with those concepts.

* Deserialization
Reduce the cognitive complexity of the deserizalization process
by splitting it into more atomic functions, while maintaining the
current behavior.
This commit is contained in:
Yann Lanthony 2025-02-06 16:46:04 +01:00
parent c883c53397
commit 7eab289d30
8 changed files with 153 additions and 127 deletions

8
meshroom/core/typing.py Normal file
View file

@ -0,0 +1,8 @@
"""
Common typing aliases used in Meshroom.
"""
from pathlib import Path
from typing import Union
PathLike = Union[Path, str]