aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-01-06 22:47:23 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-01-06 22:47:23 +0100
commit5b796406a975b50afb88863691cdfaeca55fddcc (patch)
tree8dd10107e0a40f27e13036c197af81b61d5c257c /python/fatcat_tools/importers
parentd38dda53dd29024c8c855c64dfbb1529d0aaac83 (diff)
downloadfatcat-5b796406a975b50afb88863691cdfaeca55fddcc.tar.gz
fatcat-5b796406a975b50afb88863691cdfaeca55fddcc.zip
datacite: set release_stage to published by default
Set to `None` only if there is no publisher yet. Docs: https://support.datacite.org/docs/doi-states
Diffstat (limited to 'python/fatcat_tools/importers')
-rw-r--r--python/fatcat_tools/importers/datacite.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py
index 1cee6db3..936b6f1b 100644
--- a/python/fatcat_tools/importers/datacite.py
+++ b/python/fatcat_tools/importers/datacite.py
@@ -409,10 +409,11 @@ class DataciteImporter(EntityImporter):
# Start with clear stages, e.g. published. TODO(martin): we could
# probably infer a bit more from the relations, e.g.
# "IsPreviousVersionOf" or "IsNewVersionOf".
- release_stage = None
- if attributes.get(
- 'state') == 'findable' or attributes.get('isActive') is True:
- release_stage = 'published'
+ release_stage = 'published'
+
+ # TODO(martin): If 'state' is not 'findable' or 'isActive' is not true,
+ # we might want something else than 'published'. See also:
+ # https://support.datacite.org/docs/doi-states.
# Publisher. A few NA values. A few bogus values.
publisher = attributes.get('publisher')