uc3-dmp-id 0.0.138 → 0.0.140
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uc3-dmp-id/creator.rb +1 -1
- data/lib/uc3-dmp-id/deleter.rb +1 -1
- data/lib/uc3-dmp-id/helper.rb +1 -1
- data/lib/uc3-dmp-id/schemas/author.rb +288 -19
- data/lib/uc3-dmp-id/updater.rb +1 -1
- data/lib/uc3-dmp-id/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: 77df36a0f25a15f2e84d967f81668f1826179dc24da3050c2468d26b3189d841
|
4
|
+
data.tar.gz: e39e3057cf70bbb2a3787ff45d3cd8ffeec1ffb01978ba64a7267735fe61e260
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bd3666ebd7a59e5d83c042860be19aa29e255811fb5fd4aa96e444969847bc90aa074b4b663f4f67e82734ef52985f0233ad4d8106dbf2008ce9a132737d158
|
7
|
+
data.tar.gz: 0ab9b4ed312d4e61e4949dea02af7aa5f8d276bd22c175dbf8a500710bc4ecf641c2fdbaaefab998f0532cf2eb16cf8ba37fb22d78fee59a29f53fecb1557679
|
data/lib/uc3-dmp-id/creator.rb
CHANGED
@@ -91,7 +91,7 @@ module Uc3DmpId
|
|
91
91
|
json['dmphub_updater_is_provenance'] = true
|
92
92
|
# Publish the change to the EventBridge
|
93
93
|
publisher = Uc3DmpEventBridge::Publisher.new
|
94
|
-
publisher.publish(source: 'DmpCreator', dmp: json, logger: logger)
|
94
|
+
publisher.publish(source: 'DmpCreator', event_type: 'EZID update', dmp: json, logger: logger)
|
95
95
|
|
96
96
|
# Determine if there are any related identifiers that we should try to fetch a citation for
|
97
97
|
citable_identifiers = Helper.citable_related_identifiers(dmp: json)
|
data/lib/uc3-dmp-id/deleter.rb
CHANGED
@@ -67,7 +67,7 @@ module Uc3DmpId
|
|
67
67
|
json['dmphub_updater_is_provenance'] = true
|
68
68
|
# Publish the change to the EventBridge
|
69
69
|
publisher = Uc3DmpEventBridge::Publisher.new
|
70
|
-
publisher.publish(source: 'DmpDeleter', dmp: json, logger: logger)
|
70
|
+
publisher.publish(source: 'DmpDeleter', event_type: 'EZID update', dmp: json, logger: logger)
|
71
71
|
true
|
72
72
|
end
|
73
73
|
end
|
data/lib/uc3-dmp-id/helper.rb
CHANGED
@@ -220,7 +220,7 @@ module Uc3DmpId
|
|
220
220
|
return json.map { |obj| cleanse_dmp_json(json: obj) }.compact if json.is_a?(Array)
|
221
221
|
|
222
222
|
cleansed = {}
|
223
|
-
allowable = %w[dmphub_versions]
|
223
|
+
allowable = %w[dmphub_modifications dmphub_versions]
|
224
224
|
json.each_key do |key|
|
225
225
|
next if (key.to_s.start_with?('dmphub') && !allowable.include?(key)) || %w[PK SK].include?(key.to_s)
|
226
226
|
|
@@ -640,7 +640,7 @@ module Uc3DmpId
|
|
640
640
|
"start_date": {
|
641
641
|
"$id": "#/properties/dmp/properties/dataset/items/properties/distribution/items/properties/license/items/properties/start_date",
|
642
642
|
"type": "string",
|
643
|
-
"format": "date",
|
643
|
+
"format": "date-time",
|
644
644
|
"title": "The Dataset Distribution License Start Date Schema",
|
645
645
|
"description": "If date is set in the future, it indicates embargo period. Encoded using the relevant ISO 8601 Date and Time compliant string.",
|
646
646
|
"examples": ["2019-06-30"]
|
@@ -669,7 +669,7 @@ module Uc3DmpId
|
|
669
669
|
"issued": {
|
670
670
|
"$id": "#/properties/dmp/properties/dataset/items/properties/issued",
|
671
671
|
"type": "string",
|
672
|
-
"format": "date",
|
672
|
+
"format": "date-time",
|
673
673
|
"title": "The Dataset Date of Issue Schema",
|
674
674
|
"description": "Issued. Encoded using the relevant ISO 8601 Date and Time compliant string.",
|
675
675
|
"examples": ["2019-06-30"]
|
@@ -953,6 +953,289 @@ module Uc3DmpId
|
|
953
953
|
"type"
|
954
954
|
]
|
955
955
|
},
|
956
|
+
"dmphub_modifications": {
|
957
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications",
|
958
|
+
"type": "array",
|
959
|
+
"title": "External modifications",
|
960
|
+
"description": "Modifications made by an external system that does not own the DMP ID",
|
961
|
+
"items": {
|
962
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items",
|
963
|
+
"type": "object",
|
964
|
+
"title": "An external modification",
|
965
|
+
"properties": {
|
966
|
+
"id": {
|
967
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/id",
|
968
|
+
"type": "string",
|
969
|
+
"title": "Modification identifier",
|
970
|
+
"examples": ["12345ABCD"]
|
971
|
+
},
|
972
|
+
"provenance": {
|
973
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/provenance",
|
974
|
+
"type": "string",
|
975
|
+
"title": "Modifier",
|
976
|
+
"examples": ["datacite"]
|
977
|
+
},
|
978
|
+
"timestamp": {
|
979
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/timestamp",
|
980
|
+
"type": "string",
|
981
|
+
"format": "date-time",
|
982
|
+
"title": "The modification date and time",
|
983
|
+
"examples": ["2023-07-27T15:08:32Z"]
|
984
|
+
},
|
985
|
+
"note": {
|
986
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/note",
|
987
|
+
"type": "string",
|
988
|
+
"title": "Descriptive note",
|
989
|
+
"examples": ["data received from event data"]
|
990
|
+
},
|
991
|
+
"status": {
|
992
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/status",
|
993
|
+
"type": "string",
|
994
|
+
"title": "Modification status",
|
995
|
+
"enum": [
|
996
|
+
"accepted",
|
997
|
+
"pending",
|
998
|
+
"rejected"
|
999
|
+
]
|
1000
|
+
},
|
1001
|
+
"dmproadmap_related_identifier": {
|
1002
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/dmproadmap_related_identifier",
|
1003
|
+
"type": "object",
|
1004
|
+
"title": "A related identifier",
|
1005
|
+
"properties": {
|
1006
|
+
"descriptor": {
|
1007
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/dmproadmap_related_identifier/properties/descriptor",
|
1008
|
+
"type": "string",
|
1009
|
+
"enum": [
|
1010
|
+
"is_cited_by",
|
1011
|
+
"cites",
|
1012
|
+
"is_supplement_to",
|
1013
|
+
"is_supplemented_by",
|
1014
|
+
"is_described_by",
|
1015
|
+
"describes",
|
1016
|
+
"has_metadata",
|
1017
|
+
"is_metadata_for",
|
1018
|
+
"is_part_of",
|
1019
|
+
"has_part",
|
1020
|
+
"is_referenced_by",
|
1021
|
+
"references",
|
1022
|
+
"is_documented_by",
|
1023
|
+
"documents",
|
1024
|
+
"is_new_version_of",
|
1025
|
+
"is_previous_version_of"
|
1026
|
+
]
|
1027
|
+
},
|
1028
|
+
"identifier": {
|
1029
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/dmproadmap_related_identifier/properties/identifier",
|
1030
|
+
"type": "string",
|
1031
|
+
"title": "A unique identifier for the item",
|
1032
|
+
"description": "Identifier for a DMP",
|
1033
|
+
"examples": ["https://doi.org/10.1371/journal.pcbi.1006750"]
|
1034
|
+
},
|
1035
|
+
"type": {
|
1036
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/dmproadmap_related_identifier/properties/type",
|
1037
|
+
"type": "string",
|
1038
|
+
"enum": [
|
1039
|
+
"handle",
|
1040
|
+
"doi",
|
1041
|
+
"ark",
|
1042
|
+
"url",
|
1043
|
+
"other"
|
1044
|
+
]
|
1045
|
+
},
|
1046
|
+
"work_type": {
|
1047
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/dmproadmap_related_identifier/properties/work_type",
|
1048
|
+
"type": "string"
|
1049
|
+
}
|
1050
|
+
},
|
1051
|
+
"required": [
|
1052
|
+
"descriptor",
|
1053
|
+
"identifier",
|
1054
|
+
"type",
|
1055
|
+
"work_type"
|
1056
|
+
]
|
1057
|
+
},
|
1058
|
+
"funding": {
|
1059
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/funding",
|
1060
|
+
"type": "object",
|
1061
|
+
"title": "A modification to Funding",
|
1062
|
+
"properties": {
|
1063
|
+
"dmproadmap_project_number": {
|
1064
|
+
"$id": "#/properties/dmp/properties/project/items/properties/funding/properties/dmproadmap_project_number",
|
1065
|
+
"type": "string",
|
1066
|
+
"title": "The funder's identifier for the research project",
|
1067
|
+
"description": "The funder's identifier used to identify the research project",
|
1068
|
+
"examples": ["prj-XYZ987-UCB"]
|
1069
|
+
},
|
1070
|
+
"funder_id": {
|
1071
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/funding/properties/funder_id",
|
1072
|
+
"type": "object",
|
1073
|
+
"title": "The Funder ID Schema",
|
1074
|
+
"description": "Funder ID of the associated project",
|
1075
|
+
"properties": {
|
1076
|
+
"identifier": {
|
1077
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/funding/properties/funder_id/properties/identifier",
|
1078
|
+
"type": "string",
|
1079
|
+
"title": "The Funder ID Value Schema",
|
1080
|
+
"description": "Funder ID, recommended to use CrossRef Funder Registry. See: https://www.crossref.org/services/funder-registry/",
|
1081
|
+
"examples": ["501100002428"]
|
1082
|
+
},
|
1083
|
+
"type": {
|
1084
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/funding/properties/funder_id/properties/type",
|
1085
|
+
"type": "string",
|
1086
|
+
"enum": [
|
1087
|
+
"fundref",
|
1088
|
+
"ror",
|
1089
|
+
"url",
|
1090
|
+
"other"
|
1091
|
+
],
|
1092
|
+
"title": "The Funder ID Type Schema",
|
1093
|
+
"description": "Identifier type. Allowed values: fundref, url, other",
|
1094
|
+
"examples": ["fundref"]
|
1095
|
+
}
|
1096
|
+
},
|
1097
|
+
"required": [
|
1098
|
+
"identifier",
|
1099
|
+
"type"
|
1100
|
+
]
|
1101
|
+
},
|
1102
|
+
"funding_status": {
|
1103
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/funding/properties/funding_status",
|
1104
|
+
"type": "string",
|
1105
|
+
"enum": [
|
1106
|
+
"planned",
|
1107
|
+
"applied",
|
1108
|
+
"granted",
|
1109
|
+
"rejected"
|
1110
|
+
],
|
1111
|
+
"title": "The Funding Status Schema",
|
1112
|
+
"description": "To express different phases of project lifecycle. Allowed values: planned, applied, granted, rejected",
|
1113
|
+
"examples": ["granted"]
|
1114
|
+
},
|
1115
|
+
"grant_id": {
|
1116
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/funding/properties/grant_id",
|
1117
|
+
"type": "object",
|
1118
|
+
"title": "The Funding Grant ID Schema",
|
1119
|
+
"description": "Grant ID of the associated project",
|
1120
|
+
"properties": {
|
1121
|
+
"identifier": {
|
1122
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/funding/properties/grant_id/properties/identifier",
|
1123
|
+
"type": "string",
|
1124
|
+
"title": "The Funding Grant ID Value Schema",
|
1125
|
+
"description": "Grant ID",
|
1126
|
+
"examples": ["776242"]
|
1127
|
+
},
|
1128
|
+
"type": {
|
1129
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/funding/properties/grant_id/properties/type",
|
1130
|
+
"type": "string",
|
1131
|
+
"title": "The Funding Grant ID Type Schema",
|
1132
|
+
"enum": [
|
1133
|
+
"doi",
|
1134
|
+
"url",
|
1135
|
+
"other"
|
1136
|
+
],
|
1137
|
+
"description": "Identifier type. Allowed values: url, other",
|
1138
|
+
"examples": ["other"]
|
1139
|
+
}
|
1140
|
+
},
|
1141
|
+
"required": [
|
1142
|
+
"identifier",
|
1143
|
+
"type"
|
1144
|
+
]
|
1145
|
+
},
|
1146
|
+
"name": {
|
1147
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/items/properties/funding/properties/name",
|
1148
|
+
"type": "string",
|
1149
|
+
"title": "The name of the funding instituion / organization",
|
1150
|
+
"description": "Name",
|
1151
|
+
"examples": ["National Science Foundation"]
|
1152
|
+
}
|
1153
|
+
},
|
1154
|
+
"required": [
|
1155
|
+
"funding_status",
|
1156
|
+
"name"
|
1157
|
+
]
|
1158
|
+
},
|
1159
|
+
"project": {
|
1160
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/project",
|
1161
|
+
"type": "object",
|
1162
|
+
"title": "The DMP Project Items Schema",
|
1163
|
+
"properties": {
|
1164
|
+
"description": {
|
1165
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/project/properties/description",
|
1166
|
+
"type": "string",
|
1167
|
+
"title": "The DMP Project Description Schema",
|
1168
|
+
"description": "Project description",
|
1169
|
+
"examples": ["Project develops novel..."]
|
1170
|
+
},
|
1171
|
+
"end": {
|
1172
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/project/properties/end",
|
1173
|
+
"type": "string",
|
1174
|
+
"format": "date-time",
|
1175
|
+
"title": "The DMP Project End Date Schema",
|
1176
|
+
"description": "Project end date. Encoded using the relevant ISO 8601 Date and Time compliant string.",
|
1177
|
+
"examples": ["2020-03-31T00:00:00Z"]
|
1178
|
+
},
|
1179
|
+
"start": {
|
1180
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/project/properties/start",
|
1181
|
+
"type": "string",
|
1182
|
+
"format": "date-time",
|
1183
|
+
"title": "The DMP Project Start Date Schema",
|
1184
|
+
"description": "Project start date. Encoded using the relevant ISO 8601 Date and Time compliant string.",
|
1185
|
+
"examples": ["2019-04-01T00:00:00Z"]
|
1186
|
+
},
|
1187
|
+
"title": {
|
1188
|
+
"$id": "#/properties/dmp/properties/dmphub_modifications/project/properties/title",
|
1189
|
+
"type": "string",
|
1190
|
+
"title": "The DMP Project Title Schema",
|
1191
|
+
"description": "Project title",
|
1192
|
+
"examples": ["Our New Project"]
|
1193
|
+
}
|
1194
|
+
},
|
1195
|
+
"required": [
|
1196
|
+
"title"
|
1197
|
+
]
|
1198
|
+
}
|
1199
|
+
}
|
1200
|
+
},
|
1201
|
+
"required": [
|
1202
|
+
"id",
|
1203
|
+
"provenance",
|
1204
|
+
"status",
|
1205
|
+
"timestamp"
|
1206
|
+
]
|
1207
|
+
},
|
1208
|
+
"dmphub_versions": {
|
1209
|
+
"$id": "#/properties/dmp/properties/dmphub_versions",
|
1210
|
+
"type": "array",
|
1211
|
+
"title": "DMP ID versions",
|
1212
|
+
"description": "Links to all of the DMPs versions",
|
1213
|
+
"items": {
|
1214
|
+
"$id": "#/properties/dmp/properties/dmphub_versions/items",
|
1215
|
+
"type": "object",
|
1216
|
+
"title": "DMP version",
|
1217
|
+
"properties": {
|
1218
|
+
"timestamp": {
|
1219
|
+
"$id": "#/properties/dmp/properties/dmphub_versions/items/properties/timestamp",
|
1220
|
+
"type": "string",
|
1221
|
+
"format": "date-time",
|
1222
|
+
"title": "The version date and time",
|
1223
|
+
"examples": ["2023-08-17T16:14:39Z"]
|
1224
|
+
},
|
1225
|
+
"url": {
|
1226
|
+
"$id": "#/properties/dmp/properties/dmphub_versions/items/properties/url",
|
1227
|
+
"type": "string",
|
1228
|
+
"format": "uri",
|
1229
|
+
"title": "The URL to retrieve the specified version",
|
1230
|
+
"examples": ["https://somesite.org/dmps/doi.org/10.1234/A1B2C3D4?version=2023-08-17T16:14:39Z"]
|
1231
|
+
}
|
1232
|
+
}
|
1233
|
+
},
|
1234
|
+
"required": [
|
1235
|
+
"timestamp",
|
1236
|
+
"url"
|
1237
|
+
]
|
1238
|
+
},
|
956
1239
|
"dmproadmap_related_identifiers": {
|
957
1240
|
"$id": "#/properties/dmp/properties/dmproadmap_related_identifiers",
|
958
1241
|
"type": "array",
|
@@ -1005,21 +1288,7 @@ module Uc3DmpId
|
|
1005
1288
|
},
|
1006
1289
|
"work_type": {
|
1007
1290
|
"$id": "#/properties/dmp/properties/dmproadmap_related_identifiers/items/properties/work_type",
|
1008
|
-
"type": "string"
|
1009
|
-
"enum": [
|
1010
|
-
"article",
|
1011
|
-
"book",
|
1012
|
-
"dataset",
|
1013
|
-
"metadata_template",
|
1014
|
-
"other",
|
1015
|
-
"output_management_plan",
|
1016
|
-
"paper",
|
1017
|
-
"preprint",
|
1018
|
-
"preregistration",
|
1019
|
-
"protocol",
|
1020
|
-
"software",
|
1021
|
-
"supplemental_information"
|
1022
|
-
]
|
1291
|
+
"type": "string"
|
1023
1292
|
}
|
1024
1293
|
},
|
1025
1294
|
"required": [
|
@@ -1169,7 +1438,7 @@ module Uc3DmpId
|
|
1169
1438
|
"end": {
|
1170
1439
|
"$id": "#/properties/dmp/properties/project/items/properties/end",
|
1171
1440
|
"type": "string",
|
1172
|
-
"format": "date",
|
1441
|
+
"format": "date-time",
|
1173
1442
|
"title": "The DMP Project End Date Schema",
|
1174
1443
|
"description": "Project end date. Encoded using the relevant ISO 8601 Date and Time compliant string.",
|
1175
1444
|
"examples": ["2020-03-31"]
|
@@ -1342,7 +1611,7 @@ module Uc3DmpId
|
|
1342
1611
|
"start": {
|
1343
1612
|
"$id": "#/properties/dmp/properties/project/items/properties/start",
|
1344
1613
|
"type": "string",
|
1345
|
-
"format": "date",
|
1614
|
+
"format": "date-time",
|
1346
1615
|
"title": "The DMP Project Start Date Schema",
|
1347
1616
|
"description": "Project start date. Encoded using the relevant ISO 8601 Date and Time compliant string.",
|
1348
1617
|
"examples": ["2019-04-01"]
|
data/lib/uc3-dmp-id/updater.rb
CHANGED
@@ -143,7 +143,7 @@ module Uc3DmpId
|
|
143
143
|
json['dmphub_updater_is_provenance'] = provenance['PK'] == json['dmphub_provenance_id']
|
144
144
|
# Publish the change to the EventBridge
|
145
145
|
publisher = Uc3DmpEventBridge::Publisher.new
|
146
|
-
publisher.publish(source: 'DmpUpdater', dmp: json, logger: logger)
|
146
|
+
publisher.publish(source: 'DmpUpdater', event_type: 'EZID update', dmp: json, logger: logger)
|
147
147
|
|
148
148
|
# Determine if there are any related identifiers that we should try to fetch a citation for
|
149
149
|
citable_identifiers = Helper.citable_related_identifiers(dmp: json)
|
data/lib/uc3-dmp-id/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uc3-dmp-id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.140
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Riley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|