diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-09 16:04:31 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-09 16:04:31 -0800 |
commit | 78eb2cc0f3f81c35474eb68231fe5f60d47bbcde (patch) | |
tree | ad541b02097849562a323322f911602c2b995ddd /python/fatcat_tools | |
parent | 996b2e2084c1798126bd91dd950c063982398bec (diff) | |
download | fatcat-78eb2cc0f3f81c35474eb68231fe5f60d47bbcde.tar.gz fatcat-78eb2cc0f3f81c35474eb68231fe5f60d47bbcde.zip |
lowercase DOI lint and check entity status
Diffstat (limited to 'python/fatcat_tools')
-rw-r--r-- | python/fatcat_tools/cleanups/release_lowercase_doi.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/python/fatcat_tools/cleanups/release_lowercase_doi.py b/python/fatcat_tools/cleanups/release_lowercase_doi.py index 812262d4..4e5a6f43 100644 --- a/python/fatcat_tools/cleanups/release_lowercase_doi.py +++ b/python/fatcat_tools/cleanups/release_lowercase_doi.py @@ -1,13 +1,10 @@ import argparse -import copy import os import sys -from typing import Any, Dict -import fatcat_openapi_client from fatcat_openapi_client import ApiClient, ReleaseEntity, ReleaseExtIds -from fatcat_tools import authenticated_api, entity_from_dict, public_api +from fatcat_tools import authenticated_api, public_api from fatcat_tools.importers.common import EntityImporter, LinePusher @@ -76,6 +73,10 @@ class ReleaseLowercaseDoiCleanup(EntityImporter): self.counts["skip-existing-not-found"] += 1 return False + if existing.status != "active": + self.counts["skip-existing-entity-status"] += 1 + return False + if not existing.ext_ids.doi: self.counts["skip-existing-no-doi"] += 1 return False |