Пример #1
0
def custom_relation_schema(app):
    """Fixture for PID relations config with custom schemas."""
    orig = app.config['PIDRELATIONS_RELATION_TYPES']
    app.config['PIDRELATIONS_RELATION_TYPES'] = [
        RelationType(0, 'ordered', 'Ordered',
                     'invenio_pidrelations.api:PIDConceptOrdered',
                     CustomRelationSchema),
        RelationType(1, 'unordered', 'Unordered',
                     'invenio_pidrelations.api:PIDConcept',
                     CustomRelationSchema),
        RelationType(2, 'version', 'Version',
                     'invenio_pidrelations.contrib.versioning:PIDVersioning',
                     CustomRelationSchema),
    ]
    yield app
    app.config['PIDRELATIONS_RELATION_TYPES'] = orig
Пример #2
0
def custom_relation_schema(app):
    """Fixture for PID relations config with custom schemas."""
    orig = app.config['PIDRELATIONS_RELATION_TYPES']
    app.config['PIDRELATIONS_RELATION_TYPES'] = [
        RelationType(
            0, 'version', 'Version', 'invenio_pidrelations.contrib.'
            'versioning:PIDNodeVersioning', CustomRelationSchema),
    ]
    yield app
    app.config['PIDRELATIONS_RELATION_TYPES'] = orig
Пример #3
0
#: DataCite API - Prefix for minting DOIs in (10.5072 is a test prefix).
PIDSTORE_DATACITE_DOI_PREFIX = "10.5072"
#: DataCite MDS username.
PIDSTORE_DATACITE_USERNAME = "******"
#: DataCite MDS password.
PIDSTORE_DATACITE_PASSWORD = "******"
#: DataCite updating rate.
DATACITE_UPDATING_RATE_PER_HOUR = 1000
#: DataCite max description length
DATACITE_MAX_DESCRIPTION_SIZE = 20000

#: Zenodo PID relations
PIDRELATIONS_RELATION_TYPES = [
    RelationType(
        0, 'version', 'Version',
        'invenio_pidrelations.contrib.versioning:PIDVersioning',
        'zenodo.modules.records.serializers.schemas.pidrelations:'
        'VersionRelation'),
    RelationType(1, 'record_draft', 'Record Draft',
                 'invenio_pidrelations.contrib.records:RecordDraft', None),
]

#: Enable the DataCite minding of DOIs after Deposit publishing
DEPOSIT_DATACITE_MINTING_ENABLED = False

# Debug
# =====
#: Do not allow DebugToolbar to redirects redirects.
DEBUG_TB_INTERCEPT_REDIRECTS = False

# Assets