Skip to content

Commit 8224c09

Browse files
author
Ramy
committed
First Commit
0 parents  commit 8224c09

15 files changed

+4470
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/vendor
2+
.idea/
3+

CodeMeta/codeMeta.json

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
3+
"@type": "SoftwareSourceCode",
4+
"author": [
5+
{
6+
"@type": "Person",
7+
"@id": "https://orcid.org/8504-3549",
8+
"email": "l.b@de.de",
9+
"givenName": "Ludwig",
10+
"familyName": "Beethoven",
11+
"affiliation": {
12+
"@type": "Organization",
13+
"name": "MIT"
14+
}
15+
},
16+
{
17+
"@type": "Person",
18+
"@id": "https://orcid.org/1825-0097",
19+
"email": "a.v@italy.it",
20+
"givenName": "Antonio",
21+
"familyName": "Vivaldi",
22+
"affiliation": {
23+
"@type": "Organization",
24+
"name": "Nasa"
25+
}
26+
}
27+
],
28+
"dateCreated": "2023-06-06",
29+
"description": "Software for Numerical Computation",
30+
"name": "Matlab Reinforcement Learning Toolbox",
31+
"license": "https://spdx.org/licenses/blessing.html",
32+
"programmingLanguage": [
33+
"php",
34+
"c++"
35+
],
36+
"downloadUrl": "https://download.com",
37+
"releaseNotes": "A release for Deep Reinforcement Learning",
38+
"version": "1.5.1",
39+
"relatedLink": [
40+
"https://relatedLink1.com",
41+
"https://relatedLink2.com"
42+
],
43+
"funder": [
44+
{
45+
"@type": "Organization",
46+
"@id": "https://cern1.ch",
47+
"funding": "EU-Horizon",
48+
"name": "LZI-Funded"
49+
},
50+
{
51+
"@type": "Organization",
52+
"@id": "https://cern2.ch",
53+
"funding": "NASA 2023",
54+
"name": "MIT"
55+
}
56+
],
57+
"isPartOf": "https://nodejs.org",
58+
"hasPart": "https://nextjs.org",
59+
"codeRepository": "https://github.com/openssl/openssl",
60+
"datePublished": "2023-06-07",
61+
"identifier": "http://dx.doi.org/10.1093/ajae/aaq063",
62+
"dateModified": "2023-06-30",
63+
"buildInstructions": "https://build-instructions.com",
64+
"softwareVersion": "1.5",
65+
"publisher": {
66+
"@type": "Organization",
67+
"name": "Schloss Dagstuhl - Leibniz-Zentrum für Informatik",
68+
"url": "https://dagstuhl.com"
69+
},
70+
"readme": "https://readMe-file-url.co.uk",
71+
"installUrl": "https://uk.mathworks.com/products/reinforcement-learning",
72+
"contributor": [
73+
{
74+
"@type": "Person",
75+
"@id": "https://orcid.org/1825-0097",
76+
"givenName": "Johann",
77+
"familyName": "Straus",
78+
"affiliation": {
79+
"@type": "Organization",
80+
"name": "Vienna"
81+
},
82+
"email": "j.s@austria.at"
83+
},
84+
{
85+
"@type": "Person",
86+
"givenName": "George",
87+
"familyName": "Handel",
88+
"email": "g.h@london.co.uk",
89+
"affiliation": {
90+
"@type": "Organization",
91+
"name": "London"
92+
},
93+
"@id": "https://orcid.org/1925-0091"
94+
}
95+
],
96+
"developmentStatus": "active",
97+
"applicationCategory": [
98+
"Astronomy",
99+
"Machine Learning"
100+
],
101+
"keywords": [
102+
"Andromeda",
103+
"Milky way",
104+
"Cyber Physical Systems"
105+
],
106+
"runtimePlatform": [
107+
".Net",
108+
"JVM",
109+
"Cygwin"
110+
],
111+
"operatingSystem": [
112+
"Debian",
113+
"Windows"
114+
],
115+
"fileFormat": [
116+
"application/sql",
117+
"application/mathematica"
118+
],
119+
"fileSize": [
120+
"1.5GB",
121+
"1.7KB"
122+
],
123+
"encoding": [
124+
"DataDownload",
125+
"Media"
126+
],
127+
"softwareRequirements": [
128+
"Node.js 14.0.1",
129+
"python 3.7"
130+
],
131+
"referencePublication": [
132+
"https://doi.org/10.1016/j.procs.2012.04.202",
133+
"https://doi.org/10.1016/j.procs.2012.04.203"
134+
],
135+
"issueTracker": "https://github.com/RamyTestAccount/D2",
136+
"contIntegration": "https://docs.google.com/spreadsheets/d/1-IAI1L09-n",
137+
"maintainer": {
138+
"@type": "Person",
139+
"@id": "https://orcid.org/1824-0098",
140+
"familyName": "Tchaikovsky",
141+
"givenName": "Pyotr",
142+
"email": "p.tch@russia.ru",
143+
"affiliation": {
144+
"@type": "Organization",
145+
"name": "Saint Petersburg"
146+
}
147+
},
148+
"storageRequirements": "12",
149+
"memoryRequirements": [
150+
"4",
151+
"6"
152+
],
153+
"processorRequirements": "MIPS",
154+
"softwareHelp": "https://software.help.com"
155+
}

