Commit graph

15 commits

Author SHA1 Message Date
Candice Bentéjac
53de9090ca [tests] Replace desc.Node.internalFolder with {nodeCacheFolder} 2025-03-05 13:36:32 +00:00
Yann Lanthony
87fbcee06d [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.
2025-02-06 16:46:05 +01:00
Yann Lanthony
9794f43ed1 [core] Graph: improved uid conflicts evaluation on deserialization
At the end of the deserialization process, solve node uid conflicts iteratively by node depths,
and only replace the conflicting nodes with a CompatibilityNode.

Add new test suite for testing uid conflict handling.
2025-02-06 16:46:04 +01:00
Yann Lanthony
45ef4b592d [core] Graph: add replaceNode method
Factorize the logic of replacing a node with another one and re-creating
output edges into `Graph.replaceNode`  and `Graph._restoreOutEdges`.
2025-02-06 16:46:04 +01:00
Yann Lanthony
75db9dc16c [tests] Add extra compatibility tests
Add a new test suite for graph template loading.
2025-02-06 16:46:04 +01:00
Yann Lanthony
3218c41bdc [tests] Add strictCompatibility graph loading test 2024-11-14 19:11:08 +01:00
Candice Bentéjac
ec0721d381 [tests] Remove invalid= when the implicit argument is enough 2024-09-12 10:54:19 +02:00
Candice Bentéjac
41e885d9ff Linting: Clean-up files 2024-09-12 10:50:13 +02:00
Candice Bentéjac
d67062d39d [tests] Update unit tests with new UID system 2024-09-12 10:41:57 +02:00
Fabien Castan
4e3f718786 [tests] add explicit check on the list of attribute names 2024-06-15 17:15:58 +02:00
Aurore LAFAURIE
5101530b89 [tests] Add test for upgrade of nodes without computation 2024-05-27 22:03:42 +02:00
Grégoire De Lillo
236e3e19b0 [tests] compatibility : Add list of groups update test 2020-02-20 17:13:29 +01:00
Yann Lanthony
2a0b695ea7 [core] more thorough compatibility issues detection
* add 'matchDescription' method on desc.Attribute.
* desc.ListAttribute/desc.GroupAttribute: 'matchDescription' ensure that value perfectly match element/group description. Enable recursive checking for child attributes.
* nodeFactory: detect DescriptionConflicts in pre-process pass by checking that serialized node's attributes perfectly match their descriptions
* CompatibilityNode.attributeDescFromNameAttribute: consider link expressions as valid values
* test_compatibility: more complete description conflicts unit testing
2019-02-01 16:03:21 +01:00
Yann Lanthony
dd3d9cd54b [core][ui] add upgradeAllNodes methods
+ check if node is upgradable in UpgradeNodeCommand
2018-07-20 17:55:30 +02:00
Yann Lanthony
33eb7f3a7f [core] introduce CompatibilityNode for improved scene compatibilities
Improve node serialization/deserialization to be able to recreate the exact same node in the graph when loading a meshroom project, even if the corresponding node's description has changed or does not exist anymore. This allows to recover already computed data on disk, without being impacted by changed uids. CompatibilityNode also provides an on-demand upgrade system to turn into a Node that meets the current node description (if possible).
 
* new abstract class BaseNode, base class for Node and CompatibiliyNode 
* Node: serialize everything needed to spawn a CompatibilityNode with precomputed outputs: inputs, uids, parallelization settings, unresolved internal folders and outputs
* node_factory: handles node deserialization and compatibility issues to create either a Node or a CompatibilityNode
* add compatibility unit tests
2018-07-19 13:50:45 +02:00