Annotations#29
Conversation
plus new ones
reflecting new file structure
sbassi
left a comment
There was a problem hiding this comment.
The code looks good. Will run it locally before merging.
|
Now I found an error, will take a look later: Traceback (most recent call last): |
|
The problem is in the method filename_to_doi(). When the flow doesn't enter in any of the 3 if, this error is occurs. I will print out the filename that is being processed to see which one trigger this. |
|
This guy is the culprit: |
|
I found that the REGEX was targeted to newarticledir but the file is in the corpusdir. |
|
Pushed some changes, what is left: url_to_path(), change this method because annot_prefix is not 'plos.correction.' anymore |
|
Hi @sbassi, if you read the PR, my changes were designed to change the annotation files to a new structure. The reason your file failed is because it's the old structure: |
|
I don't get it, if it is now plos.correction, why do we have a file called journal.pone.correction.dc398db7-e121-4bce-82d1-feac6d9bc68f.xml? |
|
'annotation' DOI files deleted, redownloaded onto allofplos server, zip file recreated! |
This addresses #28 and updates the filename structure for annotation DOIs so that they do not depend on the journal name. Getting the journal name required going into the article XML or querying online.
Example DOI: '10.1371/annotation/008b05a8-229b-4aca-94ae-91e6dd5ca5ba'
Previous filename: 'allofplos_xml/journal.one.correction.008b05a8-229b-4aca-94ae-91e6dd5ca5ba.xml'
New filename: 'allofplos_xml/plos.correction.008b05a8-229b-4aca-94ae-91e6dd5ca5ba.xml'
In addition, the filename regex has been updated to this new format.
If you have an existing copy of the corpus and want to transform the annotation articles to the new format, I wrote a gist to aid with that process.
I accidentally created this from the prodteam branch instead of master so there are a lot of useless old commits. My apologies.
All transform functions are passing the unit tests.
When this PR is merged, before closing please tag me so I can be sure to update the filenames on the corpus server.