mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2024-11-23 07:00:20 +01:00
286 lines
12 KiB
HTML
286 lines
12 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="en" >
|
||
|
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||
|
|
||
|
|
||
|
<meta property="og:title" content="February, 2023" />
|
||
|
<meta property="og:description" content="2023-02-01
|
||
|
|
||
|
Export CGSpace to cross check the DOI metadata with Crossref
|
||
|
|
||
|
I want to try to expand my use of their data to journals, publishers, volumes, issues, etc…
|
||
|
|
||
|
|
||
|
" />
|
||
|
<meta property="og:type" content="article" />
|
||
|
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/2023-02/" />
|
||
|
<meta property="article:published_time" content="2023-02-01T10:57:36+03:00" />
|
||
|
<meta property="article:modified_time" content="2023-02-01T10:57:36+03:00" />
|
||
|
|
||
|
|
||
|
|
||
|
<meta name="twitter:card" content="summary"/>
|
||
|
<meta name="twitter:title" content="February, 2023"/>
|
||
|
<meta name="twitter:description" content="2023-02-01
|
||
|
|
||
|
Export CGSpace to cross check the DOI metadata with Crossref
|
||
|
|
||
|
I want to try to expand my use of their data to journals, publishers, volumes, issues, etc…
|
||
|
|
||
|
|
||
|
"/>
|
||
|
<meta name="generator" content="Hugo 0.110.0">
|
||
|
|
||
|
|
||
|
|
||
|
<script type="application/ld+json">
|
||
|
{
|
||
|
"@context": "http://schema.org",
|
||
|
"@type": "BlogPosting",
|
||
|
"headline": "February, 2023",
|
||
|
"url": "https://alanorth.github.io/cgspace-notes/2023-02/",
|
||
|
"wordCount": "597",
|
||
|
"datePublished": "2023-02-01T10:57:36+03:00",
|
||
|
"dateModified": "2023-02-01T10:57:36+03:00",
|
||
|
"author": {
|
||
|
"@type": "Person",
|
||
|
"name": "Alan Orth"
|
||
|
},
|
||
|
"keywords": "Notes"
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
|
||
|
|
||
|
<link rel="canonical" href="https://alanorth.github.io/cgspace-notes/2023-02/">
|
||
|
|
||
|
<title>February, 2023 | CGSpace Notes</title>
|
||
|
|
||
|
|
||
|
<!-- combined, minified CSS -->
|
||
|
|
||
|
<link href="https://alanorth.github.io/cgspace-notes/css/style.c6ba80bc50669557645abe05f86b73cc5af84408ed20f1551a267bc19ece8228.css" rel="stylesheet" integrity="sha256-xrqAvFBmlVdkWr4F+GtzzFr4RAjtIPFVGiZ7wZ7Ogig=" crossorigin="anonymous">
|
||
|
|
||
|
|
||
|
<!-- minified Font Awesome for SVG icons -->
|
||
|
|
||
|
<script defer src="https://alanorth.github.io/cgspace-notes/js/fontawesome.min.f5072c55a0721857184db93a50561d7dc13975b4de2e19db7f81eb5f3fa57270.js" integrity="sha256-9QcsVaByGFcYTbk6UFYdfcE5dbTeLhnbf4HrXz+lcnA=" crossorigin="anonymous"></script>
|
||
|
|
||
|
<!-- RSS 2.0 feed -->
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
|
||
|
|
||
|
<div class="blog-masthead">
|
||
|
<div class="container">
|
||
|
<nav class="nav blog-nav">
|
||
|
<a class="nav-link " href="https://alanorth.github.io/cgspace-notes/">Home</a>
|
||
|
</nav>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<header class="blog-header">
|
||
|
<div class="container">
|
||
|
<h1 class="blog-title" dir="auto"><a href="https://alanorth.github.io/cgspace-notes/" rel="home">CGSpace Notes</a></h1>
|
||
|
<p class="lead blog-description" dir="auto">Documenting day-to-day work on the <a href="https://cgspace.cgiar.org">CGSpace</a> repository.</p>
|
||
|
</div>
|
||
|
</header>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div class="container">
|
||
|
<div class="row">
|
||
|
<div class="col-sm-8 blog-main">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<article class="blog-post">
|
||
|
<header>
|
||
|
<h2 class="blog-post-title" dir="auto"><a href="https://alanorth.github.io/cgspace-notes/2023-02/">February, 2023</a></h2>
|
||
|
<p class="blog-post-meta">
|
||
|
<time datetime="2023-02-01T10:57:36+03:00">Wed Feb 01, 2023</time>
|
||
|
in
|
||
|
<span class="fas fa-folder" aria-hidden="true"></span> <a href="/categories/notes/" rel="category tag">Notes</a>
|
||
|
|
||
|
|
||
|
</p>
|
||
|
</header>
|
||
|
<h2 id="2023-02-01">2023-02-01</h2>
|
||
|
<ul>
|
||
|
<li>Export CGSpace to cross check the DOI metadata with Crossref
|
||
|
<ul>
|
||
|
<li>I want to try to expand my use of their data to journals, publishers, volumes, issues, etc…</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<ul>
|
||
|
<li>First, extract a list of DOIs for use with <code>crossref-doi-lookup.py</code>:</li>
|
||
|
</ul>
|
||
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ csvcut -c <span style="color:#e6db74">'cg.identifier.doi[en_US]'</span> ~/Downloads/2023-02-01-cgspace.csv <span style="color:#ae81ff">\
|
||
|
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> | csvgrep -c 1 -m 'doi.org' \
|
||
|
</span></span><span style="display:flex;"><span> | csvgrep -c 1 -m ' ' -i \
|
||
|
</span></span><span style="display:flex;"><span> | csvgrep -c 1 -r '.*cifor.*' -i \
|
||
|
</span></span><span style="display:flex;"><span> | sed 1d > /tmp/2023-02-01-dois.txt
|
||
|
</span></span><span style="display:flex;"><span>$ ./ilri/crossref-doi-lookup.py -e a.orth@cgiar.org -i /tmp/2023-02-01-dois.txt -o ~/Downloads/2023-01-31-crossref-results.csv -d
|
||
|
</span></span></code></pre></div><ul>
|
||
|
<li>Then extract the ID, DOI, journal, volume, issue, publisher, etc from the CGSpace dump and rename the <code>cg.identifier.doi[en_US]</code> to <code>doi</code> so we can join on it with the Crossref results file:</li>
|
||
|
</ul>
|
||
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>$ csvcut -c <span style="color:#e6db74">'id,cg.identifier.doi[en_US],cg.journal[en_US],cg.volume[en_US],cg.issue[en_US],dcterms.publisher[en_US],cg.number[en_US],dcterms.license[en_US]'</span> ~/Downloads/2023-02-01-cgspace.csv <span style="color:#ae81ff">\
|
||
|
</span></span></span><span style="display:flex;"><span><span style="color:#ae81ff"></span> | csvgrep -c 'cg.identifier.doi[en_US]' -r '.*cifor.*' -i \
|
||
|
</span></span><span style="display:flex;"><span> | sed -e '1s/cg.identifier.doi\[en_US\]/doi/' \
|
||
|
</span></span><span style="display:flex;"><span> -e 's_https://doi.org/__g' \
|
||
|
</span></span><span style="display:flex;"><span> -e 's_https://dx.doi.org/__g' \
|
||
|
</span></span><span style="display:flex;"><span> > /tmp/2023-02-01-cgspace-doi-metadata.csv
|
||
|
</span></span><span style="display:flex;"><span>$ csvjoin -c doi /tmp/2023-02-01-cgspace-doi-metadata.csv ~/Downloads/2023-02-01-crossref-results.csv > /tmp/2023-02-01-cgspace-crossref-check.csv
|
||
|
</span></span></code></pre></div><ul>
|
||
|
<li>And import into OpenRefine for analysis and cleaning</li>
|
||
|
<li>I just noticed that Crossref also has types, so we could use that in the future too!</li>
|
||
|
<li>I got a few corrections after examining manually, but I didn’t manage to identify any patterns that I could use to do any automatic matching or cleaning</li>
|
||
|
</ul>
|
||
|
<h2 id="2023-02-05">2023-02-05</h2>
|
||
|
<ul>
|
||
|
<li>Normalize text lang attributes in PostgreSQL, run a quick Discovery index, and then export CGSpace to check Initiative mappings and countries/regions</li>
|
||
|
<li>Run all system updates on CGSpace (linode18) and reboot it</li>
|
||
|
</ul>
|
||
|
<h2 id="2023-02-06">2023-02-06</h2>
|
||
|
<ul>
|
||
|
<li>Peter said that a new Initiative was approved last month so we need to add it to CGSpace: <code>Fragility, Conflict, and Migration</code></li>
|
||
|
<li>There is lots of discussion about the “issue date” versus “available date” with Enrico and IFPRI, after lots of feedback from the PRMS QA
|
||
|
<ul>
|
||
|
<li>I filed <a href="https://github.com/AgriculturalSemantics/cg-core/issues/43">an issue on CG Core to propose using <code>dcterms.available</code> as an optional field to indicate the online date</a></li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<h2 id="2023-02-07">2023-02-07</h2>
|
||
|
<ul>
|
||
|
<li>IFPRI’s web developer Tony managed to get his Drupal harvester to have a useful user agent:</li>
|
||
|
</ul>
|
||
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>54.x.x.x - - [06/Feb/2023:10:10:32 +0100] "POST /rest/items/find-by-metadata-field?limit=%22100&offset=0 HTTP/1.1" 200 58855 "-" "IFPRI drupal POST harvester"
|
||
|
</span></span></code></pre></div><ul>
|
||
|
<li>He also noticed that there is no pagination on POST requests to <code>/rest/items/find-by-metadata-field</code>, and that he needs to increase his timeout for requests that return 100+ results, ie:</li>
|
||
|
</ul>
|
||
|
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-console" data-lang="console"><span style="display:flex;"><span>curl -f -H "Content-Type: application/json" -X POST "https://dspacetest.cgiar.org/rest/items/find-by-metadata-field" -d '{"key":"cg.subject.actionArea", "value":"Systems Transformation", "language": "en_US"}'
|
||
|
</span></span></code></pre></div><ul>
|
||
|
<li>I need to ask on the DSpace Slack about this POST pagination</li>
|
||
|
<li>Abenet and Udana noticed that the Handle server was not running
|
||
|
<ul>
|
||
|
<li>Looking in the <code>error.log</code> file I see that the service is complaining about a lock file being present</li>
|
||
|
<li>This is because Linode had to do emergency maintenance on the VM host this morning and the Handle server didn’t shut down properly</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li>I’m having an issue with <code>poetry update</code> so I spent some time debugging and filed <a href="https://github.com/python-poetry/poetry/issues/7482">an issue</a></li>
|
||
|
<li>Proof and import nine items for the Digital Innovation Inititive for IFPRI
|
||
|
<ul>
|
||
|
<li>There were only some minor issues in the metadata</li>
|
||
|
<li>I also did a duplicate check with <code>check-duplicates.py</code> just in case</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li>I did some minor updates on csv-metadata-quality
|
||
|
<ul>
|
||
|
<li>First, to reduce warnings on non-SPDX licenses like “Copyrighted; all rights reserved” and “Other” since they are very common for us and I’m sick of seeing the warnings</li>
|
||
|
<li>Second, to skip whitespace and newline fixes on the abstract field since so many times they are intended</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<h2 id="2023-02-08">2023-02-08</h2>
|
||
|
<ul>
|
||
|
<li>Make some edits to IFPRI records requested by Jawoo and Leigh</li>
|
||
|
<li>Help Alessandra upload a last minute report for SAPLING</li>
|
||
|
<li>Proof and upload twenty-seven IFPRI records to CGSpace
|
||
|
<ul>
|
||
|
<li>It’s a good thing I did a duplicate check because I found three duplicates!</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li>Export CGSpace to update Initiative mappings and country/region mappings
|
||
|
<ul>
|
||
|
<li>Then start a harvest on AReS</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<!-- raw HTML omitted -->
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</article>
|
||
|
|
||
|
|
||
|
|
||
|
</div> <!-- /.blog-main -->
|
||
|
|
||
|
<aside class="col-sm-3 ml-auto blog-sidebar">
|
||
|
|
||
|
|
||
|
|
||
|
<section class="sidebar-module">
|
||
|
<h4>Recent Posts</h4>
|
||
|
<ol class="list-unstyled">
|
||
|
|
||
|
|
||
|
<li><a href="/cgspace-notes/2023-02/">February, 2023</a></li>
|
||
|
|
||
|
<li><a href="/cgspace-notes/2023-01/">January, 2023</a></li>
|
||
|
|
||
|
<li><a href="/cgspace-notes/2022-12/">December, 2022</a></li>
|
||
|
|
||
|
<li><a href="/cgspace-notes/2022-11/">November, 2022</a></li>
|
||
|
|
||
|
<li><a href="/cgspace-notes/2022-10/">October, 2022</a></li>
|
||
|
|
||
|
</ol>
|
||
|
</section>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<section class="sidebar-module">
|
||
|
<h4>Links</h4>
|
||
|
<ol class="list-unstyled">
|
||
|
|
||
|
<li><a href="https://cgspace.cgiar.org">CGSpace</a></li>
|
||
|
|
||
|
<li><a href="https://dspacetest.cgiar.org">DSpace Test</a></li>
|
||
|
|
||
|
<li><a href="https://github.com/ilri/DSpace">CGSpace @ GitHub</a></li>
|
||
|
|
||
|
</ol>
|
||
|
</section>
|
||
|
|
||
|
</aside>
|
||
|
|
||
|
|
||
|
</div> <!-- /.row -->
|
||
|
</div> <!-- /.container -->
|
||
|
|
||
|
|
||
|
|
||
|
<footer class="blog-footer">
|
||
|
<p dir="auto">
|
||
|
|
||
|
Blog template created by <a href="https://twitter.com/mdo">@mdo</a>, ported to Hugo by <a href='https://twitter.com/mralanorth'>@mralanorth</a>.
|
||
|
|
||
|
</p>
|
||
|
<p>
|
||
|
<a href="#">Back to top</a>
|
||
|
</p>
|
||
|
</footer>
|
||
|
|
||
|
|
||
|
</body>
|
||
|
|
||
|
</html>
|