Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions data/collections/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[
{
"description": [
{
"language": "eng",
"value": "A collection to list the **best** fictive research in the institution.\n\n1. Quality\n2. Age\n3. Epistemology"
},
{
"language": "fre",
"value": "Une collection visant \u00e0 r\u00e9pertorier les **meilleures** recherches fictives men\u00e9es au sein de l'institution.\n\n1. Qualit\u00e9\n2. \u00c2ge\n3. \u00c9pist\u00e9mologie"
}
],
"name": [
{ "language": "eng", "value": "Brand new research" },
{ "language": "fre", "value": "Recherches flambant neuves" }
],
"organisation": {
"$ref": "https://sonar.ch/api/organisations/fictivededicated"
},
"files": [
{
"key": "brand_new_research.png",
"path": "./files/brand_new_research.png"
}
]
}
]
Binary file added data/collections/files/brand_new_research.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
126 changes: 126 additions & 0 deletions data/deposits.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
[
{
"logs": [
{
"date": "2025-09-30T13:38:57.921169+00:00",
"user": "[email protected]",
"action": "submit"
}
],
"step": "diffusion",
"user": "[email protected]",
"status": "to_validate",
"$schema": "https://sonar.ch/schemas/deposits/deposit-v1.0.0.json",
"metadata": {
"title": "Methodology in research papers",
"language": "eng",
"subtitle": "an analysis",
"publication": {
"pages": "132-134",
"number": "8",
"volume": "56",
"publishedIn": "Science"
},
"customField1": ["Probable"],
"documentDate": "2018",
"documentType": "coar:c_3e5a",
"identifiedBy": [
{ "type": "uri", "value": "https://scholar.google.com/" }
],
"classification": "65",
"otherLanguageTitle": {
"title": "La m\u00e9thodolgie dans les travaux de recherche",
"language": "fre"
}
},
"diffusion": { "masked": "not_masked", "license": "CC BY-SA" },
"contributors": [
{
"name": "Jack Dyke",
"role": "cre",
"affiliation": "UNIL",
"date_of_birth": "1985"
},
{
"name": "Robert Zenem",
"role": "ctb",
"affiliation": "HEP Valais",
"date_of_birth": "1991"
}
]
},
{
"logs": [
{
"date": "2025-10-02T06:07:21.087327+00:00",
"user": "[email protected]",
"action": "submit"
},
{
"date": "2025-10-02T06:12:24.119853+00:00",
"user": "[email protected]",
"action": "ask_for_changes",
"comment": "Corriger la faute de frappe dans le titre, merci"
},
{
"date": "2025-10-02T06:16:52.634537+00:00",
"user": "[email protected]",
"action": "submit"
},
{
"date": "2025-10-02T06:17:41.003113+00:00",
"user": "[email protected]",
"action": "ask_for_changes",
"comment": "There is still an error in the title"
}
],
"step": "diffusion",
"user": "[email protected]",
"status": "ask_for_changes",
"$schema": "https://sonar.ch/schemas/deposits/deposit-v1.0.0.json",
"metadata": {
"title": "Conferences about information tehcnology",
"language": "eng",
"subtitle": "using Python in libraries",
"documentDate": "2016",
"documentType": "coar:c_18cp"
},
"diffusion": { "masked": "not_masked", "license": "License undefined" },
"contributors": [{ "name": "Marvin Straite", "role": "cre" }]
},
{
"step": "contributors",
"user": "[email protected]",
"status": "in_progress",
"$schema": "https://sonar.ch/schemas/deposits/deposit-v1.0.0.json",
"_bucket": "d96ae40a-6f39-4905-a7a1-0fe8229c55d5",
"metadata": {
"title": "In progress",
"language": "ger",
"documentDate": "2023",
"documentType": "coar:c_816b"
}
},
{
"step": "diffusion",
"user": "[email protected]",
"status": "in_progress",
"$schema": "https://sonar.ch/schemas/deposits/deposit-v1.0.0.json",
"metadata": {
"title": "The sun and its effects on mood",
"language": "fre",
"subjects": [{ "language": "fre", "subjects": ["Psychologie"] }],
"subtitle": "meta-analysis",
"documentDate": "2026",
"documentType": "coar:c_8544"
},
"diffusion": {
"masked": "not_masked",
"license": "CC BY",
"oa_status": "green"
},
"contributors": [
{ "name": "Bobby Kanotedit", "role": "cre", "affiliation": "UNIGE" }
]
}
]
18 changes: 18 additions & 0 deletions data/projects.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"metadata": {
"name": "Study of paper submissions",
"validation": {
"status": "in_progress",
"action": "save",
"user": "[email protected]"
},
"description": "We want to submit all sorts of papers",
"startDate": "2025-09-15",
"organisation": {
"$ref": "https://sonar.ch/api/organisations/fictivededicated"
},
"user": "[email protected]"
}
}
]
14 changes: 14 additions & 0 deletions data/subdivisions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"name": [{ "language": "fre", "value": "Facult\u00e9 des lettres" }],
"organisation": {
"$ref": "https://sonar.ch/api/organisations/fictivededicated"
}
},
{
"name": [{ "language": "fre", "value": "Facult\u00e9 des sciences" }],
"organisation": {
"$ref": "https://sonar.ch/api/organisations/fictivededicated"
}
}
]
12 changes: 8 additions & 4 deletions data/users/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
"phone": "+41627676171",
"organisation": {
"$ref": "https://sonar.ch/api/organisations/fictivededicated"
}
},
"subdivision": {"$ref": "https://sonar.ch/api/subdivisions/1"}
},
{
"first_name": "James",
Expand All @@ -132,7 +133,8 @@
"phone": "+41269639084",
"organisation": {
"$ref": "https://sonar.ch/api/organisations/fictivededicated"
}
},
"subdivision": {"$ref": "https://sonar.ch/api/subdivisions/1"}
},
{
"first_name": "Gabriel",
Expand All @@ -147,7 +149,8 @@
"phone": "+41914105597",
"organisation": {
"$ref": "https://sonar.ch/api/organisations/fictivededicated"
}
},
"subdivision": {"$ref": "https://sonar.ch/api/subdivisions/2"}
},
{
"first_name": "Michèle",
Expand All @@ -162,7 +165,8 @@
"phone": "+41225022590",
"organisation": {
"$ref": "https://sonar.ch/api/organisations/fictivededicated"
}
},
"subdivision": {"$ref": "https://sonar.ch/api/subdivisions/2"}
},
{
"first_name": "Shakira",
Expand Down
16 changes: 14 additions & 2 deletions scripts/setup
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ invenio flask_wiki index

# Create users and organisations
section "Create organisations" "info"
invenio fixtures organisations import "${fixtures_folder}/organisations/data.json"
invenio fixtures import "${fixtures_folder}/organisations/data.json" org

section "Create subdivisions" "info"
invenio fixtures import "${fixtures_folder}/subdivisions.json" subd

# Create OAI sets for organisations
section "Create organisations OAI sets" "info"
Expand All @@ -105,7 +108,16 @@ invenio documents oai create-set fictiveshared "École des hautes études partag
section "Create users" "info"
invenio fixtures users import "${fixtures_folder}/users/data.json"

section "Create collections" "info"
invenio fixtures import "${fixtures_folder}/collections/data.json" coll

section "Create projects" "info"
invenio fixtures import "${fixtures_folder}/projects.json" projects

section "Create deposits" "info"
invenio fixtures import --random-files "${fixtures_folder}/deposits.json" depo

section "Create documents" "info"
invenio fixtures documents import "${fixtures_folder}/documents/data.json"
invenio fixtures import --random-files "${fixtures_folder}/documents/data.json" doc

message "\nInstallation finished successfully" "success"
Loading