From 42bc443ccedbbf42510f06b1d5531c06f2b15bed Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 24 Dec 2020 11:59:43 -0800 Subject: normalizer: test for un-versioned arxiv_id --- python/fatcat_tools/normal.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/fatcat_tools/normal.py b/python/fatcat_tools/normal.py index d792979d..4218856c 100644 --- a/python/fatcat_tools/normal.py +++ b/python/fatcat_tools/normal.py @@ -94,6 +94,9 @@ def clean_arxiv_id(raw): - 'arxiv:' prefix Works with versioned or un-versioned arxiv identifiers. + + TODO: version of this function that only works with versioned identifiers? + That is the behavior of fatcat API """ if not raw: return None @@ -116,6 +119,7 @@ def test_clean_arxiv_id(): assert clean_arxiv_id("math.CA/0611800v2") == "math.CA/0611800v2" assert clean_arxiv_id("math.CA/0611800") == "math.CA/0611800" assert clean_arxiv_id("0806.2878v1 ") == "0806.2878v1" + assert clean_arxiv_id("cs/0207047") == "cs/0207047" assert clean_arxiv_id("https://arxiv.org/abs/0806.2878v1") == "0806.2878v1" assert clean_arxiv_id("arxiv:0806.2878v1") == "0806.2878v1" -- cgit v1.2.3