Maybe DesignSpaceDocumentReader can execute up to self.readSources()
Closed this issue · 4 comments
LettError commented
getSourcePaths needs to interpret a part of the designspace to find the sources. Now I also want to read some other data without proceeding all the way through building the instances. So, would it be acceptable to add
tree = ET.parse(self.path)
self.root = tree.getroot()
self.readVersion()
assert self.documentFormatVersion == 3
self.warpDict = None
self.readWarp()
self.readSources()
..to the init? It gives the DesignSpaceDocumentReader some more data to work with, it does not add that much work to the instantiation but it will reduce duplication.
behdad commented
I also needed the same (just loading, no building), so I ended up reimplementing the parts I needed in varLib.
miguelsousa commented
@LettError just realized that your proposed change was partially implemented in d3d205a
Do you want a PR to move the rest?
LettError commented
If you could do that, that would be great!
miguelsousa commented
done