aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_tools/importers')
-rw-r--r--python/fatcat_tools/importers/arabesque.py4
-rw-r--r--python/fatcat_tools/importers/arxiv.py4
-rw-r--r--python/fatcat_tools/importers/chocula.py4
-rw-r--r--python/fatcat_tools/importers/common.py4
-rw-r--r--python/fatcat_tools/importers/crossref.py4
-rw-r--r--python/fatcat_tools/importers/datacite.py4
-rw-r--r--python/fatcat_tools/importers/dblp_container.py4
-rw-r--r--python/fatcat_tools/importers/dblp_release.py4
-rw-r--r--python/fatcat_tools/importers/doaj_article.py4
-rw-r--r--python/fatcat_tools/importers/file_meta.py4
-rw-r--r--python/fatcat_tools/importers/fileset_generic.py4
-rw-r--r--python/fatcat_tools/importers/grobid_metadata.py4
-rw-r--r--python/fatcat_tools/importers/ingest.py14
-rw-r--r--python/fatcat_tools/importers/jalc.py4
-rw-r--r--python/fatcat_tools/importers/journal_metadata.py4
-rw-r--r--python/fatcat_tools/importers/jstor.py4
-rw-r--r--python/fatcat_tools/importers/matched.py4
-rw-r--r--python/fatcat_tools/importers/orcid.py4
-rw-r--r--python/fatcat_tools/importers/pubmed.py4
-rw-r--r--python/fatcat_tools/importers/shadow.py4
20 files changed, 45 insertions, 45 deletions
diff --git a/python/fatcat_tools/importers/arabesque.py b/python/fatcat_tools/importers/arabesque.py
index 92289bb3..4702290a 100644
--- a/python/fatcat_tools/importers/arabesque.py
+++ b/python/fatcat_tools/importers/arabesque.py
@@ -1,7 +1,7 @@
from typing import Any, Dict, List, Optional
import fatcat_openapi_client
-from fatcat_openapi_client import ApiClient, FileEntity
+from fatcat_openapi_client import DefaultApi, FileEntity
from fatcat_tools.normal import b32_hex
@@ -42,7 +42,7 @@ class ArabesqueMatchImporter(EntityImporter):
"""
def __init__(
- self, api: ApiClient, extid_type: str, require_grobid: bool = True, **kwargs
+ self, api: DefaultApi, extid_type: str, require_grobid: bool = True, **kwargs
) -> None:
eg_desc = (
diff --git a/python/fatcat_tools/importers/arxiv.py b/python/fatcat_tools/importers/arxiv.py
index dd2c2284..22b8b2ea 100644
--- a/python/fatcat_tools/importers/arxiv.py
+++ b/python/fatcat_tools/importers/arxiv.py
@@ -6,7 +6,7 @@ from typing import Any, Dict, List, Optional
import fatcat_openapi_client
from bs4 import BeautifulSoup
-from fatcat_openapi_client import ApiClient, ReleaseEntity
+from fatcat_openapi_client import DefaultApi, ReleaseEntity
from pylatexenc.latex2text import LatexNodes2Text
from fatcat_tools.normal import clean_doi
@@ -92,7 +92,7 @@ class ArxivRawImporter(EntityImporter):
the "most recent" version; can be a simple sort?
"""
- def __init__(self, api: ApiClient, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, **kwargs) -> None:
eg_desc = kwargs.get(
"editgroup_description",
diff --git a/python/fatcat_tools/importers/chocula.py b/python/fatcat_tools/importers/chocula.py
index c44fec3b..e07651f7 100644
--- a/python/fatcat_tools/importers/chocula.py
+++ b/python/fatcat_tools/importers/chocula.py
@@ -1,7 +1,7 @@
from typing import Any, Dict, List, Optional
import fatcat_openapi_client
-from fatcat_openapi_client import ApiClient, ContainerEntity
+from fatcat_openapi_client import DefaultApi, ContainerEntity
from fatcat_tools.normal import clean_str
@@ -17,7 +17,7 @@ class ChoculaImporter(EntityImporter):
See guide for details on the many 'extra' fields used here.
"""
- def __init__(self, api: ApiClient, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, **kwargs) -> None:
eg_desc = kwargs.get(
"editgroup_description",
diff --git a/python/fatcat_tools/importers/common.py b/python/fatcat_tools/importers/common.py
index e2157ee5..ca4739a1 100644
--- a/python/fatcat_tools/importers/common.py
+++ b/python/fatcat_tools/importers/common.py
@@ -17,7 +17,7 @@ import lxml
from bs4 import BeautifulSoup
from confluent_kafka import Consumer, KafkaException
from fatcat_openapi_client import (
- ApiClient,
+ DefaultApi,
ContainerEntity,
EntityEdit,
FileEntity,
@@ -92,7 +92,7 @@ class EntityImporter:
implementors must write insert_batch appropriately
"""
- def __init__(self, api: ApiClient, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, **kwargs) -> None:
eg_extra = kwargs.get("editgroup_extra", dict())
eg_extra["git_rev"] = eg_extra.get(
diff --git a/python/fatcat_tools/importers/crossref.py b/python/fatcat_tools/importers/crossref.py
index 52bd7465..ca0b489d 100644
--- a/python/fatcat_tools/importers/crossref.py
+++ b/python/fatcat_tools/importers/crossref.py
@@ -2,7 +2,7 @@ import datetime
from typing import Any, Dict, List, Optional, Sequence
import fatcat_openapi_client
-from fatcat_openapi_client import ApiClient, ReleaseContrib, ReleaseEntity
+from fatcat_openapi_client import DefaultApi, ReleaseContrib, ReleaseEntity
from fatcat_tools.biblio_lookup_tables import CONTAINER_TYPE_MAP
from fatcat_tools.normal import clean_doi, clean_str, lookup_license_slug
@@ -42,7 +42,7 @@ class CrossrefImporter(EntityImporter):
See https://github.com/CrossRef/rest-api-doc for JSON schema notes
"""
- def __init__(self, api: ApiClient, issn_map_file: Sequence, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, issn_map_file: Sequence, **kwargs) -> None:
eg_desc: Optional[str] = kwargs.get(
"editgroup_description",
diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py
index b310f8bc..db6302e5 100644
--- a/python/fatcat_tools/importers/datacite.py
+++ b/python/fatcat_tools/importers/datacite.py
@@ -19,7 +19,7 @@ import dateparser
import fatcat_openapi_client
import langdetect
import pycountry
-from fatcat_openapi_client import ApiClient, ReleaseContrib, ReleaseEntity
+from fatcat_openapi_client import DefaultApi, ReleaseContrib, ReleaseEntity
from fatcat_tools.biblio_lookup_tables import DATACITE_TYPE_MAP
from fatcat_tools.normal import clean_doi, clean_str, lookup_license_slug
@@ -94,7 +94,7 @@ class DataciteImporter(EntityImporter):
def __init__(
self,
- api: ApiClient,
+ api: DefaultApi,
issn_map_file: Sequence,
debug: bool = False,
insert_log_file: bool = None,
diff --git a/python/fatcat_tools/importers/dblp_container.py b/python/fatcat_tools/importers/dblp_container.py
index 36fe5f00..378945af 100644
--- a/python/fatcat_tools/importers/dblp_container.py
+++ b/python/fatcat_tools/importers/dblp_container.py
@@ -7,7 +7,7 @@ import sys # noqa: F401
from typing import Any, Dict, List, Optional, Sequence
import fatcat_openapi_client
-from fatcat_openapi_client import ApiClient, ContainerEntity
+from fatcat_openapi_client import DefaultApi, ContainerEntity
from fatcat_tools.importers.common import EntityImporter
from fatcat_tools.normal import clean_str
@@ -16,7 +16,7 @@ from fatcat_tools.normal import clean_str
class DblpContainerImporter(EntityImporter):
def __init__(
self,
- api: ApiClient,
+ api: DefaultApi,
issn_map_file: Sequence,
dblp_container_map_file: Sequence,
dblp_container_map_output: Any,
diff --git a/python/fatcat_tools/importers/dblp_release.py b/python/fatcat_tools/importers/dblp_release.py
index 5f78ca3a..b7880292 100644
--- a/python/fatcat_tools/importers/dblp_release.py
+++ b/python/fatcat_tools/importers/dblp_release.py
@@ -28,7 +28,7 @@ from typing import Any, Dict, List, Optional, Sequence
import bs4
import fatcat_openapi_client
-from fatcat_openapi_client import ApiClient, ReleaseEntity
+from fatcat_openapi_client import DefaultApi, ReleaseEntity
from fatcat_tools.importers.common import EntityImporter
from fatcat_tools.normal import (
@@ -46,7 +46,7 @@ from fatcat_tools.transforms import entity_to_dict
class DblpReleaseImporter(EntityImporter):
def __init__(
- self, api: ApiClient, dblp_container_map_file: Optional[Sequence] = None, **kwargs
+ self, api: DefaultApi, dblp_container_map_file: Optional[Sequence] = None, **kwargs
) -> None:
eg_desc = kwargs.get(
diff --git a/python/fatcat_tools/importers/doaj_article.py b/python/fatcat_tools/importers/doaj_article.py
index 92dbe574..5a3d79bd 100644
--- a/python/fatcat_tools/importers/doaj_article.py
+++ b/python/fatcat_tools/importers/doaj_article.py
@@ -9,7 +9,7 @@ import warnings
from typing import Any, Dict, List, Optional, Sequence
import fatcat_openapi_client
-from fatcat_openapi_client import ApiClient, ReleaseEntity
+from fatcat_openapi_client import DefaultApi, ReleaseEntity
from fatcat_tools.importers.common import MAX_ABSTRACT_LENGTH, EntityImporter
from fatcat_tools.normal import (
@@ -26,7 +26,7 @@ from fatcat_tools.normal import (
class DoajArticleImporter(EntityImporter):
- def __init__(self, api: ApiClient, issn_map_file: Sequence, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, issn_map_file: Sequence, **kwargs) -> None:
eg_desc = kwargs.get(
"editgroup_description",
diff --git a/python/fatcat_tools/importers/file_meta.py b/python/fatcat_tools/importers/file_meta.py
index 892c1dcd..a7d69320 100644
--- a/python/fatcat_tools/importers/file_meta.py
+++ b/python/fatcat_tools/importers/file_meta.py
@@ -1,7 +1,7 @@
from typing import Any, Dict
import fatcat_openapi_client
-from fatcat_openapi_client import ApiClient, FileEntity
+from fatcat_openapi_client import DefaultApi, FileEntity
from .common import EntityImporter
@@ -17,7 +17,7 @@ class FileMetaImporter(EntityImporter):
imported which were missing file size, mimetype, md5, and/or sha256.
"""
- def __init__(self, api: ApiClient, require_grobid: bool = True, **kwargs):
+ def __init__(self, api: DefaultApi, require_grobid: bool = True, **kwargs):
eg_desc = kwargs.pop("editgroup_description", None) or "File metadata updates"
eg_extra = kwargs.pop("editgroup_extra", dict())
diff --git a/python/fatcat_tools/importers/fileset_generic.py b/python/fatcat_tools/importers/fileset_generic.py
index d0c8b221..bb90a18f 100644
--- a/python/fatcat_tools/importers/fileset_generic.py
+++ b/python/fatcat_tools/importers/fileset_generic.py
@@ -1,7 +1,7 @@
from typing import Any, Dict, List, Optional
import fatcat_openapi_client
-from fatcat_openapi_client import ApiClient, FilesetEntity
+from fatcat_openapi_client import DefaultApi, FilesetEntity
from fatcat_tools import entity_from_dict
@@ -20,7 +20,7 @@ class FilesetImporter(EntityImporter):
Currently only creates (insert), no updates.
"""
- def __init__(self, api: ApiClient, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, **kwargs) -> None:
eg_desc = kwargs.pop("editgroup_description", None) or "Generic Fileset entity import"
eg_extra = kwargs.pop("editgroup_extra", dict())
diff --git a/python/fatcat_tools/importers/grobid_metadata.py b/python/fatcat_tools/importers/grobid_metadata.py
index 3c85132c..ec920a16 100644
--- a/python/fatcat_tools/importers/grobid_metadata.py
+++ b/python/fatcat_tools/importers/grobid_metadata.py
@@ -5,7 +5,7 @@ import json
from typing import Any, Dict, List, Optional
import fatcat_openapi_client
-from fatcat_openapi_client import ApiClient, FileEntity, ReleaseEntity
+from fatcat_openapi_client import DefaultApi, FileEntity, ReleaseEntity
from fatcat_tools.normal import clean_doi, clean_str
@@ -24,7 +24,7 @@ class GrobidMetadataImporter(EntityImporter):
TODO: relaxing 'None' constraint on parse_record() might make this refactor-able.
"""
- def __init__(self, api: ApiClient, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, **kwargs) -> None:
eg_desc = kwargs.get(
"editgroup_description",
diff --git a/python/fatcat_tools/importers/ingest.py b/python/fatcat_tools/importers/ingest.py
index 4f1cc3c4..3dea0446 100644
--- a/python/fatcat_tools/importers/ingest.py
+++ b/python/fatcat_tools/importers/ingest.py
@@ -3,7 +3,7 @@ from typing import Any, Dict, List, Optional
import fatcat_openapi_client
from fatcat_openapi_client import (
- ApiClient,
+ DefaultApi,
FileEntity,
FilesetEntity,
FilesetUrl,
@@ -16,7 +16,7 @@ from .common import EntityImporter, make_rel_url
class IngestFileResultImporter(EntityImporter):
def __init__(
- self, api: fatcat_openapi_client.ApiClient, require_grobid: bool = True, **kwargs
+ self, api: fatcat_openapi_client.DefaultApi, require_grobid: bool = True, **kwargs
) -> None:
eg_desc = (
@@ -369,7 +369,7 @@ class SavePaperNowFileImporter(IngestFileResultImporter):
them for further human review (as opposed to accepting by default).
"""
- def __init__(self, api: ApiClient, submit_mode: bool = True, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, submit_mode: bool = True, **kwargs) -> None:
eg_desc = (
kwargs.pop("editgroup_description", None)
@@ -408,7 +408,7 @@ class IngestWebResultImporter(IngestFileResultImporter):
into webcapture objects.
"""
- def __init__(self, api: ApiClient, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, **kwargs) -> None:
eg_desc = (
kwargs.pop("editgroup_description", None)
@@ -576,7 +576,7 @@ class SavePaperNowWebImporter(IngestWebResultImporter):
Like SavePaperNowFileImporter, but for webcapture (HTML) ingest.
"""
- def __init__(self, api: ApiClient, submit_mode: bool = True, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, submit_mode: bool = True, **kwargs) -> None:
eg_desc = (
kwargs.pop("editgroup_description", None)
@@ -628,7 +628,7 @@ class IngestFilesetResultImporter(IngestFileResultImporter):
results into fileset objects.
"""
- def __init__(self, api: ApiClient, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, **kwargs) -> None:
eg_desc = (
kwargs.pop("editgroup_description", None)
@@ -854,7 +854,7 @@ class SavePaperNowFilesetImporter(IngestFilesetResultImporter):
Like SavePaperNowFileImporter, but for fileset/dataset ingest.
"""
- def __init__(self, api: ApiClient, submit_mode: bool = True, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, submit_mode: bool = True, **kwargs) -> None:
eg_desc = (
kwargs.pop("editgroup_description", None)
diff --git a/python/fatcat_tools/importers/jalc.py b/python/fatcat_tools/importers/jalc.py
index 9916a55f..8740d3ff 100644
--- a/python/fatcat_tools/importers/jalc.py
+++ b/python/fatcat_tools/importers/jalc.py
@@ -4,7 +4,7 @@ from typing import Any, Dict, List, Optional, Sequence
import fatcat_openapi_client
from bs4 import BeautifulSoup
-from fatcat_openapi_client import ApiClient, ReleaseContrib, ReleaseEntity
+from fatcat_openapi_client import DefaultApi, ReleaseContrib, ReleaseEntity
from fatcat_tools.normal import clean_doi, clean_str, is_cjk
@@ -102,7 +102,7 @@ class JalcImporter(EntityImporter):
NOTE: some JALC DOIs seem to get cross-registered with Crossref
"""
- def __init__(self, api: ApiClient, issn_map_file: Sequence, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, issn_map_file: Sequence, **kwargs) -> None:
eg_desc = kwargs.get("editgroup_description", "Automated import of JALC DOI metadata")
eg_extra = kwargs.get("editgroup_extra", dict())
diff --git a/python/fatcat_tools/importers/journal_metadata.py b/python/fatcat_tools/importers/journal_metadata.py
index fc1dfcbd..4a7a103f 100644
--- a/python/fatcat_tools/importers/journal_metadata.py
+++ b/python/fatcat_tools/importers/journal_metadata.py
@@ -1,7 +1,7 @@
from typing import Any, Dict, List, Optional
import fatcat_openapi_client
-from fatcat_openapi_client import ApiClient, ContainerEntity
+from fatcat_openapi_client import DefaultApi, ContainerEntity
from fatcat_tools.normal import clean_str
@@ -37,7 +37,7 @@ class JournalMetadataImporter(EntityImporter):
See guide for details on the many 'extra' fields used here.
"""
- def __init__(self, api: ApiClient, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, **kwargs) -> None:
eg_desc = kwargs.get(
"editgroup_description",
diff --git a/python/fatcat_tools/importers/jstor.py b/python/fatcat_tools/importers/jstor.py
index 79691c9a..21c192ef 100644
--- a/python/fatcat_tools/importers/jstor.py
+++ b/python/fatcat_tools/importers/jstor.py
@@ -6,7 +6,7 @@ from typing import Any, Dict, List, Optional, Sequence
import fatcat_openapi_client
from bs4 import BeautifulSoup
-from fatcat_openapi_client import ApiClient, ReleaseEntity
+from fatcat_openapi_client import DefaultApi, ReleaseEntity
from fatcat_tools.biblio_lookup_tables import LANG_MAP_MARC
from fatcat_tools.normal import clean_doi, clean_str
@@ -37,7 +37,7 @@ class JstorImporter(EntityImporter):
Collection)
"""
- def __init__(self, api: ApiClient, issn_map_file: Sequence, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, issn_map_file: Sequence, **kwargs) -> None:
eg_desc = kwargs.get("editgroup_description", "Automated import of JSTOR XML metadata")
eg_extra = kwargs.get("editgroup_extra", dict())
diff --git a/python/fatcat_tools/importers/matched.py b/python/fatcat_tools/importers/matched.py
index 70290d81..22523dd7 100644
--- a/python/fatcat_tools/importers/matched.py
+++ b/python/fatcat_tools/importers/matched.py
@@ -1,7 +1,7 @@
from typing import Any, Dict, List, Optional
import fatcat_openapi_client
-from fatcat_openapi_client import ApiClient, FileEntity
+from fatcat_openapi_client import DefaultApi, FileEntity
from fatcat_tools.normal import clean_doi
@@ -32,7 +32,7 @@ class MatchedImporter(EntityImporter):
- core_id, wikidata_id, pmcid, pmid: not as lists
"""
- def __init__(self, api: ApiClient, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, **kwargs) -> None:
eg_desc = (
kwargs.pop("editgroup_description", None)
diff --git a/python/fatcat_tools/importers/orcid.py b/python/fatcat_tools/importers/orcid.py
index f3d82a86..d4799a39 100644
--- a/python/fatcat_tools/importers/orcid.py
+++ b/python/fatcat_tools/importers/orcid.py
@@ -2,7 +2,7 @@ import sys
from typing import Any, Dict, List, Optional
import fatcat_openapi_client
-from fatcat_openapi_client import ApiClient, CreatorEntity
+from fatcat_openapi_client import DefaultApi, CreatorEntity
from fatcat_tools.normal import clean_str
@@ -26,7 +26,7 @@ def value_or_none(e: Any) -> Any:
class OrcidImporter(EntityImporter):
- def __init__(self, api: ApiClient, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, **kwargs) -> None:
eg_desc = kwargs.get(
"editgroup_description",
diff --git a/python/fatcat_tools/importers/pubmed.py b/python/fatcat_tools/importers/pubmed.py
index a6c7409d..6d82f410 100644
--- a/python/fatcat_tools/importers/pubmed.py
+++ b/python/fatcat_tools/importers/pubmed.py
@@ -6,7 +6,7 @@ from typing import Any, Dict, List, Optional, Sequence
import fatcat_openapi_client
from bs4 import BeautifulSoup
-from fatcat_openapi_client import ApiClient, ReleaseEntity
+from fatcat_openapi_client import DefaultApi, ReleaseEntity
from fatcat_tools.biblio_lookup_tables import (
COUNTRY_NAME_MAP,
@@ -29,7 +29,7 @@ class PubmedImporter(EntityImporter):
"""
def __init__(
- self, api: ApiClient, issn_map_file: Sequence, lookup_refs: bool = True, **kwargs
+ self, api: DefaultApi, issn_map_file: Sequence, lookup_refs: bool = True, **kwargs
):
eg_desc = kwargs.get(
diff --git a/python/fatcat_tools/importers/shadow.py b/python/fatcat_tools/importers/shadow.py
index 520258cb..61a7f3a6 100644
--- a/python/fatcat_tools/importers/shadow.py
+++ b/python/fatcat_tools/importers/shadow.py
@@ -1,7 +1,7 @@
from typing import Any, Dict, List, Optional
import fatcat_openapi_client
-from fatcat_openapi_client import ApiClient, FileEntity
+from fatcat_openapi_client import DefaultApi, FileEntity
from fatcat_tools.normal import clean_doi, clean_isbn13, clean_pmid
@@ -30,7 +30,7 @@ class ShadowLibraryImporter(EntityImporter):
- datetime
"""
- def __init__(self, api: ApiClient, **kwargs) -> None:
+ def __init__(self, api: DefaultApi, **kwargs) -> None:
eg_desc = (
kwargs.pop("editgroup_description", None)