- Look at Bioversity's latest migration CSV and now I see that Francesco has cleaned up the extra columns and the newline at the end of the file, but many of the column headers have an extra space in the name...
## 2019-08-04
- Deploy ORCID identifier updates requested by Bioversity to CGSpace
- Run system updates on CGSpace (linode18) and reboot it
- Before updating it I checked Solr and verified that all statistics cores were loaded properly...
- After rebooting, all statistics cores were loaded... wow, that's lucky.
- Run system updates on DSpace Test (linode19) and reboot it
- There are about thirty PDFs that have French or Spanish filenames and there seems to be an encoding issue
- I asked Francesco if he can give me a PDF URL column instead of a "filename" column so I can download the files myself
- At *least* the ~50 filenames identified by the following GREL will have issues:
```
or(
isNotNull(value.match(/^.*’.*$/)),
isNotNull(value.match(/^.*é.*$/)),
isNotNull(value.match(/^.*á.*$/)),
isNotNull(value.match(/^.*è.*$/)),
isNotNull(value.match(/^.*í.*$/)),
isNotNull(value.match(/^.*ó.*$/)),
isNotNull(value.match(/^.*ú.*$/)),
isNotNull(value.match(/^.*à.*$/)),
isNotNull(value.match(/^.*û.*$/))
).toString()
```
- I tried to extract the filenames and construct a URL to download the PDFs with my `generate-thumbnails.py` script, but there seem to be several paths for PDFs so I can't guess it properly
- I will have to wait for Francesco to respond about the PDFs, or perhaps proceed with a metadata-only upload so we can do other checks on DSpace Test
- Daniel Haile-Michael asked about using a logical OR with the DSpace OpenSearch, but I looked in the DSpace manual and it does not seem to be possible
## 2019-08-08
- Moayad noticed that the HTTPS certificate expired on the AReS dev server (linode20)
- The first problem was that there is a Docker container listening on port 80, so it conflicts with the ACME http-01 validation
- The second problem was that we only allow access to port 80 from localhost
- I adjusted the `renew-letsencrypt` systemd service so it stops/starts the Docker container and firewall:
- It is important that the firewall starts back up before the Docker container or else Docker will complain about missing iptables chains
- Also, I updated to the latest TLS Intermediate settings as appropriate for Ubuntu 18.04's [OpenSSL 1.1.0g with nginx 1.16.0](https://ssl-config.mozilla.org/#server=nginx&server-version=1.16.0&config=intermediate&openssl-version=1.1.0g&hsts=false&ocsp=false)
- Run all system updates on AReS dev server (linode20) and reboot it
- Get a list of all PDFs from the Bioversity migration that fail to download and save them so I can try again with a different path in the URL:
- Even so, there are still 52 items with incorrect filenames, so I can't derive their PDF URLs...
- For example, `Wild_cherry_Prunus_avium_859.pdf` is here (with double underscore): https://www.bioversityinternational.org/fileadmin/_migrated/uploads/tx_news/Wild_cherry__Prunus_avium__859.pdf
- I will proceed with a metadata-only upload first and then let them know about the missing PDFs
- Troubleshoot an issue we had with proxying to the new development version of AReS from DSpace Test (linode19)
- For some reason the host header in the proxy pass is not set so nginx on DSpace Test makes a request to the upstream nginx on an IP-based virtual host
- The upstream nginx returns HTTP 444 because we configured it to not answer when a request does not send a valid hostname
- The solution is to set the host header when proxy passing:
```
proxy_set_header Host dev.ares.codeobia.com;
```
- Though I am really wondering why this happened now, because the configuration has been working for months...
- Improve the output of the suspicious characters check in [csv-metadata-quality](https://github.com/alanorth/csv-metadata-quality) script and tag version 0.2.0
- Looking at the 128 IITA records (20195TH.xls) that Sisay uploadd to DSpace Test last month: [IITA_July_29](https://dspacetest.cgiar.org/handle/10568/102361)
- The records are pretty clean because Sisay ran them through the csv-metadata-quality tool
- I fixed one incorrect country (MELBOURNE)
- I normalized all DOIs to be https://doi.org format
- This item is using the wrong Google Books link: https://dspacetest.cgiar.org/handle/10568/102593
- The French abstract here has copy/paste errors: https://dspacetest.cgiar.org/handle/10568/102491
- Validate and normalize affiliations against our 2019-04 list using reconcile-csv and OpenRefine:
-`$ lein run ~/src/git/DSpace/2019-04-08-affiliations.csv name id`
- I always forget how to copy the reconciled values in OpenRefine, but you need to make a new colum and populate it using this GREL: `if(cell.recon.matched, cell.recon.match.name, value)`
- I asked Bosede to check about twenty-five invalid AGROVOC subjects identified by csv-metadata-quality script
- I still need to check the sponsors and then check for duplicates
- Validate and normalize affiliations against our 2019-02 list using reconcile-csv and OpenRefine:
-`$ lein run ~/src/git/DSpace/2019-02-22-sponsorships.csv name id`
- I always forget how to copy the reconciled values in OpenRefine, but you need to make a new colum and populate it using this GREL: `if(cell.recon.matched, cell.recon.match.name, value)`
- I checked the collection for duplicates and found a few:
- https://dspacetest.cgiar.org/handle/10568/102513 is a duplicate of CIAT item: https://cgspace.cgiar.org/handle/10568/44158
- https://dspacetest.cgiar.org/handle/10568/102512 is a duplicate of CIAT item: https://cgspace.cgiar.org/handle/10568/43557
- Create and merge a pull request ([#429](https://github.com/ilri/DSpace/pull/429)) to add eleven new CCAFS Phase II Project Tags to CGSpace
- Atmire responded to the [Solr cores issue](https://tracker.atmire.com/tickets-cgiar-ilri/view-ticket?id=685) last week, but they could not reproduce the issue
- I told them not to continue, and that we would keep an eye on it and keep troubleshooting it (if neccessary) in the public eye on dspace-tech and Solr mailing lists
- Testing an import of 1,429 Bioversity items (metadata only) on my local development machine and got an error with Java memory after about 1,000 items:
- To make sure we didn't have memory issues I reduced Tomcat's JVM heap by 512m, increased the import processes's heap to 512m, and split the input file into two parts with about 700 each
- Then I had to create a few new temporary collections on DSpace Test that had been created on CGSpace after our last sync
- Francesco sent me a new CSV with the raw filenames and paths for the Bioversity migration
- All file paths are relative to the Typo3 upload path of `/fileadmin` on the Bioversity website
- I create a new column with the derived URL that I can use to download the PDFs with my `generate-thumbnails.py` script
- Unfortunately now the filename column has paths too, so I have to use a simple Python/Jython script in OpenRefine to get the basename of the files in the filename column:
```
import os
return os.path.basename(value)
```
- Then I can try to download all the files again with the script
- Upload [csv-metadata-quality repository to ILRI's GitHub organization](https://github.com/ilri/csv-metadata-quality)
- Fix a few invalid countries in IITA's [July 29](https://dspacetest.cgiar.org/handle/10568/102361) records (aka "20195TH.xls")
- These were not caught by my csv-metadata-quality check script because of a logic error
- Remove `dc.identified.uri` fields from test data, set `id` values to "-1", add collection mappings according to `dc.type`, and Upload 126 IITA records to CGSpace
- Peter asked me to add related citation aka `cg.link.citation` to the item view
- I created a [pull request](https://github.com/ilri/DSpace/pull/430) with a draft implementation and asked for Peter's feedback
- Add the ability to skip certain fields from the csv-metadata-quality script using `--exclude-fields`
- For example, when I'm working on the author corrections I want to do the basic checks on the corrected fields, but on the original fields so I would use `--exclude-fields dc.contributor.author` for example