You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to be able to merge multiple structures into a single metadata tree. An example use case can be merging custom configuration with default settings. As a quick hack we can do something like this:
tree = fmf.Tree("default")
tree.grow("custom")
For such cases it would be probably better to have possibility to initialize empty tree and then grow it multiple times:
tree = fmf.Tree()
tree.grow("default")
tree.grow("custom")
We could also add support for multiple trees directly in the constructor (which seems like a little bit more clean solution):
tree = fmf.Tree(['default', 'custom'])
However there are a few things which need to be solved: There are attributes which kind of expect a single tree only: root, version, original_data. Also, repeated call of grow() results in inherit() being applied multiple times which might cause problems.
The text was updated successfully, but these errors were encountered:
My use case is basically single tree consisting of 2 parts:
1st part:
/tests/component/* [insert lots of .fmf files over different levels in here with no public data]
2nd part:
/tests/component.fmf (private data required by some of the tests, replacing some default values)
/tests/component/* [insert tests that cannot be made public]
At the moment all this data in in single repo, but we are moving to separate them into 2 repos, lets call them 'upstream' and 'downstream', where downstream repo has only private data. The goal is to have no duplication between the repo and have as much as possible in the 'upstream'.
If solution to this issue can solve this with FMF instead of just copying the files over from 'downstream' to 'upstream' locally, that would be preferable as it is much cleaner solution.
Note:
I suppose the attributes root, version and original_data would be identical for both of the trees, so merging them should happen seamlessly to single tree. If this is not true, the merge should probably happen to different tree.
It would be useful to be able to merge multiple structures into a single metadata tree. An example use case can be merging custom configuration with default settings. As a quick hack we can do something like this:
For such cases it would be probably better to have possibility to initialize empty tree and then grow it multiple times:
We could also add support for multiple trees directly in the constructor (which seems like a little bit more clean solution):
However there are a few things which need to be solved: There are attributes which kind of expect a single tree only:
root
,version
,original_data
. Also, repeated call ofgrow()
results ininherit()
being applied multiple times which might cause problems.The text was updated successfully, but these errors were encountered: