brightway-lca / brightway2-io

Importing and exporting for the Brightway LCA framework
BSD 3-Clause "New" or "Revised" License
26 stars 40 forks source link

Missing ecospold2 attributes: includedActivitiesStart includedActivitiesEnd #196

Closed ccomb closed 9 months ago

ccomb commented 1 year ago

During import of Ecoinvent on spold2 format, we're missing two attributes that should end up in the comments :

      <activity specialActivityType="0" id="17c3ea39-c90d-52f8-b222-36b2d0d19cb2" activityNameId="ffadd8a1-f004-464b-adc9-4830de080166" parentActivityId="c64a4c3c-ee75-4b16-a06a-baada6d79800" inheritanceDepth="-1" type="1">
        <activityName xml:lang="en">textile production, cotton, air jet loom weaving</activityName>
        <includedActivitiesStart xml:lang="en">The activity starts with warping and sizing of cotton yarn.</includedActivitiesStart>
        <includedActivitiesEnd xml:lang="en">This process ends with conversion of cotton yarn at weaving plant to 1 kg of woven fabric.</includedActivitiesEnd>

The code does:

>>> stem.activityDescription.activity.includedActivitiesStart.get("text")
>>> 

we can read it with:

>>> stem.activityDescription.activity.includedActivitiesStart
"This activity starts at the gate of the activities that produce 'celery',  within the geography of Global."
cmutel commented 11 months ago

@ccomb Can you submit your fixes as a PR? Thanks!