metanorma-mpfa 0.6.0 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7c850bc3f9548054cb46adf8b4fd2dc76a6797c530768c04388b52c0f6cc4459
4
- data.tar.gz: 5dc6dcf8de8aa47770b2fcb416cfda5583ce6f85316ad3a0c49b14149f2833c9
3
+ metadata.gz: 8c98ed7b1146c47d50b038240e5680d3345b63e181369ed20aa5d971162df961
4
+ data.tar.gz: ff9fd29bd1dda19e35a6d70451fdcabe1b0e7ff94e9eef536f204929680206df
5
5
  SHA512:
6
- metadata.gz: 162809da11dc05fcaac058497b274f75423334ebeb5f48053733466d20bb7fa6f90faaa230b8b707ebeff9092143048e5400e458bdfd378bd5ab40d23b246d5d
7
- data.tar.gz: 8ff45aa01b37df1020341f6eb7012636de639e926ebe31b2fcab3edebf2326a20c2aff2ced231688441ca86f9901df95d7721d65751fd669f1197b2b5874154a
6
+ metadata.gz: 63a9e925b5aa576a8d2c55b7197dc2f6747b7cf8ceef99dbcfc633d251f5c659c037b26327103e06803900477dadee74d4b7eea2fdfc09e8179471feb785ce2c
7
+ data.tar.gz: 2c4b7362d868a55775bbf52e0a42007d1ce77cea68c079ef6c8143cb656980fc5e14af3c6bd8b980d5c733ac41f7084615071a56342af5eab29648a3e2912a52
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5', '2.4' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
  steps:
33
23
  - uses: actions/checkout@v2
34
24
  with:
@@ -40,3 +30,14 @@ jobs:
40
30
  bundler-cache: true
41
31
 
42
32
  - run: bundle exec rake
33
+
34
+ tests-passed:
35
+ needs: rake
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: peter-evans/repository-dispatch@v1
39
+ with:
40
+ token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
41
+ repository: ${{ github.repository }}
42
+ event-type: tests-passed
43
+ client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
data/.hound.yml CHANGED
@@ -1,3 +1,5 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
1
3
  ruby:
2
- Enabled: true
4
+ enabled: true
3
5
  config_file: .rubocop.yml
data/.rubocop.yml CHANGED
@@ -1,14 +1,10 @@
1
- # This project follows the Ribose OSS style guide.
2
- # https://github.com/riboseinc/oss-guides
3
- # All project-specific additions and overrides should be specified in this file.
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
4
3
  inherit_from:
5
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
6
5
 
7
6
  # local repo-specific modifications
7
+ # ...
8
8
 
9
9
  AllCops:
10
- DisplayCopNames: false
11
- StyleGuideCopsOnly: false
12
- TargetRubyVersion: 2.4
13
- Rails:
14
- Enabled: true
10
+ TargetRubyVersion: 2.5
data/bin/manifest CHANGED
@@ -29,12 +29,13 @@ supported_gem_paths.each do |backend|
29
29
  end
30
30
  puts
31
31
 
32
- def uuid()
32
+ def uuid
33
33
  UUIDTools::UUID.random_create
34
34
  end
35
35
 
36
36
  def extract_documents(m)
37
- return [] unless m and m["sections"]
37
+ return [] unless m && m["sections"]
38
+
38
39
  ret = []
39
40
  m["sections"].each do |s|
40
41
  ret << s if s["file"]
@@ -45,22 +46,24 @@ end
45
46
 
46
47
  def hyperlink(link)
47
48
  return unless link
