diff --git a/src/zbmath_rest2oai/getAsXml.py b/src/zbmath_rest2oai/getAsXml.py index 948939c0..d7e7c5b5 100644 --- a/src/zbmath_rest2oai/getAsXml.py +++ b/src/zbmath_rest2oai/getAsXml.py @@ -77,6 +77,11 @@ def datacite_records(result: dict) -> bool: return False +def software_codemeta(result: dict) -> bool: + src = result.get("source_code", {}) + return bool(src) + + def extract_tags(result): tags = [] for msc in result.get('msc', []): @@ -96,6 +101,9 @@ def extract_tags(result): if add_software(result): tags.append('openaire') + if software_codemeta(result): + tags.append('SWH') + if datacite_records(result): tags.append('datacite') diff --git a/src/zbmath_rest2oai/get_sets.py b/src/zbmath_rest2oai/get_sets.py index 9121ccf0..97e2e439 100644 --- a/src/zbmath_rest2oai/get_sets.py +++ b/src/zbmath_rest2oai/get_sets.py @@ -15,6 +15,10 @@ def get_sets(): 'datacite': ( 'Datacite: for metadata supported with Doi and ' 'arXiv identifiers' + ), + 'SWH': ( + 'Required set for Software Heritage: includes all entries that provide ' + 'software artifacts with accessible source code.' ) } diff --git a/test/test_get_sets.py b/test/test_get_sets.py index 3140293d..2554b971 100644 --- a/test/test_get_sets.py +++ b/test/test_get_sets.py @@ -7,5 +7,5 @@ class PlainXmlTest(unittest.TestCase): @staticmethod def test_getSets(): real_sets = get_sets() - assert len(real_sets) == 66 + assert len(real_sets) == 67 assert real_sets['14'] == '14-XX:Algebraic geometry'