diff --git a/content/post/2018-02.md b/content/post/2018-02.md index 945a22011..e26814b3a 100644 --- a/content/post/2018-02.md +++ b/content/post/2018-02.md @@ -717,3 +717,40 @@ $ cat ~/src/git/DSpace/dspace/config/controlled-vocabularies/cg-creator-id.xml O - I updated the `resolve-orcids.py` to use the "credit-name" if it exists in a profile, falling back to "given-names" + "family-name" - Also, I added color coded output to the debug messages and added a "quiet" mode that supresses the normal behavior of printing results to the screen +- I'm using this as the test input for `resolve-orcids.py`: + +``` +$ cat orcid-test-values.txt +# valid identifier with 'given-names' and 'family-name' +0000-0001-5019-1368 + +# duplicate identifier +0000-0001-5019-1368 + +# invalid identifier +0000-0001-9634-19580 + +# has a 'credit-name' value we should prefer +0000-0002-1735-7458 + +# has a blank 'credit-name' value +0000-0001-5199-5528 + +# has a null 'name' object +0000-0002-1300-3636 + +# has a null 'family-name' value +0000-0001-9634-1958 + +# missing ORCID identifier +0000-0003-4221-3214 +``` + +- Help debug issues with Altmetric badges again, it looks like Altmetric is all kinds of fucked up +- Last week I pointed out that they were tracking Handles from our test server +- Now, their API is responding with content that is marked as content-type JSON but is not valid JSON +- For example, this item: https://cgspace.cgiar.org/handle/10568/83320 +- The Altmetric JavaScript builds the following API call: https://api.altmetric.com/v1/handle/10568/83320?callback=_altmetric.embed_callback&domain=cgspace.cgiar.org&key=3c130976ca2b8f2e88f8377633751ba1&cache_until=13-20 +- The response body is *not* JSON +- To contrast, the following bare API call without query parameters is valid JSON: https://api.altmetric.com/v1/handle/10568/83320 +- I told them that it's their JavaScript that is fucked up diff --git a/docs/2018-02/index.html b/docs/2018-02/index.html index c3d3e83fc..854b8aaca 100644 --- a/docs/2018-02/index.html +++ b/docs/2018-02/index.html @@ -23,7 +23,7 @@ I copied the logic in the jmx_tomcat_dbpools provided by Ubuntu’s munin-pl - + @@ -57,9 +57,9 @@ I copied the logic in the jmx_tomcat_dbpools provided by Ubuntu’s munin-pl "@type": "BlogPosting", "headline": "February, 2018", "url": "https://alanorth.github.io/cgspace-notes/2018-02/", - "wordCount": "4531", + "wordCount": "4688", "datePublished": "2018-02-01T16:28:54+02:00", - "dateModified": "2018-02-20T11:17:51+02:00", + "dateModified": "2018-02-20T12:28:01+02:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -930,6 +930,44 @@ TypeError: 'NoneType' object is not subscriptable + +
$ cat orcid-test-values.txt 
+# valid identifier with 'given-names' and 'family-name'
+0000-0001-5019-1368
+
+# duplicate identifier
+0000-0001-5019-1368 
+
+# invalid identifier
+0000-0001-9634-19580
+
+# has a 'credit-name' value we should prefer
+0000-0002-1735-7458
+
+# has a blank 'credit-name' value
+0000-0001-5199-5528
+
+# has a null 'name' object
+0000-0002-1300-3636
+
+# has a null 'family-name' value
+0000-0001-9634-1958
+
+# missing ORCID identifier
+0000-0003-4221-3214
+
+ + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index ae1d75449..fbf7d3d96 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,7 +4,7 @@ https://alanorth.github.io/cgspace-notes/2018-02/ - 2018-02-20T11:17:51+02:00 + 2018-02-20T12:28:01+02:00 @@ -149,7 +149,7 @@ https://alanorth.github.io/cgspace-notes/ - 2018-02-20T11:17:51+02:00 + 2018-02-20T12:28:01+02:00 0 @@ -160,7 +160,7 @@ https://alanorth.github.io/cgspace-notes/tags/notes/ - 2018-02-20T11:17:51+02:00 + 2018-02-20T12:28:01+02:00 0 @@ -172,13 +172,13 @@ https://alanorth.github.io/cgspace-notes/post/ - 2018-02-20T11:17:51+02:00 + 2018-02-20T12:28:01+02:00 0 https://alanorth.github.io/cgspace-notes/tags/ - 2018-02-20T11:17:51+02:00 + 2018-02-20T12:28:01+02:00 0