mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-14 07:17:24 +02:00
[core][graphIO] Improve node type version handling
* Deserialization: Replace the logic that defaulted the node type version to "0.0" when unspecified, and assume that unspecified version on a node is targetting current node type version. * Serialization: Only serialize node type versions for which a version info is available. * Test suites: * Add helper context manager to manually override the version of a given node type. * Add new unit tests to cover version conflicts handling is various scenarios.
This commit is contained in:
parent
d9e59e330a
commit
87fbcee06d
7 changed files with 98 additions and 9 deletions
|
@ -95,7 +95,10 @@ class _NodeCreator:
|
|||
nodeCreatedFromCurrentVersion = self.version is None
|
||||
if nodeCreatedFromCurrentVersion:
|
||||
return True
|
||||
nodeTypeCurrentVersion = meshroom.core.nodeVersion(self.nodeDesc, "0.0")
|
||||
nodeTypeCurrentVersion = meshroom.core.nodeVersion(self.nodeDesc)
|
||||
# If the node type has not current version information, assume compatibility.
|
||||
if nodeTypeCurrentVersion is None:
|
||||
return True
|
||||
return Version(self.version).major == Version(nodeTypeCurrentVersion).major
|
||||
|
||||
def _checkDescriptionCompatibility(self) -> bool:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue