Closed mico closed 6 months ago
@ronaldtse now it's accepting all project stages from list in #131, but still need to work on stages like:
You are raising Pubid::Iec::Errors::StageInvalidError . I am inheriting code from metanorma-iso, and I would much rather you raise one of the errors catered for there,
[Pubid::Core::Errors::HarmonizedStageCodeInvalidError, Pubid::Core::Errors::TypeStageParseError, Pubid::Core::Errors::StageInvalidError]
But I will add that error.
Still not working:
params = {:number=>"1000", :part=>"1-1", :type=>:ts, :publisher=>"IEC", :copublisher=>["IETF", "ISO"], :year=>"2001", :stage=>"ADTR"}
Pubid::Iec::Identifier.create(**params)
When this looks up the ADTR stage,
@stage = self.class.has_project_stage?(stage) ? self.class.resolve_project_stage(stage) : resolve_stage(stage)
self.class.has_project_stage?(stage) is false, and resolve_stage(stage) raises the error ADTR is not valid stage.
ADTR is a valid stage, and is mapped as such in code.
May be because stages are restricted by type, trying again...
But if the issue is that ADTR is not defined for TS, then the error message should be that ADTR is defined in IEC, but not for document type TS.
params = {:number=>"1000", :language=>"en", :type=>:is, :publisher=>"IEC", :year=>2023, :stage=>"60.00" }
Pubid::Iec::Identifier.create(**params).urn
Returns "urn:iec:std:iec:1000:2023:stage-:en". Unacceptable: the stage must be returned as "urn:iec:std:iec:1000:2023:stage-60.00:en"
stages.yaml names must include all high-level stage names: CDV MUST be included, as "Committee draft for vote". (Properly, CDV is "committee draft for vote", and CD is "committee draft"; those expansions should appear.)
so
params = {:number=>"1000", :language=>"en", :type=>:is, :publisher=>"IEC", :year=>2023, :stage=>"40.20" }
Pubid::Iec::Identifier.create(**params).typed_stage_name
I expect to see "Committee Draft for Vote International Standard". Currently I am only getting the fallback "International Standard".
Stage 50 is not represented among either abbreviations or names; @ronaldtse @mico can I confirm that that is intentional, and that stage 50 identifiers are indistinguishable in IEC from stage 60 identifiers?
After the requested updates, I can incorporate pubid-iec into metanorma-iec
Stage 50 is not represented among either abbreviations or names; @ronaldtse @mico can I confirm that that is intentional, and that stage 50 identifiers are indistinguishable in IEC from stage 60 identifiers?
@opoudjis I didn't find untyped stages for 50.xx, but we have typed stages with 50.xx stage: FDAM, FDCOR, FDGuide, etc.
related #127