<li>Abenet said that CIP found more duplicate records in their export from AReS
<ul>
<li>I re-opened <ahref="https://github.com/ilri/OpenRXV/issues/67">the issue</a> on OpenRXV where we had previously noticed this</li>
<li>The shared link where the duplicates are is here: <ahref="https://cgspace.cgiar.org/explorer/shared/heEOz3YBnXdK69bR2ra6">https://cgspace.cgiar.org/explorer/shared/heEOz3YBnXdK69bR2ra6</a></li>
</ul>
</li>
<li>I had a call with CodeObia to discuss the work on OpenRXV</li>
<li>Check the results of the AReS harvesting from last night:</li>
<li>Meeting with Peter and Abenet about CGSpace goals and progress</li>
<li>Test submission to DSpace via REST API to see if Abenet can fix / reject it (submit workflow?)</li>
<li>Get Peter a list of users who have submitted or approved on DSpace everrrrrrr, so he can remove some</li>
<li>Ask MEL for a dump of their types to reconcile with ours and CG Core</li>
<li>Need to tag ILRI collection with license!! For pre-2010 use “Other” unless a license is already there; 2010-2020 do the ilri content in batches (2010-2015: CC-BY-NC-SA; 2016-onwards: CC-BY);
<ul>
<li>ONLY if ILRI / International Livestock Research Institute is the publisher, no journal articles, no book chapters…</li>
</ul>
</li>
<li>I tried to export the ILRI community from CGSpace but I got an error:</li>
</span></span><spanstyle="display:flex;"><span> at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:212)
</span></span><spanstyle="display:flex;"><span> at com.google.common.collect.Iterators.concat(Iterators.java:464)
</span></span><spanstyle="display:flex;"><span> at org.dspace.app.bulkedit.MetadataExport.addItemsToResult(MetadataExport.java:136)
</span></span><spanstyle="display:flex;"><span> at org.dspace.app.bulkedit.MetadataExport.buildFromCommunity(MetadataExport.java:125)
</span></span><spanstyle="display:flex;"><span> at org.dspace.app.bulkedit.MetadataExport.<init>(MetadataExport.java:77)
</span></span><spanstyle="display:flex;"><span> at org.dspace.app.bulkedit.MetadataExport.main(MetadataExport.java:282)
</span></span><spanstyle="display:flex;"><span> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
</span></span><spanstyle="display:flex;"><span> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
</span></span><spanstyle="display:flex;"><span> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
</span></span><spanstyle="display:flex;"><span> at java.lang.reflect.Method.invoke(Method.java:498)
</span></span><spanstyle="display:flex;"><span> at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)
</span></span><spanstyle="display:flex;"><span> at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)
</span></span></code></pre></div><ul>
<li>I imported the production database to my local development environment and I get the same error… WTF is this?
<ul>
<li>I was able to export another smaller community</li>
<li>I filed <ahref="https://tracker.atmire.com/tickets-cgiar-ilri/view-ticket?id=919">an issue</a> with Atmire to see if it is likely something of theirs, or if I need to ask on the dspace-tech mailing list</li>
</ul>
</li>
<li>CodeObia sent a <ahref="https://github.com/ilri/OpenRXV/pull/71">pull request</a> with fixes for several issues we highlighted in OpenRXV
<ul>
<li>I deployed the fixes on production, as they only affect minor parts of the frontend, and two of the four are working</li>
<li>I sent feedback to CodeObia</li>
</ul>
</li>
</ul>
<h2id="2021-02-02">2021-02-02</h2>
<ul>
<li>Communicate more with CodeObia about some fixes for OpenRXV</li>
<li>Maria Garruccio sent me some new ORCID iDs for Bioversity authors, as well as a correction for Stefan Burkart’s iD</li>
<li>I saved the new ones to a text file, combined them with the others, extracted the ORCID iDs themselves, and updated the names using <code>resolve-orcids.py</code>:</li>
<li>I also looked up which of these new authors might have existing items that are missing ORCID iDs</li>
<li>I had to port my <code>add-orcid-identifiers-csv.py</code> to DSpace 6 UUIDs and I think it’s working but I want to do a few more tests because it uses a sequence for the metadata_value_id</li>
</ul>
<h2id="2021-02-03">2021-02-03</h2>
<ul>
<li>Tag forty-three items from Bioversity’s new authors with ORCID iDs using <code>add-orcid-identifiers-csv.py</code>:</li>
<li>I’m working on the CGSpace accession for Karl Rich’s <ahref="https://github.com/ilri/vietnam-pig-model-2018">Viet Nam Pig Model 2018</a> and I noticed his ORCID iD is missing from CGSpace
<ul>
<li>I added it and tagged 141 items of his with the iD</li>
</ul>
</li>
<li>I <ahref="https://hdl.handle.net/10568/111126">uploaded a metadata-only accession</a> for the impact of ILRI book by John McIntire and Delia Grace to CGSpace
<ul>
<li>The source code itself is here: <ahref="https://github.com/ilri/impact-book">https://github.com/ilri/impact-book</a></li>
</ul>
</li>
<li>A little bit more work on CG Core v2</li>
</ul>
<h2id="2021-02-04">2021-02-04</h2>
<ul>
<li>Re-sync CGSpace database and Solr to DSpace Test to start a public test of CG Core v2
<ul>
<li>Afterwards I updated Discovery and OAI:</li>
</ul>
</li>
</ul>
<divclass="highlight"><pretabindex="0"style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><codeclass="language-console"data-lang="console"><spanstyle="display:flex;"><span>$ time chrt -b <spanstyle="color:#ae81ff">0</span> dspace index-discovery -b
<li>Attend Accenture meeting for repository managers
<ul>
<li>Not clear what the SMO wants to get out of us</li>
</ul>
</li>
<li>Enrico asked for some notes about our work on AReS in 2020 for CRP Livestock reporting
<ul>
<li>Abenet and I came up with the following:</li>
</ul>
</li>
</ul>
<blockquote>
<p>In 2020 we funded the third phase of development on the OpenRXV platform that powers AReS. This phase focused mainly on improving the search filtering, graphical visualizations, and reporting capabilities. It is now possible to create custom reports in Excel, Word, and PDF formats using a templating system. We also concentrated on making the vanilla OpenRXV platform easier to deploy and administer in hopes that other organizations would begin using it. Lastly, we identified and fixed a handful of bugs in the system. All development takes place publicly on GitHub: <ahref="https://github.com/ilri/OpenRXV">https://github.com/ilri/OpenRXV</a>.</p>
</blockquote>
<blockquote>
<p>In the last quarter of 2020, ILRI conducted a briefing for nearly 100 scientists and communications staff on how to use ARes as a visualization tool for repository outputs and as a reporting tool (<ahref="https://hdl.handle.net/10568/110527)">https://hdl.handle.net/10568/110527)</a>. Staff will begin using AReS to generate lists of their outputs to upload in the performance evaluation system to assist in their performance evaluation. The list of publications they will upload from AReS to Performax will indicate the open access status of each publication to help start discussion why some outputs are not open access given the open access policies of the CGIAR.</p>
</blockquote>
<ul>
<li>Call Moayad to discuss OpenRXV development
<ul>
<li>We talked about the “reporting period” (date-based statistics) and some of the issues Abdullah is working on on GitHub</li>
<li>I suggested that we offer the date-range statistics in a modal dialog with other sorting and grouping options during report generation</li>
</ul>
</li>
<li>Peter sent me the cleaned up series that I had originally sent him in 2020-10
<ul>
<li>I quickly applied all the deletions on CGSpace:</li>
<li>Institutionalization of quality assurance mechanism and dissemination of top quality commercial products to increase crop yields and improve food security of smallholder farmers in sub-Saharan Africa – COMPRO-II</li>
<li>Manuel pour les Banques de Gènes;1</li>
<li>Sistematización de experiencias Proyecto ACORDAR</li>
<li>I ended up using <ahref="https://github.com/LuminosoInsight/python-ftfy">python-ftfy</a> to fix those very easily, then replaced them in the CSV</li>
<li>Then I trimmed whitespace at the beginning, end, and around the “;”, and applied the 1,600 fixes using <code>fix-metadata-values.py</code>:</li>
<li>Talk to Abdullah from CodeObia about a few of the issues we filed on OpenRXV
<ul>
<li>Verify a fix he made for the issue with spaces in template file names</li>
<li>He says that the <ahref="https://github.com/ilri/OpenRXV/issues/49">Angular expressions support should be enabled</a>, but I tried it and couldn’t get a few simple examples working</li>
</ul>
</li>
<li>Atmire responded to a few issues today:
<ul>
<li>First, the one about a crash while exporting a community CSV, which appears to be a <ahref="https://jira.lyrasis.org/browse/DS-4211">vanilla DSpace issue with a patch in DSpace 6.4</a></li>
<li>Second, the MQM batch consumer issue, which appears to be harmless log spam in <em>most</em> cases and they have sent a patch that adjusts the logging as such</li>
<li>Third, a version bump for CUA to fix the <code>java.lang.UnsupportedOperationException: Multiple update components target the same field:solr_update_time_stamp</code> error</li>
</ul>
</li>
<li>I cherry-picked the patches for DS-4111 and was able to export the ILRI community finally, but the results are almost twice as many items as in the community!
<ul>
<li>Investigating with csvcut I see there are some ids that appear up to five, six, or seven times!</li>
</ul>
</li>
</ul>
<divclass="highlight"><pretabindex="0"style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><codeclass="language-console"data-lang="console"><spanstyle="display:flex;"><span>$ csvcut -c id /tmp/2021-02-10-ILRI.csv | sed <spanstyle="color:#e6db74">'1d'</span> | wc -l
</span></span><spanstyle="display:flex;"><span> value.contains("International Laboratory for Research on Animal Diseases")
</span></span><spanstyle="display:flex;"><span>)
</span></span></code></pre></div><ul>
<li>I tagged these pre-2010 items with “Other” if they didn’t already have a license</li>
<li>I checked 2010 to 2015, and 2016 to date, but they were all tagged already!</li>
<li>In the end I added the “Other” license to 1,523 items from before 2010</li>
</ul>
<h2id="2021-02-11">2021-02-11</h2>
<ul>
<li>CodeObia keeps working on a few more small issues on OpenRXV
<ul>
<li>Abdullah sent fixes for two issues but I couldn’t verify them myself so I asked him to check again</li>
<li>Call with Abdullah and Yousef to discuss some issues</li>
<li>We got the Angular expressions parser working…</li>
</ul>
</li>
</ul>
<h2id="2021-02-13">2021-02-13</h2>
<ul>
<li>Run system updates, deploy latest <code>6_x-prod</code> branch, and reboot CGSpace (linode18)</li>
<li>Normalize <code>text_lang</code> of DSpace item metadata on CGSpace:</li>
</ul>
<pretabindex="0"><code>dspace=# SELECT DISTINCT text_lang, count(text_lang) FROM metadatavalue WHERE dspace_object_id IN (SELECT uuid FROM item) GROUP BY text_lang ORDER BY count DESC;
text_lang | count
-----------+---------
en_US | 2567413
| 8050
en | 7601
| 0
(4 rows)
dspace=# UPDATE metadatavalue SET text_lang='en_US' WHERE dspace_object_id IN (SELECT uuid FROM item);
</code></pre><ul>
<li>Start a full Discovery re-indexing on CGSpace</li>
<li>Ah, actually 45.146.165.203 is making requests like this:</li>
</ul>
<divclass="highlight"><pretabindex="0"style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><codeclass="language-console"data-lang="console"><spanstyle="display:flex;"><span>"http://cgspace.cgiar.org:80/bitstream/handle/10568/238/Res_report_no3.pdf;jsessionid=7311DD88B30EEF9A8F526FF89378C2C5%' AND 4313=CONCAT(CHAR(113)+CHAR(98)+CHAR(106)+CHAR(112)+CHAR(113),(SELECT (CASE WHEN (4313=4313) THEN CHAR(49) ELSE CHAR(48) END)),CHAR(113)+CHAR(106)+CHAR(98)+CHAR(112)+CHAR(113)) AND 'XzQO%'='XzQO"
</span></span></code></pre></div><ul>
<li>I purged the hits from these two using my <code>check-spider-ip-hits.sh</code>:</li>
</span></span></span><spanstyle="display:flex;"><span><spanstyle="color:#960050;background-color:#1e0010"></span>Total number of bot hits purged: 70731
</span></span></code></pre></div><ul>
<li>My god, and 64.39.99.15 is from Qualys, the domain scanning security people, who are making queries trying to see if we are vulnerable or something (wtf?)
<ul>
<li>Looking in Solr I see a few different IPs with DNS like <code>sn003.s02.iad01.qualys.com.</code> so I will purge their requests too:</li>
</span></span></span><spanstyle="display:flex;"><span><spanstyle="color:#960050;background-color:#1e0010"></span>Total number of bot hits purged: 23789
<li>But I don’t know if he wants the entire ILRI community, in which case he needs to get the collections recursively and iterate over them, or if his software can manage the iteration over the pages of item results using limit and offset</li>
<li>Help proof and upload 1095 CIFOR items to DSpace Test for Abenet
<ul>
<li>There were a few dozen issues with author affiliations, but the metadata was otherwise very good quality</li>
<li>I ran the data through the csv-metadata-quality tool nevertheless to fix some minor formatting issues</li>
<li>I uploaded it to DSpace Test to check for duplicates</li>
<li>I added colorized output to the csv-metadata-quality tool and tagged <ahref="https://github.com/ilri/csv-metadata-quality/releases/tag/v0.4.4">version 0.4.4 on GitHub</a></li>
<li>I updated the fields in AReS Explorer and then removed the old temp index so I can start a fresh re-harvest of CGSpace:</li>
<li>Start looking at splitting the series name and number in <code>dcterms.isPartOf</code> now that we have migrated to CG Core v2
<ul>
<li>The numbers will go to <code>cg.number</code></li>
<li>I notice there are about 100 series without a number, but they still have a semicolon, for example <code>Esporo 72;</code></li>
<li>I think I will replace those like this:</li>
</ul>
</li>
</ul>
<divclass="highlight"><pretabindex="0"style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><codeclass="language-console"data-lang="console"><spanstyle="display:flex;"><span>localhost/dspace63= > UPDATE metadatavalue SET text_value = REGEXP_REPLACE(text_value, '^(.+?);$','\1', 'g') WHERE metadata_field_id=166 AND dspace_object_id IN (SELECT uuid FROM item) AND text_value ~ ';$';
<li>As for splitting the other values, I think I can export the <code>dspace_object_id</code> and <code>text_value</code> and then upload it as a CSV rather than writing a Python script to create the new metadata values</li>
</ul>
<h2id="2021-02-22-1">2021-02-22</h2>
<ul>
<li>Check the results of the AReS harvesting from last night:</li>
</span></span><spanstyle="display:flex;"><span>dspace=# UPDATE metadatavalue SET text_value = REGEXP_REPLACE(text_value, '^(.+?);$','\1', 'g') WHERE metadata_field_id=166 AND dspace_object_id IN (SELECT uuid FROM item) AND text_value ~ ';$';
<li>Set all <code>text_lang</code> values on CGSpace to <code>en_US</code> to make the series replacements easier (this didn’t work, read below):</li>
</span></span><spanstyle="display:flex;"><span>dspace=# UPDATE metadatavalue SET text_lang='en_US' WHERE text_lang !='en_US' AND dspace_object_id IN (SELECT uuid FROM item);
<li>Then export all series with their IDs to CSV:</li>
</ul>
<divclass="highlight"><pretabindex="0"style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><codeclass="language-console"data-lang="console"><spanstyle="display:flex;"><span>dspace=# \COPY (SELECT dspace_object_id, text_value as "dcterms.isPartOf[en_US]" FROM metadatavalue WHERE metadata_field_id=166 AND dspace_object_id IN (SELECT uuid FROM item)) TO /tmp/2021-02-23-series.csv WITH CSV HEADER;
</span></span></code></pre></div><ul>
<li>In OpenRefine I trimmed and consolidated whitespace, then made some quick cleanups to normalize the fields based on a sanity check
<ul>
<li>For example many Spore items are like “Spore, Spore 23”</li>
<li>Also, “Agritrade, August 2002”</li>
</ul>
</li>
<li>Then I copied the column to a new one called <code>cg.number[en_US]</code> and split the values for each on the semicolon using <code>value.split(';')[0]</code> and <code>value.split(';')[1]</code></li>
<li>I tried to upload some of the series data to DSpace Test but I’m having an issue where some fields change that shouldn’t
<ul>
<li>It seems not all fields get updated when I set the text_lang globally, but if I updated it manually like this it works:</li>
</ul>
</li>
</ul>
<divclass="highlight"><pretabindex="0"style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><codeclass="language-console"data-lang="console"><spanstyle="display:flex;"><span>dspace=# UPDATE metadatavalue SET text_lang='en_US' WHERE metadata_value_id=5355845;
<li>This also seems to work, using the id for just that one item:</li>
</ul>
<divclass="highlight"><pretabindex="0"style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><codeclass="language-console"data-lang="console"><spanstyle="display:flex;"><span>dspace=# UPDATE metadatavalue SET text_lang='en_US' WHERE dspace_object_id='9840d19b-a6ae-4352-a087-6d74d2629322';
<li>This seems to work better for some reason:</li>
</ul>
<divclass="highlight"><pretabindex="0"style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><codeclass="language-console"data-lang="console"><spanstyle="display:flex;"><span>dspacetest=# UPDATE metadatavalue SET text_lang='en_US' WHERE metadata_field_id=166 AND dspace_object_id IN (SELECT uuid FROM item);
<li>The first request is OK, but the second one is malformed for sure</li>
</ul>
<h2id="2021-02-24">2021-02-24</h2>
<ul>
<li>Export a list of journals for Peter to look through:</li>
</ul>
<divclass="highlight"><pretabindex="0"style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><codeclass="language-console"data-lang="console"><spanstyle="display:flex;"><span>localhost/dspace63= > \COPY (SELECT DISTINCT text_value as "cg.journal", count(*) FROM metadatavalue WHERE dspace_object_id IN (SELECT uuid FROM item) AND metadata_field_id=251 GROUP BY text_value ORDER BY count DESC) to /tmp/2021-02-24-journals.csv WITH CSV HEADER;
<li>The current items index has 101380 items… I wonder what happened
<ul>
<li>I started a new indexing</li>
</ul>
</li>
</ul>
<h2id="2021-02-26">2021-02-26</h2>
<ul>
<li>Last night’s indexing was more successful, there are now 101479 items in the index</li>
<li>Yesterday Yousef sent a <ahref="https://github.com/ilri/OpenRXV/pull/77/">pull request</a> for the next/previous buttons on OpenRXV
<ul>
<li>I tested it this morning and it seems to be working</li>
</ul>
</li>
</ul>
<h2id="2021-02-28">2021-02-28</h2>
<ul>
<li>Abenet asked me to import seventy-three records for CRP Forests, Trees and Agroforestry
<ul>
<li>I checked them briefly and found that there were thirty+ journal articles, and none of them had <code>cg.journal</code>, <code>cg.volume</code>, <code>cg.issue</code>, or <code>dcterms.license</code> so I spent a little time adding them</li>
<li>I used a GREL expression to extract the journal volume and issue from the citation into new columns:</li>
<li>This <code>value.partition</code> was new to me… and it took me a bit of time to figure out whether I needed to escape the parentheses in the issue number or not (no) and how to reference a capture group with <code>value.replace</code></li>
<li>I tried to check the 1095 CIFOR records from last week for duplicates on DSpace Test, but the page says “Processing” and never loads
<ul>
<li>I don’t see any errors in the logs, but there are two jQuery errors in the browser console</li>
<li>I filed <ahref="https://tracker.atmire.com/tickets-cgiar-ilri/view-ticket?id=934">an issue</a> with Atmire</li>
</ul>
</li>
<li>Upload twelve items to CGSpace for Peter</li>
<li>Niroshini from IWMI is still having issues adding WLE subjects to items during the metadata review step in the workflow</li>
<li>It seems the BatchEditConsumer log spam is gone since I applied <ahref="https://github.com/ilri/DSpace/pull/462">Atmire’s patch</a></li>
</ul>
<divclass="highlight"><pretabindex="0"style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><codeclass="language-console"data-lang="console"><spanstyle="display:flex;"><span>$ grep -c <spanstyle="color:#e6db74">'BatchEditConsumer should not have been given'</span> dspace.log.2021-02-<spanstyle="color:#f92672">[</span>12<spanstyle="color:#f92672">]</span>*