pubid 2.0.0.pre.alpha.58 → 2.0.0.pre.alpha.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/iec/stage-codes.md +1 -9
- data/data/parg/ieee.json +1767 -1683
- data/lib/pubid/iec/CLAUDE.md +1 -1
- data/lib/pubid/ieee/builder.rb +18 -5
- data/lib/pubid/ieee/renderer.rb +9 -4
- data/lib/pubid/version.rb +1 -1
- metadata +2 -2
data/lib/pubid/iec/CLAUDE.md
CHANGED
|
@@ -30,4 +30,4 @@ These notes were part of the root `CLAUDE.md`. Read them before you change `lib/
|
|
|
30
30
|
|
|
31
31
|
**Two parent-slot gaps recorded by the cross-flavor `base` survey** (`lib/pubid/bsi/CLAUDE.md` has the measured version). `Identifiers::TestReportForm#cispr_identifier` is a polymorphic `Identifier` parent slot with no `#root` override, so `root` returns the form itself. And `Identifiers::ConsolidatedIdentifier#base_document` returns `identifiers&.first` **without** the recursive `&.base_document` that its BSI, CSA and CEN counterparts use — a one-level peel where the others peel fully, so a consolidated edition of a supplement does not reduce to the bare standard. Neither is chased here; both are pinned by nothing, which is why they are written down.
|
|
32
32
|
|
|
33
|
-
**Stage codes — the SSOT and what is settled.** The authoritative source for IEC stage abbreviations is committed in this repo: **`data/iec/stage-codes.md`** — the 52-row IEC/ISO stage-code correspondence table transcribed from IEC's official *IEC/ISO Harmonized APIs* documents (v0.0.8 2023-06, api-portal.iec.ch; v0.0.7 2021-05, iec-apiportal.apigee.io — the successors that replace the IEC Data Feeds), the legacy Data-Feeds field examples, and the IS-lifecycle ladder from `StageCodes_IS_v2.pdf` (2023-06). `www.iec.ch` itself is fully WAF-gated to non-browsers and the Wayback Machine holds no snapshots of its PDFs, so the extract — not the unreachable original — is the reference. **`Pubid::Iec.locate_stage` reads `TYPED_STAGES` only** (`lib/pubid/iec.rb`); `PROJECT_STAGES` (AFDIS, TCDV, PRVC…) are not queryable through it. Every one of metanorma-iec's 55 `STAGE_CODES` — the list quoted in pubid#237 — resolves, locked by `spec/pubid/iec/typed_stages_spec.rb` in the issue's own order; aliases are always **appended, never prepended**, so `abbr.first` (what renders) is unchanged. Notable rulings from that pass: **ADIS** is the legacy Data-Feeds spelling of AFDIS ("Approved for FDIS circulation", ISO_LEVEL 40.99) and is an alias on `cdv` (the typed stage claiming 40.99); **CDISH/CDPAS** are the 50.20 rows of the DISH/DPAS deliverables, not "committee draft ISH/PAS" (30.xx);
|
|
33
|
+
**Stage codes — the SSOT and what is settled.** The authoritative source for IEC stage abbreviations is committed in this repo: **`data/iec/stage-codes.md`** — the 52-row IEC/ISO stage-code correspondence table transcribed from IEC's official *IEC/ISO Harmonized APIs* documents (v0.0.8 2023-06, api-portal.iec.ch; v0.0.7 2021-05, iec-apiportal.apigee.io — the successors that replace the IEC Data Feeds), the legacy Data-Feeds field examples, and the IS-lifecycle ladder from `StageCodes_IS_v2.pdf` (2023-06). `www.iec.ch` itself is fully WAF-gated to non-browsers and the Wayback Machine holds no snapshots of its PDFs, so the extract — not the unreachable original — is the reference. **`Pubid::Iec.locate_stage` reads `TYPED_STAGES` only** (`lib/pubid/iec.rb`); `PROJECT_STAGES` (AFDIS, TCDV, PRVC…) are not queryable through it. Every one of metanorma-iec's 55 `STAGE_CODES` — the list quoted in pubid#237 — resolves, locked by `spec/pubid/iec/typed_stages_spec.rb` in the issue's own order; aliases are always **appended, never prepended**, so `abbr.first` (what renders) is unchanged. Notable rulings from that pass: **ADIS** is the legacy Data-Feeds spelling of AFDIS ("Approved for FDIS circulation", ISO_LEVEL 40.99) and is an alias on `cdv` (the typed stage claiming 40.99); **CDISH/CDPAS** are the 50.20 rows of the DISH/DPAS deliverables, not "committee draft ISH/PAS" (30.xx); **Reconciliation items recorded in the extract, deliberately not applied:** DELPUB sits at 99.60 there while the `is` ladder does not claim 99.60; CAN carries two codes (30.98 IS/TR/TS, 50.98 PAS/ISH/COR); the rows CDISH-table-siblings DECDISH/MERGED/SPLIT/PCC/PRVN/DEL/RPUB/TPUB and the per-deliverable translation/preparation families are not registered as typed-stage abbreviations.
|
data/lib/pubid/ieee/builder.rb
CHANGED
|
@@ -1079,11 +1079,17 @@ module Pubid
|
|
|
1079
1079
|
# P + a /D designator (any draft capture) is a DRAFT, never a
|
|
1080
1080
|
# printed Std (the owner's 2026-10-24 ruling): the P marker is
|
|
1081
1081
|
# project status, so the joint/project-draft family owns the row
|
|
1082
|
-
# whatever date trails the designator. The
|
|
1083
|
-
#
|
|
1084
|
-
|
|
1082
|
+
# whatever date trails the designator. The ruling extends to the
|
|
1083
|
+
# P-less joint rows (pubid#597): a numeric /D designator alone is
|
|
1084
|
+
# project status too — the row is a draft AND takes the P, so the
|
|
1085
|
+
# marker is set below when the source spelling lacked it.
|
|
1086
|
+
p_with_draft = (parsed[:project_marker] || numeric_draft) &&
|
|
1085
1087
|
(parsed[:draft_version] || parsed[:draft_iso_stage] ||
|
|
1086
1088
|
parsed[:draft_month] || parsed[:draft_year])
|
|
1089
|
+
if p_with_draft && !parsed[:project_marker]
|
|
1090
|
+
attributes[:project_marker] = true
|
|
1091
|
+
parsed[:project_marker] = "P"
|
|
1092
|
+
end
|
|
1087
1093
|
printed_joint = parsed[:iso_published] && parsed[:iso_stage].nil? &&
|
|
1088
1094
|
!p_with_draft &&
|
|
1089
1095
|
(parsed[:printed_dash_year] || parsed[:printed_month_year] ||
|
|
@@ -1272,8 +1278,15 @@ module Pubid
|
|
|
1272
1278
|
# rather than the joint-development model.
|
|
1273
1279
|
if attributes[:draft] && parsed[:iso_stage].nil? &&
|
|
1274
1280
|
parsed[:iec_stage].nil? && parsed[:amd_number].nil?
|
|
1275
|
-
|
|
1276
|
-
|
|
1281
|
+
# The ruling (pubid#597): a joint row with a numeric /D designator
|
|
1282
|
+
# is a draft AND takes the P project marker, whatever the source
|
|
1283
|
+
# spelling printed — the marker is set on the identifier (and the
|
|
1284
|
+
# code prepended) even when the row reached it without one.
|
|
1285
|
+
draft_code = attributes[:code].to_s
|
|
1286
|
+
draft_code = "P" + draft_code unless draft_code.start_with?("P")
|
|
1287
|
+
draft_attrs = { code: draft_code,
|
|
1288
|
+
draft: attributes[:draft],
|
|
1289
|
+
project_marker: true }
|
|
1277
1290
|
if attributes[:publishers]
|
|
1278
1291
|
draft_attrs[:publisher] = attributes[:publishers].first
|
|
1279
1292
|
rest = attributes[:publishers][1..]
|
data/lib/pubid/ieee/renderer.rb
CHANGED
|
@@ -141,11 +141,16 @@ module Pubid
|
|
|
141
141
|
# so the WHOLE type word is dropped — not just "Std" (pubid#318: the
|
|
142
142
|
# half-strip left "Draft" in the render, the re-parse dropped it, and
|
|
143
143
|
# to_s needed three rounds to converge while losing the type).
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
# A project draft carries the word Draft whatever the lead
|
|
145
|
+
# publisher — the ISO-led joint drafts (pubid#597) print it too.
|
|
146
|
+
should_render_type = id.publisher&.match?(/^(IEEE|AIEE)/) ||
|
|
147
|
+
id.is_a?(Identifiers::ProjectDraftIdentifier)
|
|
148
|
+
|
|
149
|
+
if should_render_type && !id.typed_stage&.project_status &&
|
|
150
|
+
((id.type && !id.type.to_s.strip.empty? && id.type != "P") ||
|
|
151
|
+
id.is_a?(Identifiers::ProjectDraftIdentifier)) &&
|
|
147
152
|
!id.draft_status.to_s.match?(/unapproved/i)
|
|
148
|
-
type_str = id.type.dup
|
|
153
|
+
type_str = id.type ? id.type.dup : "Draft"
|
|
149
154
|
type_str = type_str.sub(/^P/, "") if type_str.start_with?("P")
|
|
150
155
|
# A draft carries the word Draft alone in every face (the C2
|
|
151
156
|
# ruling): Std/Standard never renders on a draft, whatever
|
data/lib/pubid/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pubid
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.0.pre.alpha.
|
|
4
|
+
version: 2.0.0.pre.alpha.59
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|