property WeldxFile.software_history_entry#

History entries will use this software.


Let us define a custom software entry and use it during file creation.

>>> import weldx
>>> software = dict(name="MyFancyPackage", author="Me",
...        homepage="https://startpage.com", version="1.0")
>>> f = weldx.WeldxFile(software_history_entry=software)
>>> f.add_history_entry("we made some change")
>>> f.history 
 [{'description': 'we made some change',
   'time': datetime.datetime(...),
   'software': {'name': 'MyFancyPackage', 'author': 'Me',
   'homepage': 'https://startpage.com', 'version': '1.0'}}]

We can also change the software on the fly: >>> software_new = dict(name=”MyTool”, author=”MeSoft”, … homepage=”https://startpage.com”, version=”1.0”) >>> f.add_history_entry(“another change using mytool”, software_new)

Lets inspect the last history entry:

>>> f.history[-1] 
{'description': 'another change using mytool',
 'time': datetime.datetime(...),
 'software': {'name': 'MyTool', 'author': 'MeSoft',
 'homepage': 'https://startpage.com', 'version': '1.0'}}