CodeMeta/conversionsValidations.php

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
<?php
2+
3+
/**
4+
* @Author: Ramy-Badr-Ahmed
5+
* @Desc: Codemeta conversions
6+
* @Repo: https://github.com/dagstuhl-publishing/beta-codemeta-crosswalk
7+
*/
8+
9+
return [
10+
"rules" => [
11+
"bibTex" => [
12+
'name' => 'required',
13+
'identifier' => 'required',
14+
'author.*.givenName' => 'required_with:author.*.familyName',
15+
'author.*.familyName' => 'required_with:author.*.givenName',
16+
],
17+
"bibLaTex" => [
18+
'name' => 'required',
19+
'dateCreated' => 'required',
20+
'dateModified' => 'required_with:version',
21+
'publisher.url' => 'required',
22+
'identifier' => 'required',
23+
'author.*.givenName' => 'required',
24+
'author.*.familyName' => 'required',
25+
],
26+
"dataCite" => [
27+
'name' => 'required',
28+
'datePublished' => 'required',
29+
'publisher.name' => 'required',
30+
'identifier' => 'required',
31+
'funder.name' => 'required_with:funder.@id',
32+
'funder.*.name' => 'required_with:funder.*.@id',
33+
'funder.@id' => 'required_with:funder.name',
34+
'funder.*.@id' => 'required_with:funder.*.name',
35+
'author.*.givenName' => 'required',
36+
'author.*.familyName' => 'required',
37+
'contributor.*.givenName' => 'required_with:contributor.*.familyName',
38+
'contributor.*.familyName' => 'required_with:contributor.*.givenName',
39+
'contributor.givenName' => 'required_with:contributor.familyName',
40+
'contributor.familyName' => 'required_with:contributor.givenName',
41+
],
42+
"codeMeta" => [
43+
'publisher' => 'string|required_with:url',
44+
'url' => 'url|nullable',
45+
'downloadUrl' => 'url|nullable',
46+
'installUrl' => 'url|nullable',
47+
'buildInstructions' => 'url|nullable',
48+
'isPartOf' => 'url|nullable',
49+
'hasPart' => 'url|nullable',
50+
'readme' => 'url|nullable',
51+
'codeRepository' => 'url|nullable',
52+
'contIntegration' => 'url|nullable',
53+
'issueTracker' => 'url|nullable',
54+
'referencePublication' => 'url|nullable',
55+
'funder.name' => 'string|required_with:funder.@id,funder.funding',
56+
'funder.*.name' => 'string|required_with:funder.*.@id,funder.*.funding',
57+
'funder.@id' => 'url|nullable',
58+
'funder.*.@id' => 'url|nullable',
59+
'author.*.givenName' => 'string|required',
60+
'author.*.email' => 'email|nullable',
61+
'author.*.@id' => 'url|nullable',
62+
'contributor.*.email' => 'email|nullable',
63+
'contributor.email' => 'email|nullable',
64+
'contributor.*.@id' => 'url|nullable',
65+
'contributor.@id' => 'url|nullable',
66+
'maintainer.*.email' => 'email|nullable',
67+
'maintainer.email' => 'email|nullable',
68+
'maintainer.*.@id' => 'url|nullable',
69+
'maintainer.@id' => 'url|nullable',
70+
]
71+
],
72+
"messages" => [
73+
"bibTex" => [
74+
'name.required' => 'bibTex: The :attribute cannot be empty',
75+
'identifier.required' => 'bibTex: The :attribute cannot be empty',
76+
'author.*.givenName.required_with' => 'bibTex: @:position firstName is required with lastName',
77+
'author.*.familyName.required_with' => 'bibTex: @:position lastName is required with firstName'
78+
],
79+
"bibLaTex" => [
80+
'name.required' => 'bibLaTex: The :attribute cannot be empty',
81+
'dateCreated.required' => 'bibLaTex: Creation date cannot be empty',
82+
'dateModified.required_with' => 'bibLaTex: :attribute cannot be empty with non-empty version',
83+
'publisher.url.required' => 'bibLaTex: Publication URL cannot be empty',
84+
'identifier.required' => 'bibLaTex: The :attribute cannot be empty',
85+
'author.*.givenName.required' => 'bibLaTex: Author :position firstName cannot be empty',
86+
'author.*.familyName.required' => 'bibLaTex: Author :position lastName cannot be empty'
87+
],
88+
"dataCite" => [
89+
'name.required' => 'dataCite: The :attribute cannot be empty',
90+
'datePublished.required' => 'dataCite: Publication date cannot be empty',
91+
'publisher.name.required' => 'dataCite: Publisher cannot be empty',
92+
'identifier.required' => 'dataCite: The :attribute cannot be empty',
93+
'funder.*.name.required_with' => "dataCite :attribute cannot be empty with non-empty URI",
94+
'funder.name.required_with' => "dataCite :attribute cannot be empty with non-empty URI",
95+
'funder.*.@id.required_with' => "dataCite: :attribute cannot be empty with non-empty Funder",
96+
'funder.@id.required_with' => "dataCite: :attribute cannot be empty with non-empty Funder",
97+
'author.*.givenName.required' => 'dataCite: Author :position firstName cannot be empty',
98+
'author.*.familyName.required' => 'dataCite: Author :position lastName cannot be empty',
99+
'contributor.*.givenName.required_with' => 'dataCite: Contributor :position firstName cannot be empty with non-empty lastName',
100+
'contributor.*.familyName.required_with' => 'dataCite: Contributor :position lastName cannot be empty with non-empty firstName',
101+
'contributor.givenName.required_with' => 'dataCite: Contributor firstName cannot be empty with non-empty lastName',
102+
'contributor.familyName.required_with' => 'dataCite: Contributor lastName cannot be empty with non-empty firstName',
103+
],
104+
"codeMeta" => [
105+
'publisher.required_with' => 'codeMeta: :attribute must be provided if its URL is',
106+
'url.url' => 'codeMeta: Please provide a valid URL',
107+
'installUrl.url' => 'codeMeta: Please provide a valid URL',
108+
'downloadUrl.url' => 'codeMeta: Please provide a valid URL',
109+
'buildInstructions.url' => 'codeMeta: Please provide a valid URL',
110+
'isPartOf.url' => 'codeMeta: Please provide a valid URL',
111+
'hasPart.url' => 'codeMeta: Please provide a valid URL',
112+
'readme.url' => 'codeMeta: Please provide a valid URL',
113+
'codeRepository.url' => 'codeMeta: Please provide a valid URL',
114+
'contIntegration.url' => 'codeMeta: Please provide a valid URL',
115+
'issueTracker.url' => 'codeMeta: Please provide a valid URL',
116+
'referencePublication.url' => 'codeMeta: Please provide a valid URL',
117+
'funder.name.required_with' => "codeMeta: :attribute cannot be empty with non-empty URI/Funding",
118+
'funder.*.name.required_with' => "codeMeta: :attribute cannot be empty with non-empty URI/Funding",
119+
'funder.*.@id.url' => "codeMeta: Funder :position URL is invalid",
120+
'funder.@id.url' => "codeMeta: Funder URL is invalid",
121+
'author.*.givenName.required' => "codeMeta: Author :position name cannot be empty",
122+
'author.*.email.email' => "codeMeta: Author :position email is invalid",
123+
'author.*.@id.url' => "codeMeta: Author :position URL is invalid",
124+
'contributor.*.email.email' => "codeMeta: Contributor :position email is invalid",
125+
'contributor.email.email' => "codeMeta: Contributor :position email is invalid",
126+
'contributor.*.@id.url' => "codeMeta: Contributor :position URL is invalid",
127+
'contributor.@id.url' => "codeMeta: Contributor :position URL is invalid",
128+
'maintainer.*.email.email' => "codeMeta: Maintainer :position email is invalid",
129+
'maintainer.email.email' => "codeMeta: Maintainer :position email is invalid",
130+
'maintainer.*.@id.url' => "codeMeta: Maintainer :position URL is invalid",
131+
'maintainer.@id.url' => "codeMeta: Maintainer :position URL is invalid",
132+
]
133+
],
134+
"attributes" => [
135+
"bibTex" => [
136+
'name' => 'SW Name used for bibTex key',
137+
'identifier' => 'identifier used for bibTex key'
138+
],
139+
"bibLaTex" => [
140+
'name' => 'SW Name used for bibLaTex key',
141+
'identifier' => 'identifier used for bibLaTex key',
142+
'dateModified' => 'Release Date'
143+
],
144+
"dataCite" => [
145+
'name' => 'SW Name used for dataCite titles',
146+
'identifier' => 'identifier used for dataCite identifiers',
147+
'funder.*.name' => 'Funder :position',
148+
'funder.name' => 'Funder Name',
149+
'funder.*.@id' => 'Funder :position URI',
150+
'funder.@id' => 'Funder URI',
151+
],
152+
"codeMeta" => [
153+
'publisher' => 'Publisher name',
154+
'funder.*.name' => 'Funder :position',
155+
'funder.name' => 'Funder Name',
156+
]
157+
]
158+
];
159+

0 commit comments

Comments
 (0)