BuildingSync / schema

BuildingSync® Schema
https://buildingsync.net
Other
23 stars 22 forks source link

Make migrations scripts #483

Closed haneslinger closed 10 months ago

haneslinger commented 10 months ago

Cute little script to modified BuildingSync files from 2.4 to 2.5

haneslinger commented 10 months ago

This looks good, thank you! On top of the comments that I made throughout the files, can you also include one file for testing? If we do not have an example XML with the right fields, maybe you can amend a minimalist XML like this L000 pre-simulation XML.

There are mutliple v2.4 files in the repo currently, for example, docs/notebooks/bsync_examples/example-smalloffice-level2.xml (UsefulLife on L1408). Are you looking for something more specific?

JieXiong9119 commented 10 months ago

This one looks good, but I want to point out that we had something built for version converting by using xsl in here. I'm not sure if xsl is something more generic for xml conversion and might be useful for future development.

haneslinger commented 10 months ago

oh, this would have been great to know about. I haven't worked with xsl, let me dig into it.

haneslinger commented 10 months ago

wait, these scripts are for v2 to v3 and it's on develop-v3. Can you give me some context: what happened to v3?

JieXiong9119 commented 10 months ago

wait, these scripts are for v2 to v3, what happened to v3?

v3 is a frozen version that was determined not to be released in the near future. I don't think you want to dig into xslt - I suggest we go with pure Python but refer to that v3 xslt tool for the extensibility of this script (e.g. adding a comment note like the one in v3 converter such as "This BuildingSync v2.5 document was generated from a BuildingSync v2.4 document via ....").

haneslinger commented 10 months ago

I want to be clear: You want a comment in the generated/updated xml file stating it was modified by the script?

JieXiong9119 commented 10 months ago

I want to be clear: You want a comment in the generated/updated xml file stating it was modified by the script?

Yes. Something like this line in the xslt tool for v2-to-v3, which adds a comment on top of the generated xml.