aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/.pylintrc2
-rw-r--r--python/fatcat_tools/references.py10
2 files changed, 4 insertions, 8 deletions
diff --git a/python/.pylintrc b/python/.pylintrc
index d3003620..5fc310a8 100644
--- a/python/.pylintrc
+++ b/python/.pylintrc
@@ -14,3 +14,5 @@ notes=FIXME,XXX,DELETEME
ignored-modules=responses
# FileEntityForm' has no 'data' member (no-member) (etc)
generated-members=data,errors
+# No name 'BaseModel' in module 'pydantic' (no-name-in-module) (etc)
+extension-pkg-allow-list=pydantic
diff --git a/python/fatcat_tools/references.py b/python/fatcat_tools/references.py
index a0079efd..da398239 100644
--- a/python/fatcat_tools/references.py
+++ b/python/fatcat_tools/references.py
@@ -192,9 +192,6 @@ def get_inbound_refs(
es_index: str = "fatcat_ref",
) -> List[BiblioRef]:
- if url and not url_surt:
- url = surt_ify(url)
-
search = Search(using=es_client, index=es_index)
if consolidate_works:
@@ -243,9 +240,6 @@ def count_inbound_refs(
Same parameters as get_inbound_refs(), but returns just a count
"""
- if url and not url_surt:
- url = surt_ify(url)
-
search = Search(using=es_client, index=es_index)
if release_ident:
@@ -324,7 +318,7 @@ def run_ref_query(args) -> None:
print(f"Total: {hits.count_total} Time: {hits.query_wall_time_ms}ms; {hits.query_time_ms}ms")
if args.enrich == "fatcat":
- enriched = enrich_outbound_refs_fatcat(hits.result_refs, hide='refs,abstracts', fatcat_api_client=args.fatcat_api_client)
+ enriched = enrich_outbound_refs(hits.result_refs, hide='refs,abstracts', fatcat_api_client=args.fatcat_api_client)
for ref in enriched:
if ref.release:
print(f"{ref.ref.ref_index or '-'}\trelease_{ref.release.ident}\t{ref.ref.match_provenance}/{ref.ref.match_status}\t{ref.release.release_year or '-'}\t{ref.release.title}\t{ref.release.ext_ids.pmid or ref.release.ext_ids.doi or '-'}")
@@ -341,7 +335,7 @@ def run_ref_query(args) -> None:
print(f"Total: {hits.count_total} Time: {hits.query_wall_time_ms}ms; {hits.query_time_ms}ms")
if args.enrich == "fatcat":
- enriched = enrich_inbound_refs_fatcat(hits.result_refs, hide='refs,abstracts', fatcat_api_client=args.fatcat_api_client)
+ enriched = enrich_inbound_refs(hits.result_refs, hide='refs,abstracts', fatcat_api_client=args.fatcat_api_client)
for ref in enriched:
if ref.release:
print(f"release_{ref.release.ident}\t{ref.ref.match_provenance}/{ref.ref.match_status}\t{ref.release.release_year or '-'}\t{ref.release.title}\t{ref.release.ext_ids.pmid or ref.release.ext_ids.doi or '-'}")