metanorma / pubid-iec

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

Stages are not being typed #115

Closed opoudjis closed 11 months ago

opoudjis commented 1 year ago

Stages are type-specific. In my code:

       case doctype
       when "technical-report"
         abbr = "ADTR" if stage == "40" && substage == "99"
         abbr = "CDTR" if stage == "50" && substage == "20"
         abbr = "DTRM" if stage == "50" && substage == "92"
       when "technical-specification"
         abbr = "ADTS" if stage == "40" && substage == "99"
         abbr = "CDTS" if stage == "50" && substage == "20"
         abbr = "DTSM" if stage == "50" && substage == "92"
       when "interpretation-sheet"
         abbr = "RDISH" if stage == "50" && substage == "00"
         abbr = "CDISH" if stage == "50" && substage == "20"
       when "publicly-available-specification"
         abbr = "CDPAS" if stage == "50" && substage == "20"
       end

This is not reflected in pubid-iec. stages.yaml recognises that 50.00 maps to all of DECDISH, DECFDIS, RDISH, RFDIS, TDISH, TDTR, TDTS, but it makes no type-based (or other) differentiation between them:

Pubid::Iec::Identifier.create(number: "123", type: :tr, stage: "50.00").to_s =  "IEC TR DECDISH 123"

Pubid::Iec::Identifier.create(number: "123", type: :ts, stage: "50.00").to_s =  "IEC TS DECDISH 123"

Pubid::Iec::Identifier.create(number: "123", type: :is, stage: "50.00").to_s =  "IEC DECDISH 123" # international-standard

I'll add that Information Sheets (the ISH in DECDISH) are not listed in lib/pubid/iec/identifier/*rb as a distinct class of identifier at all.

ronaldtse commented 1 year ago

Thanks for raising this @opoudjis . This means that the IEC Identifier class needs to be split into types just like as it is done in ISO. @mico can you please help?

mico commented 1 year ago

@ronaldtse @opoudjis could you please provide me real examples of identifiers using these stages? Cannot find any.

mico commented 1 year ago

@ronaldtse What is "ISH" deliverable? I cannot find any "ISH" identifiers, also cannot see it in types list:

image

Only can find "ISH" stages for working documents:

38/687/DISH
38/692/RVDISH
opoudjis commented 1 year ago

ISH = Interpretation Sheet. In https://github.com/metanorma/pubid-iec/issues/52 , defined as a supplement to a document like amendments and corrigenda.

mico commented 1 year ago

ISH = Interpretation Sheet. In #52 , defined as a supplement to a document like amendments and corrigenda.

@opoudjis Could you help me find any examples?

opoudjis commented 12 months ago

I just googled IEC ISH, and first hit was:

https://www.iec.ch/publications/interpretation-sheets

IEC 60076-11:2018/ISH1:2020 IEC 60079-0:2017/ISH1:2019 IEC 60079-0:2017/ISH2:2019

So, again, ISH is acting just like Corrigenda.