49
+
48
50
  link.sub(/\.adoc(?=$|#)/, ".html")
49
51
  end
50
52
 
51
53
  def iterate(sections)
52
54
  return "" unless sections
55
+
53
56
  ret = ""
54
57
  Array(sections).each do |m|
55
- ret+= "<clause id='#{uuid}'>\n"
56
- title = m["title"] && m["number"] ? "#{m['number']}. #{m['title']}" : ( m["number"] || m["title"] || "&mdash;" )
58
+ ret += "<clause id='#{uuid}'>\n"
59
+ title = m["title"] && m["number"] ? "#{m['number']}. #{m['title']}" : (m["number"] || m["title"] || "&mdash;")
57
60
  file = hyperlink(m["file"])
58
61
  title = "<link target='#{file}'>#{title}</link>" if file
59
- ret+= "<title>#{title}</title>\n"
60
- ret+= "<p>#{m['description']}</p>\n" if m["description"]
61
- ret+= "<p align='right'>#{m['revdate']}</p>\n" if m["revdate"]
62
+ ret += "<title>#{title}</title>\n"
63
+ ret += "<p>#{m['description']}</p>\n" if m["description"]
64
+ ret += "<p align='right'>#{m['revdate']}</p>\n" if m["revdate"]
62
65
  ret += iterate(m["sections"])
63
- ret+= "</clause>\n"
66
+ ret += "</clause>\n"
64
67
  end
65
68
  ret
66
69
  end
@@ -69,20 +72,19 @@ options = {}
69
72
  opt_parser = OptionParser.new do |opts|
70
73
  opts.banner += " <file>"
71
74
  opts.on(
72
- '-t',
73
- '--type TYPE',
75
+ "-t",
76
+ "--type TYPE",
74
77
  "Type of standard to generate"
75
78
  ) { |v| options[:type] = v.to_sym }
76
79
 
77
- opts.on(
78
- '-r',
79
- '--require LIBRARY',
80
- 'Require LIBRARY prior to execution'
81
- ) { |v|
80
+ opts.on(
81
+ "-r",
82
+ "--require LIBRARY",
83
+ "Require LIBRARY prior to execution"
84
+ ) do |v|
82
85
  options[:require] ||= []
83
86
  options[:require] << v
84
- }
85
-
87
+ end
86
88
 
87
89
  opts.on_tail("-h", "--help", "Show this message") do
88
90
  puts opts
@@ -98,7 +100,6 @@ if options[:require]
98
100
  end
99
101
  end
100
102
 
101
-
102
103
  manifest = YAML.load_file(ARGV.pop)
103
104
 
104
105
  documents = extract_documents(manifest)
@@ -106,41 +107,41 @@ documents = extract_documents(manifest)
106
107
  # TODO real lookup of namespaces and root elements
107
108
 
108
109
  out = <<~END
109
- <#{options[:type]}-standard xmlns="http://riboseinc.com/isoxml">
110
- <bibdata type="standard">
111
- <title>#{manifest["title"]}</title>
110
+ <#{options[:type]}-standard xmlns="http://riboseinc.com/isoxml">
111
+ <bibdata type="standard">
112
+ <title>#{manifest['title']}</title>
112
113
  END
113
114
 
114
115
  # TODO leave in anchor references?
115
116
  #
116
117
  documents.each do |d|
117
118
  out += <<~END
118
- <relation type="partOf">
119
- <bibdata type="standard">
120
- <title>#{d['title']}</title>
121
- <docidentifier>#{d['number']}</docidentifier>
122
- <abstract>#{d['description']}</abstract>
123
- </bibdata>
124
- </relation>
119
+ <relation type="partOf">
120
+ <bibdata type="standard">
121
+ <title>#{d['title']}</title>
122
+ <docidentifier>#{d['number']}</docidentifier>
123
+ <abstract>#{d['description']}</abstract>
124
+ </bibdata>
125
+ </relation>
125
126
  END
126
127
  end
127
128
 
128
129
  out += <<~END
129
- </bibdata>
130
- <sections>
130
+ </bibdata>
131
+ <sections>
131
132
  END
132
133
 
133
- out+=iterate(manifest["sections"])
134
+ out += iterate(manifest["sections"])
134
135
 
135
- out+= <<~END
136
- </sections>
137
- <#{options[:type]}-standard>
136
+ out += <<~END
137
+ </sections>
138
+ <#{options[:type]}-standard>
138
139
  END
139
- outfilename = options[:filename].sub(/\.[^.]+$/, ".xml")
140
- File.open(outfilename, "w") { |f| f.write out }
141
-
142
- processor = registry.find_processor(options[:type].to_sym)
143
- ext = :html
144
- file_extension = "html" || processor.output_formats[ext]
145
- outfilename = options[:filename].sub(/\.[^.]+$/, ".#{file_extension}")
146
- processor.output(out, outfilename, ext, {suppressheadingnumbers: true})
140
+ outfilename = options[:filename].sub(/\.[^.]+$/, ".xml")
141
+ File.open(outfilename, "w") { |f| f.write out }
142
+
143
+ processor = registry.find_processor(options[:type].to_sym)
144
+ ext = :html
145
+ file_extension = "html" || processor.output_formats[ext]
146
+ outfilename = options[:filename].sub(/\.[^.]+$/, ".#{file_extension}")
147
+ processor.output(out, outfilename, ext, { suppressheadingnumbers: true })
@@ -787,6 +787,7 @@
787
787
  <value>adapted</value>
788
788
  <value>vote-started</value>
789
789
  <value>vote-ended</value>
790
+ <value>announced</value>
790
791
  </choice>
791
792
  </define>
792
793
  <define name="bdate">
@@ -45,6 +45,11 @@
45
45
  <optional>
46
46
  <attribute name="alt"/>
47
47
  </optional>
48
+ <optional>
49
+ <attribute name="updatetype">
50
+ <data type="boolean"/>
51
+ </attribute>
52
+ </optional>
48
53
  <text/>
49
54
  </element>
50
55
  </define>
@@ -543,6 +548,9 @@
543
548
  </define>
544
549
  <define name="BibDataExtensionType">
545
550
  <ref name="doctype"/>
551
+ <optional>
552
+ <ref name="docsubtype"/>
553
+ </optional>
546
554
  <optional>
547
555
  <ref name="editorialgroup"/>
548
556
  </optional>
@@ -876,8 +884,28 @@
876
884
  </zeroOrMore>
877
885
  </element>
878
886
  </define>
887
+ <define name="pagebreak">
888
+ <element name="pagebreak">
889
+ <optional>
890
+ <attribute name="orientation">
891
+ <choice>
892
+ <value>landscape</value>
893
+ <value>portrait</value>
894
+ </choice>
895
+ </attribute>
896
+ </optional>
897
+ </element>
898
+ </define>
879
899
  </include>
880
900
  <!-- end overrides -->
901
+ <define name="docsubtype">
902
+ <element name="docsubtype">
903
+ <ref name="DocumentSubtype"/>
904
+ </element>
905
+ </define>
906
+ <define name="DocumentSubtype">
907
+ <text/>
908
+ </define>
881
909
  <define name="colgroup">
882
910
  <element name="colgroup">
883
911
  <oneOrMore>
@@ -943,8 +971,170 @@
943
971
  <ref name="permission"/>
944
972
  <ref name="imagemap"/>
945
973
  <ref name="svgmap"/>
974
+ <ref name="inputform"/>
975
+ </choice>
976
+ </define>
977
+ <define name="inputform">
978
+ <element name="form">
979
+ <attribute name="id">
980
+ <data type="ID"/>
981
+ </attribute>
982
+ <attribute name="name"/>
983
+ <attribute name="action"/>
984
+ <zeroOrMore>
985
+ <choice>
986
+ <ref name="TextElement"/>
987
+ <ref name="FormInput"/>
988
+ </choice>
989
+ </zeroOrMore>
990
+ </element>
991
+ </define>
992
+ <define name="FormInput">
993
+ <choice>
994
+ <ref name="input"/>
995
+ <ref name="formlabel"/>
996
+ <ref name="select"/>
997
+ <ref name="textarea"/>
998
+ </choice>
999
+ </define>
1000
+ <define name="InputType">
1001
+ <choice>
1002
+ <value>button</value>
1003
+ <value>checkbox</value>
1004
+ <value>date</value>
1005
+ <value>file</value>
1006
+ <value>password</value>
1007
+ <value>radio</value>
1008
+ <value>submit</value>
1009
+ <value>text</value>
946
1010
  </choice>
947
1011
  </define>
1012
+ <define name="input">
1013
+ <element name="input">
1014
+ <attribute name="type">
1015
+ <ref name="InputType"/>
1016
+ </attribute>
1017
+ <optional>
1018
+ <attribute name="checked">
1019
+ <data type="boolean"/>
1020
+ </attribute>
1021
+ </optional>
1022
+ <optional>
1023
+ <attribute name="disabled">
1024
+ <data type="boolean"/>
1025
+ </attribute>
1026
+ </optional>
1027
+ <optional>
1028
+ <attribute name="readonly">
1029
+ <data type="boolean"/>
1030
+ </attribute>
1031
+ </optional>
1032
+ <optional>
1033
+ <attribute name="maxlength">
1034
+ <data type="int"/>
1035
+ </attribute>
1036
+ </optional>
1037
+ <optional>
1038
+ <attribute name="minlength">
1039
+ <data type="int"/>
1040
+ </attribute>
1041
+ </optional>
1042
+ <optional>
1043
+ <attribute name="name"/>
1044
+ </optional>
1045
+ <optional>
1046
+ <attribute name="value"/>
1047
+ </optional>
1048
+ <optional>
1049
+ <attribute name="id">
1050
+ <data type="ID"/>
1051
+ </attribute>
1052
+ </optional>
1053
+ </element>
1054
+ </define>
1055
+ <define name="formlabel">
1056
+ <element name="label">
1057
+ <attribute name="for">
1058
+ <data type="IDREF"/>
1059
+ </attribute>
1060
+ <zeroOrMore>
1061
+ <ref name="PureTextElement"/>
1062
+ </zeroOrMore>
1063
+ </element>
1064
+ </define>
1065
+ <define name="select">
1066
+ <element name="select">
1067
+ <optional>
1068
+ <attribute name="name"/>
1069
+ </optional>
1070
+ <optional>
1071
+ <attribute name="value"/>
1072
+ </optional>
1073
+ <optional>
1074
+ <attribute name="id">
1075
+ <data type="ID"/>
1076
+ </attribute>
1077
+ </optional>
1078
+ <optional>
1079
+ <attribute name="disabled">
1080
+ <data type="boolean"/>
1081
+ </attribute>
1082
+ </optional>
1083
+ <optional>
1084
+ <attribute name="multiple">
1085
+ <data type="boolean"/>
1086
+ </attribute>
1087
+ </optional>
1088
+ <optional>
1089
+ <attribute name="size">
1090
+ <data type="int"/>
1091
+ </attribute>
1092
+ </optional>
1093
+ <oneOrMore>
1094
+ <ref name="option"/>
1095
+ </oneOrMore>
1096
+ </element>
1097
+ </define>
1098
+ <define name="option">
1099
+ <element name="option">
1100
+ <optional>
1101
+ <attribute name="disabled">
1102
+ <data type="boolean"/>
1103
+ </attribute>
1104
+ </optional>
1105
+ <optional>
1106
+ <attribute name="value"/>
1107
+ </optional>
1108
+ <zeroOrMore>
1109
+ <ref name="PureTextElement"/>
1110
+ </zeroOrMore>
1111
+ </element>
1112
+ </define>
1113
+ <define name="textarea">
1114
+ <element name="textarea">
1115
+ <optional>
1116
+ <attribute name="name"/>
1117
+ </optional>
1118
+ <optional>
1119
+ <attribute name="value"/>
1120
+ </optional>
1121
+ <optional>
1122
+ <attribute name="id">
1123
+ <data type="ID"/>
1124
+ </attribute>
1125
+ </optional>
1126
+ <optional>
1127
+ <attribute name="rows">
1128
+ <data type="int"/>
1129
+ </attribute>
1130
+ </optional>
1131
+ <optional>
1132
+ <attribute name="cols">
1133
+ <data type="int"/>
1134
+ </attribute>
1135
+ </optional>
1136
+ </element>
1137
+ </define>
948
1138
  <define name="bibliography">
949
1139
  <element name="bibliography">
950
1140
  <oneOrMore>
@@ -1017,9 +1207,7 @@
1017
1207
  </define>
1018
1208
  <define name="IsoWorkgroup">
1019
1209
  <optional>
1020
- <attribute name="number">
1021
- <data type="int"/>
1022
- </attribute>
1210
+ <attribute name="number"/>
1023
1211
  </optional>
1024
1212
  <optional>
1025
1213
  <attribute name="type"/>