No project description provided
Project description
OARepo DOI
Configuration example
DATACITE_URL = 'https://api.test.datacite.org/dois'
DATACITE_MAPPING = {'local://documents-1.0.0.json':"common.mapping.DataCiteMappingNRDocs"}
DATACITE_MODE = "AUTOMATIC_DRAFT"
DATACITE_CREDENTIALS = {"generic": {"prefix": "10.23644" , "password": "yyyy", "username": "xxx"}}
DATACITE_CREDENTIALS_DEFAULT = {"prefix": "10.23644" , "password": "yyy", "username": "xxxx"}
DATACITE_SPECIFIED_ID = True
mode types:
AUTOMATIC_DRAFT- dois will be assigned automatically when draft is creadetAUTOMATIC- dois will be assigned automatically after publishON_EVENT- dois are assigned after request
DATACITE_SPECIFIED_ID
- Default value - False
- If true, the doi suffix will be the same as record pid
Mapping example
class DataCiteMappingNRDocs:
def metadata_check(self, data, errors=[]):
data = data["metadata"]
if "title" not in data:
errors.append("Title is mandatory")
return errors
def create_datacite_payload(self, data):
titles = {"title": "xy"}
payload = {
"data": {
"type": "dois",
"attributes": {
}
}
}
payload["data"]["attributes"]["titles"] = titles
return payload
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
oarepo_doi_tmp-1.0.20.tar.gz
(10.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oarepo_doi_tmp-1.0.20.tar.gz.
File metadata
- Download URL: oarepo_doi_tmp-1.0.20.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a93e4e38dc31f5b1290b3fc02e2ef21f492967c809bcdbf725925433eeb693a
|
|
| MD5 |
6307375326119264d85f4b7db620b352
|
|
| BLAKE2b-256 |
41e8ae94f7d0b9384a60516c026d7b285eaa5abaede9a0d94547abb0c0c803d0
|
File details
Details for the file oarepo_doi_tmp-1.0.20-py3-none-any.whl.
File metadata
- Download URL: oarepo_doi_tmp-1.0.20-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16edc9b9aace146279f8b00dba5f52ff75ad2b9dcc66dc657062289a03bdfddb
|
|
| MD5 |
f78024b91d39dd5157c80d77c33a2ffd
|
|
| BLAKE2b-256 |
9b175e7ab7bb66ab782ceaa0d020eb9664fe1e18a68966ceb4606ad1b7d453cb
|