Skip to main content

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 creadet
  • AUTOMATIC - dois will be assigned automatically after publish
  • ON_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


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.21.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oarepo_doi_tmp-1.0.21-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file oarepo_doi_tmp-1.0.21.tar.gz.

File metadata

  • Download URL: oarepo_doi_tmp-1.0.21.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

Hashes for oarepo_doi_tmp-1.0.21.tar.gz
Algorithm Hash digest
SHA256 666132bdbae1fca6ab953557ebff5071aacd1869f809c2198afd7e00aeff2ffa
MD5 c1c8586adc527bc4a165cb5968468d6d
BLAKE2b-256 ec4fdbc895d39ace7d280ae488963307e02517dc147a6f4f6fc56dae6c4ddff0

See more details on using hashes here.

File details

Details for the file oarepo_doi_tmp-1.0.21-py3-none-any.whl.

File metadata

File hashes

Hashes for oarepo_doi_tmp-1.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 aa1af6f1d4a5cf5e6355bf06b9be8bc25aca225691e520d04e7a1656d80dfa21
MD5 b063033ddcfb6fb6c7ac8080e0a89f1b
BLAKE2b-256 7f558348d39aa848720de87855af891fa72dfe95ef4fb9e7ba8818bfd371443e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page