From a42206d2603e28f1311ac3873dc168c78eabffee Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Fri, 31 Jan 2020 01:44:46 +0100 Subject: datacite: add exception for https://www.micropublication.org/ --- python/fatcat_tools/importers/datacite.py | 5 +++++ python/tests/files/datacite/datacite_result_30.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py index f1049909..b060a18e 100644 --- a/python/fatcat_tools/importers/datacite.py +++ b/python/fatcat_tools/importers/datacite.py @@ -390,6 +390,11 @@ class DataciteImporter(EntityImporter): len(container_name))) container_name = container_name[0] + # Exception: https://www.micropublication.org/, see: !MR24. + if container_id is None and container_name is None: + if publisher and publisher.lower().startswith('micropublication'): + container_name = publisher + # Volume and issue. volume = container.get('volume') issue = container.get('issue') diff --git a/python/tests/files/datacite/datacite_result_30.json b/python/tests/files/datacite/datacite_result_30.json index f7d1bb2c..fc2c4dfc 100644 --- a/python/tests/files/datacite/datacite_result_30.json +++ b/python/tests/files/datacite/datacite_result_30.json @@ -28,7 +28,8 @@ "extra": { "datacite": { "resourceTypeGeneral": "DataPaper" - } + }, + "container_name": "microPublication Biology" }, "refs": [], "release_stage": "published", -- cgit v1.2.3