pubid 2.0.0.pre.alpha.48 → 2.0.0.pre.alpha.49
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 +18 -12
- data/lib/pubid/iec/identifiers/international_standard.rb +10 -6
- data/lib/pubid/iec.rb +39 -1
- data/lib/pubid/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 497049ade2827d12f1d6a7774b14c033e0915d21b657a78b5290056f84a3a9d2
|
|
4
|
+
data.tar.gz: 6f09327d056fa64a8e7656ba277a09258bc60335a4e92b28aeef1fa2833f9e2f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 136a58459836eaf728383f00e34214c3015e7abfcf7ffac60fec64900fe1c44d029af4f4309c41d7f404d30b4865f443136cb6cb5dc56152ca3ef720fdbc9c45
|
|
7
|
+
data.tar.gz: 638e743baf216904da4fbf08b764f33ed6bd0784f58b17865f5cafb501ebe2ca9f2b86acc35dc9651415055dcc376682b98bd8ce4e53a0db67bcbf3bec81dd8c
|
data/data/iec/stage-codes.md
CHANGED
|
@@ -136,16 +136,22 @@ stage RFDIS/50.00 — a snapshot of the project's plan, not a code rename.
|
|
|
136
136
|
## Relationship to the pubid stage registry
|
|
137
137
|
|
|
138
138
|
- `ADIS` is registered as an alias on the IEC `cdv` typed stage, whose
|
|
139
|
-
harmonized list covers 40.99
|
|
140
|
-
`Pubid::Iec.locate_stage`, which reads `TYPED_STAGES` only).
|
|
139
|
+
harmonized list covers 40.99.
|
|
141
140
|
- `AWG` and `CANV` appear in neither this table nor the legacy examples —
|
|
142
|
-
IEC's own Data-Feeds successors do not know them
|
|
143
|
-
|
|
144
|
-
- Reconciliation
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
`
|
|
141
|
+
IEC's own Data-Feeds successors do not know them, and neither does
|
|
142
|
+
#237's list; they are fictitious (pubid#572).
|
|
143
|
+
- **Reconciliation (2026-10-22, applied):** `DELPUB`'s code 99.60 is
|
|
144
|
+
claimed by the `is` ladder; `SPLIT`/`MERGED` are claimed at
|
|
145
|
+
30.96/30.97 by the `cd` ladder; `PCC`, `RPUB`, `TPUB`, `DECPUB`,
|
|
146
|
+
`DEL` (10.98 and 20.98) and `PRVN` are registered as typed-stage
|
|
147
|
+
abbreviations; every per-deliverable row — the translation/preparation
|
|
148
|
+
families, `DECDISH`, `PRVDISH`/`PRVDPAS`/`PRVDTR`/`PRVDTS`, `CDTR`/
|
|
149
|
+
`CDTS`/`CDISH`/`CDPAS`, `ADTR`/`ADTS`, `DTRM`/`DTSM`, `NDTR`/`NDTS`,
|
|
150
|
+
`RDISH`, `TCDV`, `PRVC`, `AFDIS`, … — is queryable through
|
|
151
|
+
`Pubid::Iec.locate_stage` via the classes' PROJECT_STAGES;
|
|
152
|
+
`Pubid::Iec.locate_stage_by_harmonized_code` resolves the codes with
|
|
153
|
+
the IS-family preference (the pubid#570 deterministic rule). The
|
|
154
|
+
review/withdrawal ladder rows (90.xx/95.xx) stay claimed: the
|
|
155
|
+
harmonized system is joint ISO/IEC and #237's own list maps RR to
|
|
156
|
+
9092 — IEC's table simply does not name IEC stage codes for the
|
|
157
|
+
review sub-states. Locked by `spec/pubid/iec/stage_reconciliation_spec.rb`.
|
|
@@ -21,7 +21,9 @@ module Pubid
|
|
|
21
21
|
code: :np,
|
|
22
22
|
stage_code: :np,
|
|
23
23
|
type_code: :is,
|
|
24
|
-
|
|
24
|
+
# DEL is 10.98 (IS/TR/TS "Deleted/abandoned") and PRVN 10.60
|
|
25
|
+
# ("Preparation of RVN") — data/iec/stage-codes.md
|
|
26
|
+
abbr: ["NP", "DEL", "PRVN"],
|
|
25
27
|
name: "New Proposal",
|
|
26
28
|
harmonized_stages: %w[10.00 10.60 10.92 10.98],
|
|
27
29
|
),
|
|
@@ -50,7 +52,8 @@ module Pubid
|
|
|
50
52
|
code: :wd,
|
|
51
53
|
stage_code: :wd,
|
|
52
54
|
type_code: :is,
|
|
53
|
-
|
|
55
|
+
# DEL is 20.98 for the ISH deliverable ("Deleted/abandoned")
|
|
56
|
+
abbr: ["WD", "DEL"],
|
|
54
57
|
name: "Working Draft",
|
|
55
58
|
harmonized_stages: %w[20.20 20.60 20.98 20.99],
|
|
56
59
|
),
|
|
@@ -60,9 +63,10 @@ module Pubid
|
|
|
60
63
|
type_code: :is,
|
|
61
64
|
abbr: %w[CD 2CD 3CD 4CD 5CD 6CD 7CD 8CD 9CD
|
|
62
65
|
ACD A2CD A3CD A4CD A5CD A6CD A7CD A8CD A9CD
|
|
63
|
-
CDM],
|
|
66
|
+
CDM PCC SPLIT MERGED],
|
|
64
67
|
name: "Committee Draft",
|
|
65
|
-
harmonized_stages: %w[30.00 30.20 30.60 30.92 30.
|
|
68
|
+
harmonized_stages: %w[30.00 30.20 30.60 30.92 30.96 30.97 30.98
|
|
69
|
+
30.99],
|
|
66
70
|
),
|
|
67
71
|
Pubid::Components::TypedStage.new(
|
|
68
72
|
code: :cdv,
|
|
@@ -88,10 +92,10 @@ module Pubid
|
|
|
88
92
|
stage_code: :published,
|
|
89
93
|
type_code: :is,
|
|
90
94
|
abbr: ["", "BPUB", "PPUB", "APUB", "WPUB", "DELPUB",
|
|
91
|
-
"RR", "CAN"],
|
|
95
|
+
"RR", "CAN", "RPUB", "TPUB", "DECPUB"],
|
|
92
96
|
name: "International Standard",
|
|
93
97
|
harmonized_stages: %w[60.00 60.60 90.20 90.60 90.92 90.93 90.99
|
|
94
|
-
95.20 95.60 95.92 95.99],
|
|
98
|
+
95.20 95.60 95.92 95.99 99.60],
|
|
95
99
|
),
|
|
96
100
|
].freeze
|
|
97
101
|
|
data/lib/pubid/iec.rb
CHANGED
|
@@ -51,13 +51,51 @@ module Pubid
|
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
# The per-deliverable PROJECT_STAGES (AFDIS, TCDV, PRVC, DECDISH, …)
|
|
55
|
+
# as TypedStage objects, so they are queryable like typed stages.
|
|
56
|
+
# Deliberately NOT merged into all_typed_stages: the URN parser's
|
|
57
|
+
# stage reverse-map matches on harmonized_stages.first and would
|
|
58
|
+
# start resolving project codes (stage-IS-40.99 etc.) that resolve
|
|
59
|
+
# to "" today — a parse-behavior change outside a lookup-only round.
|
|
60
|
+
def self.all_project_stages
|
|
61
|
+
@all_project_stages ||= identifier_types.flat_map do |klass|
|
|
62
|
+
next [] unless klass.const_defined?(:PROJECT_STAGES)
|
|
63
|
+
|
|
64
|
+
type_key = klass.type[:key]
|
|
65
|
+
klass.const_get(:PROJECT_STAGES).map do |key, stage|
|
|
66
|
+
Pubid::Components::TypedStage.new(
|
|
67
|
+
code: key.to_sym,
|
|
68
|
+
stage_code: key.to_sym,
|
|
69
|
+
type_code: type_key,
|
|
70
|
+
abbr: [stage[:abbr]].flatten,
|
|
71
|
+
name: stage[:name],
|
|
72
|
+
harmonized_stages: stage[:harmonized_stages],
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
54
78
|
def self.locate_type(code)
|
|
55
79
|
identifier_types.find { |t| t.type[:key].to_s == code.to_s }
|
|
56
80
|
end
|
|
57
81
|
|
|
58
82
|
def self.locate_stage(abbr)
|
|
59
83
|
abbr_str = abbr.to_s.upcase
|
|
60
|
-
all_typed_stages.find { |s| s.abbr.any? { |a| a.to_s.upcase == abbr_str } }
|
|
84
|
+
all_typed_stages.find { |s| s.abbr.any? { |a| a.to_s.upcase == abbr_str } } ||
|
|
85
|
+
all_project_stages.find { |s| s.abbr.any? { |a| a.to_s.upcase == abbr_str } }
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Harmonized code -> typed stage ("99.60" -> is, "30.96" -> cd). The
|
|
89
|
+
# IS family wins a shared code — the same deterministic rule as the
|
|
90
|
+
# ISO lookup (pubid#570), because registry order is load-order
|
|
91
|
+
# dependent. Project stages are not candidates: their codes overlap
|
|
92
|
+
# the typed ladders by design (AFDIS 40.99 is also cdv's 40.99).
|
|
93
|
+
def self.locate_stage_by_harmonized_code(code)
|
|
94
|
+
code_str = code.to_s
|
|
95
|
+
candidates = all_typed_stages.select do |s|
|
|
96
|
+
s.harmonized_stages&.include?(code_str)
|
|
97
|
+
end
|
|
98
|
+
candidates.find { |s| s.type_code.to_s == "is" } || candidates.first
|
|
61
99
|
end
|
|
62
100
|
end
|
|
63
101
|
end
|
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.49
|
|
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-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|