-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from neicnordic/feature/dois
Datacite DOIs and REMS integration
- Loading branch information
Showing
14 changed files
with
727 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
amqpstorm | ||
jsonschema | ||
jsonschema | ||
httpx | ||
shortuuid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
"""SDA Orchestrator service for coordinating messages and mapping file id to dataset id.""" | ||
|
||
__title__ = "sda_orchestrator" | ||
__version__ = "0.4.0" | ||
__version__ = "0.50" | ||
__author__ = "NeIC System Developers" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""SDA orchestrator configuration. | ||
Configuration required for DOIs, REMS and other metadata. | ||
""" | ||
|
||
from os import environ, strerror | ||
from pathlib import Path | ||
from typing import Dict | ||
import json | ||
import errno | ||
|
||
from ..utils.logger import LOG | ||
|
||
|
||
def parse_config_file(config_file: str) -> Dict: | ||
"""Load JSON schemas.""" | ||
file_path = Path(config_file) | ||
if not file_path.is_file(): | ||
LOG.error(f"File {file_path} not found") | ||
raise FileNotFoundError(errno.ENOENT, strerror(errno.ENOENT), file_path) | ||
with open(file_path, "r") as fp: | ||
return json.load(fp) | ||
|
||
|
||
CONFIG_INFO = parse_config_file( | ||
environ.get("CONFIG_FILE", str(Path(__file__).resolve().parent.joinpath("config.json"))) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
{ | ||
"rems": { | ||
"organization": { | ||
"id": "NeIC", | ||
"name": { | ||
"fi": "Nordic e-Infrastructure Collaboration", | ||
"en": "Nordic e-Infrastructure Collaboration" | ||
}, | ||
"shortName": { | ||
"fi": "NeIC", | ||
"en": "NeIC" | ||
} | ||
}, | ||
"license": { | ||
"localizations": { | ||
"en": { | ||
"title": "Creative Commons Attribution 4.0 International (CC BY 4.0)", | ||
"textcontent": "https://creativecommons.org/licenses/by/4.0/" | ||
}, | ||
"fi": { | ||
"title": "Nimeä 4.0 Kansainvälinen (CC BY 4.0)", | ||
"textcontent": "https://creativecommons.org/licenses/by/4.0/deed.fi" | ||
} | ||
} | ||
}, | ||
"form": { | ||
"title": "Base form", | ||
"fields": [ | ||
{ | ||
"field/id": "fld1", | ||
"field/type": "header", | ||
"field/title": { | ||
"en": "Base form for registering a resource", | ||
"fi": "Base form for registering a resource" | ||
}, | ||
"field/optional": false | ||
}, | ||
{ | ||
"field/id": "fld2", | ||
"field/type": "description", | ||
"field/title": { | ||
"en": "Title of the application", | ||
"fi": "Title of the application" | ||
}, | ||
"field/optional": true, | ||
"field/max-length": 100 | ||
}, | ||
{ | ||
"field/id": "fld3", | ||
"field/type": "option", | ||
"field/title": { | ||
"en": "Select type of submision", | ||
"fi": "Select type of submision" | ||
}, | ||
"field/options": [ | ||
{ | ||
"key": "fega", | ||
"label": { | ||
"en": "FEGA (Federated EGA)", | ||
"fi": "FEGA (Federated EGA)" | ||
} | ||
}, | ||
{ | ||
"key": "sda", | ||
"label": { | ||
"en": "SDA stand-alone", | ||
"fi": "SDA stand-alone" | ||
} | ||
} | ||
], | ||
"field/optional": false | ||
}, | ||
{ | ||
"field/id": "fld4", | ||
"field/type": "texta", | ||
"field/title": { | ||
"en": "Stand-alone SDA archive use case description", | ||
"fi": "Stand-alone SDA archive use case description" | ||
}, | ||
"field/privacy": "private", | ||
"field/optional": false, | ||
"field/max-length": 200, | ||
"field/visibility": { | ||
"visibility/type": "only-if", | ||
"visibility/field": { | ||
"field/id": "fld3" | ||
}, | ||
"visibility/values": [ | ||
"sda" | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"workflow": { | ||
"title": "Base workflow" | ||
}, | ||
"catalogueItem": { | ||
"baseResourceURL": "https://doi.org/" | ||
} | ||
}, | ||
"datacite": { | ||
"creators": [ | ||
{ | ||
"name": "Nordic e-Infrastructure Collaboration", | ||
"nameType": "Organizational", | ||
"affiliation": [ | ||
{ | ||
"name": "Nordic e-Infrastructure Collaboration", | ||
"schemeUri": "https://ror.org", | ||
"affiliationIdentifier": "https://ror.org/04jcwf484", | ||
"affiliationIdentifierScheme": "ROR" | ||
} | ||
] | ||
} | ||
], | ||
"publisher": "Nordic e-Infrastructure Collaboration", | ||
"subjects": [ | ||
{ | ||
"subject": "FOS: Biological sciences", | ||
"subjectScheme": "Fields of Science and Technology (FOS)" | ||
} | ||
], | ||
"resourceURL": "http://data-access.sd.neic.no", | ||
"titlePrefix": "Resource" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.