CGSpace Notes

Documenting day-to-day work on the CGSpace repository.

January, 2022

2022-01-01

  • Start a full harvest on AReS

2022-01-06

  • Add ORCID identifier for Chris Jones to CGSpace
    • Also tag eighty-eight of his items in CGSpace:
$ cat 2022-01-06-add-orcids.csv 
dc.contributor.author,cg.creator.identifier
"Jones, Chris","Chris Jones: 0000-0001-9096-9728"
"Jones, Christopher S.","Chris Jones: 0000-0001-9096-9728"
$ ./ilri/add-orcid-identifiers-csv.py -i 2022-01-06-add-orcids.csv -db dspace63 -u dspacetest -p 'dom@in34sniper' 

2022-01-09

  • Validate and register CGSpace on OpenArchives
    • Last month IWMI colleagues were asking me to look into this, and after checking the OpenArchives mailing list it seems there was a problem on the server side
    • Now it has worked and the message is “Successfully updated OAI registration database to status COMPLIANT.”
    • I received an email (as the Admin contact on our OAI) that says:

Your repository has been registered in the OAI database of conforming repositories.

  • Now I’m taking a screenshot of the validation page for posterity, because the logs seem to go away after some time

OpenArchives.org registration

  • I tried to re-build the Docker image for OpenRXV and got an error in the backend:
...
> openrxv-backend@0.0.1 build
> nest build

node_modules/@elastic/elasticsearch/api/types.d.ts:2454:13 - error TS2456: Type alias 'AggregationsAggregate' circularly references itself.

2454 export type AggregationsAggregate = AggregationsSingleBucketAggregate | AggregationsAutoDateHistogramAggregate | AggregationsFiltersAggregate | AggregationsSignificantTermsAggregate<any> | AggregationsTermsAggregate<any> | AggregationsBucketAggregate | AggregationsCompositeBucketAggregate | AggregationsMultiBucketAggregate<AggregationsBucket> | AggregationsMatrixStatsAggregate | AggregationsKeyedValueAggregate | AggregationsMetricAggregate
                 ~~~~~~~~~~~~~~~~~~~~~
node_modules/@elastic/elasticsearch/api/types.d.ts:3209:13 - error TS2456: Type alias 'AggregationsSingleBucketAggregate' circularly references itself.

3209 export type AggregationsSingleBucketAggregate = AggregationsSingleBucketAggregateKeys
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 2 error(s).
  • Ah, it seems the code on the server was slightly out of date
    • I checked out the latest master branch and it built

2022-01-12

2022-01-19

  • Francesca was having issues with a submission on CGSpace this week
    • I checked and see a lot of locks in PostgreSQL:
$ psql -c "SELECT application_name FROM pg_locks pl LEFT JOIN pg_stat_activity psa ON pl.pid = psa.pid" | sort | uniq -c | sort -n
      1 
      1 ------------------
      1 (3506 rows)
      1  application_name 
      9  psql
     10  
   3487  dspaceWeb
  • As before, I see messages from PostgreSQL about processes waiting for locks since I enabled the log_lock_waits setting last month:
$ grep -E '^2022-01*' /var/log/postgresql/postgresql-10-main.log | grep -c 'still waiting for'
12
  • I set a system alert on DSpace and then restarted the server

2022-01-20

  • Abenet gave me a thumbs up for Gaia’s eighteen CAS Green Cover items from last month
    • I created a SimpleArchiveFormat bundle with SAFBuilder and then imported them on CGSpace:
$ JAVA_OPTS="-Xmx1024m -Dfile.encoding=UTF-8" dspace import --add --eperson=aorth@mjanja.ch --source /tmp/SimpleArchiveFormat --mapfile=./2022-01-20-green-covers.map

2022-01-21

  • Start working on the rest of the ~980 CGIAR TAC and ICW documents from Gaia
    • I did some cleanups and standardization of author names
    • I also noticed that a few dozen items had no dates at all, so I checked the PDFs and found dates for them in the text
    • Otherwise all items have only a year, which is not great…
  • Proof of concept upgrade of OpenRXV from Angular 9 to Angular 10

2022-01-22

  • Spend some time adding months to the CGIAR TAC and IWC records from Gaia
    • Most of the PDFs have months so this is annoying…

2022-01-23

  • Finalize cleaning up the dates on the CGIAR TAC and IWC records from Gaia
  • Rebuild AReS and start a fresh harvest

2022-01-25

  • Help Udana from IWMI answer some questions about licenses on their journal articles
    • I was surprised to see they have 921 total, but only about 200 have a dcterms.license field
    • I updated about thirty manually, but really Udana should do more…
  • Normalize the metadata text_lang attributes on CGSpace database:
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     | 2803350
 en        |    6232
           |    3200
 fr        |       2
 vn        |       2
 92        |       1
 sp        |       1
           |       0
(8 rows)
dspace=# UPDATE metadatavalue SET text_lang='en_US' WHERE dspace_object_id IN (SELECT uuid FROM item) AND text_lang IN ('en', '92', '');
UPDATE 9433
  • Then export the WLE Journal Articles collection again so there are fewer columns to mess with

2022-01-26

  • Send Gaia an example of the duplicate report for the first 200 TAC items to see what she thinks

2022-01-27

  • Work on WLE’s Journal Articles a bit more
    • I realized that ~130 items have DOIs in their citation, but no cg.identifier.doi field
    • I used this OpenRefine GREL to copy them:
cells['dcterms.bibliographicCitation[en_US]'].value.split("doi: ")[1]
  • I also spent a bit of time cleaning up ILRI Journal Articles, but I notice that we don’t put DOIs in the citation so it’s not possible to fix items that are missing DOIs that way
    • And I cleaned up and normalized some licenses
  • Francesca from Bioversity was having issues with a submission on CGSpace again
    • I looked at PostgreSQL and see an increasing number of locks:
$ psql -c "SELECT application_name FROM pg_locks pl LEFT JOIN pg_stat_activity psa ON pl.pid = psa.pid" | sort | uniq -c | sort -n
      1 
      1 ------------------
      1 (537 rows)
      1  application_name 
      9  psql
     51  dspaceApi
    477  dspaceWeb
$ grep -E '^2022-01*' /var/log/postgresql/postgresql-10-main.log | grep -c 'still waiting for'
3
  • I set a system alert on CGSpace and then restarted Tomcat and PostgreSQL