metanorma / pubid-iec

PubID spec and implementation for IEC deliverables
BSD 2-Clause "Simplified" License
2 stars 0 forks source link

Add missing stage codes to stages.yml #130

Open mico opened 10 months ago

mico commented 10 months ago

In addition, the stage abbreviations listing in the config YAML, https://github.com/metanorma/pubid-iec/blob/main/stages.yaml , is insufficient: all of the following type-specific stage abbreviations need to be included, since we allow users to enter them in Metanorma. (The metanorma-iec test of that is ADTR.)

STAGE_CODES = {
        "PNW" => "1000", "ANW" => "2000", "CAN" => "2098", "ACD" => "2099",
        "CD" => "3020", "BWG" => "3092", "A2CD" => "3099", "2CD" => "3520",
        "3CD" => "3520", "4CD" => "3520", "5CD" => "3520", "6CD" => "3520",
        "7CD" => "3520", "8CD" => "3520", "9CD" => "3520", "CDM" => "3591",
        "A3CD" => "3592", "A4CD" => "3592", "A5CD" => "3592", "A6CD" => "3592",
        "A7CD" => "3592", "A8CD" => "3592", "A9CD" => "3592", "ACDV" => "3599",
        "CCDV" => "4020", "CDVM" => "4091", "NCDV" => "4092",
        "NADIS" => "4093", "ADIS" => "4099", "ADTR" => "4099",
        "ADTS" => "4099", "RDISH" => "5000", "RFDIS" => "5000",
        "CDISH" => "5020", "CDPAS" => "5020", "CDTR" => "5020",
        "CDTS" => "5020", "CFDIS" => "5020", "DTRM" => "5092",
        "DTSM" => "5092", "NDTR" => "5092", "NDTS" => "5092",
        "NFDIS" => "5092", "APUB" => "5099", "BPUB" => "6000",
        "PPUB" => "6060", "RR" => "9092", "AMW" => "9220", "WPUB" => "9599",
        "DELPUB" => "9960", "PWI" => "0000", "NWIP" => "1000", "WD" => "2000",
        "CDV" => "4000", "FDIS" => "5000"
      }.freeze

For their definitions, see https://www.iec.ch/standards-development/stage-codes

It turns out you have these stages in lib/pubid/iec/renderer/urn.rb , but they need to be in config so I can query them. And for that matter, that list is more full.

from: https://github.com/metanorma/pubid-iec/issues/127

opoudjis commented 6 months ago

Pretty sure this can close now.