metanorma / stepmod-utils

Tools for working on the STEPmod repository.
1 stars 0 forks source link

(URGENT) ARM/MIM Longform EXPRESS Change YAML generation missing lots of data #235

Closed ronaldtse closed 9 months ago

ronaldtse commented 9 months ago

The following files (in iso-10303-smrl) contain longform changes:

Out of over 10k lines of changes:

The Change YAML only has less than 20.

https://github.com/metanorma/iso-10303-srl/blob/main/schemas/modules/ap209_multidisciplinary_analysis_and_design/arm_lf.changes.yaml

---
schema: ap209_multidisciplinary_analysis_and_design
change_edition:
- version: '2'
  description: |-
    * Add SELECT value 'ENTITY Envelope'
    * Add SELECT value 'ENTITY Evidence'
    * Add SELECT value 'ENTITY Interface_connection'
    * Add SELECT value 'ENTITY Interface_connector_occurrence'
    * Add SELECT value 'ENTITY Interface_definition_connection'
    * Add SELECT value 'ENTITY Message'
    * Add SELECT value 'ENTITY Product_group'
    * Add SELECT value 'ENTITY Product_group_membership'
    * Add SELECT value 'ENTITY State'
    * Add SELECT value 'ENTITY State_assertion'
    * Add SELECT value 'ENTITY State_assessment'
    * Add SELECT value 'ENTITY State_relationship'
    * Add SELECT value 'ENTITY Validation'
    * Add SELECT value 'ENTITY Verification'

This task is to fix this.

To verify the content please check the following files (in iso-10303-stepmod-wg12) that describe longform changes:

data/modules/ap209_multidisciplinary_analysis_and_design/sys/g_change.htm:      <h2><a name="arm_longform.changes2">F.2.4 Changes made to the ARM Longform</a></h2>
data/modules/ap210_electronic_assembly_interconnect_and_packaging_design/sys/g_change.htm:      <h2><a name="arm_longform.changes4">F.4.4 Changes made to the ARM Longform</a></h2>
data/modules/ap210_electronic_assembly_interconnect_and_packaging_design/sys/g_change.htm:      <h2><a name="arm_longform.changes5">F.5.4 Changes made to the ARM Longform</a></h2>
data/modules/ap210_electronic_assembly_interconnect_and_packaging_design/sys/g_change.htm:      <h2><a name="arm_longform.changes6">F.6.3 Changes made to the ARM Longform</a></h2>
data/modules/ap242_managed_model_based_3d_engineering/sys/g_change.htm:      <h2><a name="arm_longform.changes2">F.2.5 Changes made to the ARM Longform</a></h2>
data/modules/ap242_managed_model_based_3d_engineering/sys/g_change.htm:      <h2><a name="arm_longform.changes3">F.3.4 Changes made to the ARM Longform</a></h2>
data/modules/ap242_managed_model_based_3d_engineering/sys/g_change.htm:      <h2><a name="arm_longform.changes4">F.4.4 Changes made to the ARM Longform</a></h2>
data/modules/elemental_topology/sys/g_change.htm:      <h2><a name="arm_longform.changes6">F.6.2 Changes made to the ARM Longform</a></h2>

data/modules/ap209_multidisciplinary_analysis_and_design/sys/g_change.htm:      <h2><a name="mim_longform.changes2">F.2.5 Changes made to the MIM Longform</a></h2>
data/modules/ap210_electronic_assembly_interconnect_and_packaging_design/sys/g_change.htm:      <h2><a name="mim_longform.changes4">F.4.5 Changes made to the MIM Longform</a></h2>
data/modules/ap210_electronic_assembly_interconnect_and_packaging_design/sys/g_change.htm:      <h2><a name="mim_longform.changes5">F.5.5 Changes made to the MIM Longform</a></h2>
data/modules/ap210_electronic_assembly_interconnect_and_packaging_design/sys/g_change.htm:      <h2><a name="mim_longform.changes6">F.6.4 Changes made to the MIM Longform</a></h2>
data/modules/ap242_managed_model_based_3d_engineering/sys/g_change.htm:      <h2><a name="mim_longform.changes2">F.2.6 Changes made to the MIM Longform</a></h2>
data/modules/ap242_managed_model_based_3d_engineering/sys/g_change.htm:      <h2><a name="mim_longform.changes3">F.3.5 Changes made to the MIM Longform</a></h2>
data/modules/ap242_managed_model_based_3d_engineering/sys/g_change.htm:      <h2><a name="mim_longform.changes4">F.4.5 Changes made to the MIM Longform</a></h2>

Originally posted by @ronaldtse in https://github.com/metanorma/stepmod-utils/issues/210#issuecomment-1878393080

HassanAkbar commented 9 months ago

@ronaldtse Currently the longform_changes file is generated as discussed in this ticket -> #146.

The issue is that arm.additions are outside the arm.changes tag that is in ap209_multidisciplinary_analysis_and_design/module.xml.

Should we update the structure of the XML file or do we need to update our code to handle this structure ? If we need to update our code then can you let me know which structure should be followed here ?

TRThurman commented 9 months ago

@HassanAkbar, There is nothing wrong with the module.xml file. there is an that is the parent element. The code needs to be updated to accommodate the encapsulation structure in module.xml/changes element.

TRThurman commented 9 months ago

@ronaldtse Currently the longform_changes file is generated as discussed in this ticket -> #146.

The issue is that arm.additions are outside the arm.changes tag that is in ap209_multidisciplinary_analysis_and_design/module.xml.

Should we update the structure of the XML file or do we need to update our code to handle this structure ? If we need to update our code then can you let me know which structure should be followed here ?

@HassanAkbar I am somewhat surprised at this issue. I assumed you were using an xml founded parser that knew xpath. The question should never have occurred, but I am operating on incomplete knowledge of course.

ronaldtse commented 9 months ago

The issue is that arm.additions are outside the arm.changes tag that is in ap209_multidisciplinary_analysis_and_design/module.xml.

(Also, as @TRThurman mentioned, the XML file is correct and we never change it)

Correct. The <arm.additions> (and <mim.additions>) tag is under <arm_longform.changes> (and <mim_longform.changes> which is not expected by #146.

Could you help extend our code to generate:

The structure of the <*.changes> should be identical across types (arm, mim, arm_longform and mim_longform).

Thanks.

ronaldtse commented 9 months ago

I assumed you were using an xml founded parser that knew xpath.

In the original specification of #146, I did not consider the possibility that something like <arm_longform.changes> existed but just <arm.changes>. Another reason why it is finally a relief for everyone to migrate the structure away for the SRL.

TRThurman commented 9 months ago

I am sorry but there is no excuse to ignore the dtd.

The dtd for an xml file is listed in the header of that xml file! Read it.

I almost fired off a bug report that would make us look silly but decided to see if the file was valid and it was.

I don’t look forward to interpreting error messages from the metanoma build environment.

ronaldtse commented 8 months ago

@TRThurman can you point out which particular DTD are you referring to that mentions arm_longform.changes?

TRThurman commented 8 months ago

module.dtd

On Jan 30, 2024, at 6:08 AM, Ronald Tse @.***> wrote:

@TRThurman https://github.com/TRThurman can you point out which particular DTD are you referring to that mentions arm_longform.changes?

— Reply to this email directly, view it on GitHub https://github.com/metanorma/stepmod-utils/issues/235#issuecomment-1916702657, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMMKVCWMR3TPKMRNEKO66DYRDPCHAVCNFSM6AAAAABBOFPX4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJWG4YDENRVG4. You are receiving this because you were mentioned.