Coverage for oc_meta / constants.py: 100%
9 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-04-21 09:24 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-04-21 09:24 +0000
1#!/usr/bin/python
3# SPDX-FileCopyrightText: 2022-2025 Arcangelo Massari <arcangelo.massari@unibo.it>
4#
5# SPDX-License-Identifier: ISC
7from oc_ocdm.graph.graph_entity import GraphEntity
10FORBIDDEN_IDS = {'issn:0000-0000'}
12# QLever-optimized SPARQL query constants
13QLEVER_BATCH_SIZE = 30
14QLEVER_MAX_WORKERS = 24
15QLEVER_QUERIES_PER_GROUP = 100
17VENUES = {'archival-document', 'book', 'book-part', 'book-section', 'book-series', 'book-set', 'edited-book', 'journal', 'journal-volume', 'journal-issue', 'monograph', 'proceedings-series', 'proceedings', 'reference-book', 'report-series', 'standard-series'}
18CONTAINER_EDITOR_TYPES = {'book chapter', 'book part', 'book section', 'book track', 'component', 'proceedings article', 'reference entry'}
19VALID_ENTITY_TYPES = frozenset({
20 'abstract', 'archival document', 'audio document', 'book', 'book chapter',
21 'book part', 'book section', 'book series', 'book set', 'computer program',
22 'data file', 'data management plan', 'dataset', 'dissertation', 'editorial',
23 'journal', 'journal article', 'journal editorial', 'journal issue',
24 'journal volume', 'newspaper', 'newspaper article', 'newspaper editorial',
25 'newspaper issue', 'peer review', 'preprint', 'presentation', 'proceedings',
26 'proceedings article', 'proceedings series', 'reference book', 'reference entry',
27 'retraction notice', 'series', 'report', 'standard', 'web content',
28})
30# Constants for bibliographic resources that cannot contain other resources
31ROOT_CONTAINER_TYPES = {
32 GraphEntity.iri_journal_article, # fabio:JournalArticle
33 GraphEntity.iri_book_chapter, # fabio:BookChapter
34 GraphEntity.iri_proceedings_paper, # fabio:ProceedingsPaper
35 GraphEntity.iri_journal_editorial, # fabio:JournalEditorial
36 GraphEntity.iri_newspaper_article, # fabio:NewspaperArticle
37 GraphEntity.iri_newspaper_editorial, # fabio:NewspaperEditorial
38 GraphEntity.iri_reference_entry, # fabio:ReferenceEntry
39 GraphEntity.iri_retraction_notice, # fabio:RetractionNotice
40 GraphEntity.iri_peer_review, # fabio:PeerReview
41 GraphEntity.iri_data_file, # fabio:DataFile
42 GraphEntity.iri_computer_program, # fabio:ComputerProgram
43 GraphEntity.iri_presentation, # fabio:Presentation
44 GraphEntity.iri_web_content, # fabio:WebContent
45 GraphEntity.iri_data_management_plan, # fabio:DataManagementPlan
46 GraphEntity.iri_abstract, # fabio:Abstract
47 GraphEntity.iri_editorial, # fabio:Editorial
48 GraphEntity.iri_preprint, # fabio:Preprint
49}