<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>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>
Exporting community 'International Livestock Research Institute (ILRI)' (10568/1)
Exception: null
java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:212)
at com.google.common.collect.Iterators.concat(Iterators.java:464)
at org.dspace.app.bulkedit.MetadataExport.addItemsToResult(MetadataExport.java:136)
at org.dspace.app.bulkedit.MetadataExport.buildFromCommunity(MetadataExport.java:125)
at org.dspace.app.bulkedit.MetadataExport.<init>(MetadataExport.java:77)
at org.dspace.app.bulkedit.MetadataExport.main(MetadataExport.java:282)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)
</code></pre><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>
<pre><codeclass="language-console"data-lang="console">$ time chrt -b 0 dspace index-discovery -b
$ dspace oai import -c
</code></pre><ul>
<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>
<pre><codeclass="language-console"data-lang="console">$ csvcut -c id /tmp/2021-02-10-ILRI.csv | sed '1d' | wc -l
<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>
<pre><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>
<pre><codeclass="language-console"data-lang="console">"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"
</code></pre><ul>
<li>I purged the hits from these two using my <code>check-spider-ip-hits.sh</code>:</li>
<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?)
<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>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>
<pre><codeclass="language-console"data-lang="console">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 ~ ';$';
UPDATE 104
</code></pre><ul>
<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>
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 ~ ';$';
UPDATE 104
dspace=# COMMIT;
</code></pre><ul>
<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>
dspace=# UPDATE metadatavalue SET text_lang='en_US' WHERE text_lang !='en_US' AND dspace_object_id IN (SELECT uuid FROM item);
UPDATE 911
cgspace=# COMMIT;
</code></pre><ul>
<li>Then export all series with their IDs to CSV:</li>
</ul>
<pre><codeclass="language-console"data-lang="console">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;
</code></pre><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>
<pre><codeclass="language-console"data-lang="console">dspace=# UPDATE metadatavalue SET text_lang='en_US' WHERE metadata_value_id=5355845;
UPDATE 1
</code></pre><ul>
<li>This also seems to work, using the id for just that one item:</li>
</ul>
<pre><codeclass="language-console"data-lang="console">dspace=# UPDATE metadatavalue SET text_lang='en_US' WHERE dspace_object_id='9840d19b-a6ae-4352-a087-6d74d2629322';
UPDATE 37
</code></pre><ul>
<li>This seems to work better for some reason:</li>
</ul>
<pre><codeclass="language-console"data-lang="console">dspacetest=# UPDATE metadatavalue SET text_lang='en_US' WHERE metadata_field_id=166 AND dspace_object_id IN (SELECT uuid FROM item);
UPDATE 18659
</code></pre><ul>
<li>I split the CSV file in batches of 5,000 using xsv, then imported them one by one in CGSpace:</li>
<li>Export a list of journals for Peter to look through:</li>
</ul>
<pre><codeclass="language-console"data-lang="console">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;
COPY 3345
</code></pre><ul>
<li>Start a fresh harvesting on AReS because Udana mapped some items today and wants to include them in his report:</li>
<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>
<pre><codeclass="language-console"data-lang="console">$ grep -c 'BatchEditConsumer should not have been given' dspace.log.2021-02-[12]*