Hi Christian,

Yes, this was done after DOIs were made to be unique per record (See
https://github.com/inveniosoftware/invenio/commit/fc4e5a4) where we saw
that our append jobs often failed because a lot of the records we ingested
on INSPIRE from arXiv had the same DOI in a different record (due to
duplicates without arXiv ID or even quite often cases where the DOI was
wrong etc.).

So this was made a separate append job as the job would sometimes fail and
therefore the other useful metadata we wanted to append would not be added
automatically. Mostly an implementation for convenience "short-term"
awaiting a more cleaner solution.

Cheers,
Jan

---
Jan Age Lavik
System Developer
INSPIRE-HEP <http://inspirehep.net>

Github: @jalavik <https://github.com/jalavik>
Work phone: +41 22 76 78682


On Mon, May 26, 2014 at 4:35 PM, Christian Estevez <
[email protected]> wrote:

> Hi,
>
> I've been taking a look to the filter
> at bibharvest/bibfilter_oaiarXiv2inspire.py from Inspire project to
> understand how that works. I've seen that, when there are fields to
> "append" or "correct", if the record contains a DOI, a separate record is
> created for the DOI (with the same recid) and the rest of fields in another
> record.
>
> Does anyone know what is the reason why the DOI is put in an independent
> record in the generated files?
>
>  if len(fields_to_add) > 0:
>>                 #Check if DOI is included in fields_to_add
>>                 fields_without_DOI = []
>>                 record_with_DOI = {}
>>                 for tag, value in fields_to_add:
>>                     if tag == '024':
>>                         DOI_field = [(tag, value)]
>>                         #Create record just with DOI field
>>                         record_with_DOI = create_record_from_list(recid, 
>> DOI_field)
>>                     else:
>>                         fields_without_DOI.append((tag, value))
>>                 # Append extra DOI record
>>                 append_records.append(create_record_from_list(recid, 
>> fields_without_DOI))
>>                 if record_with_DOI:
>>                     append_records.append(record_with_DOI)
>>
>>
> Thanks
>
> *Christian Estévez*
> Senior Software Engineer
>
> Frontiers <http://www.frontiersin.org/>
> Centro de Empresas - UPM
> Campus de Montegancedo
> 28223 Pozuelo de Alarcón
> Madrid
>
> twitter.com/FrontiersIn <http://twitter.com/frontiersin>
> facebook.com/FrontiersIn <https://www.facebook.com/Frontiersin>
>

Reply via email to