Invenio Developer Forum - Free Bazaar - Monday May 18th at 16:45 CEST

2015-05-18 Thread Esteban Gabancho
Hello:

The next Invenio Developer Forum will take place on Monday May 18th 2015
at 16:45 CEST in (i) CERN room 31-S-023 and in (ii) Vidyo
videoconferencing room at:

  https://vidyoportal.cern.ch/flex.html?roomdirect.htmlkey=ygjcGzMEk8re

Today, we shall have a free bazaar session, discussing or working on
anything of interest at hand, in smaller or wider circles.

  https://indico.cern.ch/event/395131

Best regards,
Esteban



[pu jsonalchemy] Aggregation of several fields into now

2014-03-27 Thread Esteban Gabancho
Hey guys!

I have a question about the aggregation of several fields into one.

Taking the example of the authors, lets say I have two fields `_first_author` 
and `_additional_authors` and I want to aggregate then into `authors`.
The common case, and the easiest, is when I have one `_first_author` and cero 
or more `_additional_authors`, in which case I just put a list with the authors 
(what else right? :-)
The problem, or the question, comes when I don’t have a `_first_author` in 
which case I’m not sure about the content of the `authors` field, it could be 
i) only the list of `_additional_authors` or ii) `None` follow by the the list 
of `_additional_authors`.

I think the second solution is the closest one to reality, the `None` express 
that the record doesn’t have a first author. And I also think that we could 
apply this solution for other cases where we have this kind of situation (like 
with the `110__` and `710__`).

What do you think? 
Lars, as you have already pu in production, how do you deal with this problem?

Cheers,
--
Esteban J. G. Gabancho



Re: [pu jsonalchemy] Aggregation of several fields into now

2014-03-27 Thread Esteban Gabancho
Hi Jan!

On 27 Mar 2014, at 16:02, Jan Åge Lavik jan.age.la...@cern.ch wrote:
 With the None approach, it fear it can get confusing when iterating over all 
 authors (or whatever other field) as one then get None into the mix. If one 
 really wants to get the first author, maybe calling first_author (where 
 first_author is a direct lookup to _first_author) is enough and then 
 expecting a None or empty list is alright? I dunno, it seems to me that when 
 asking for give me all the authors, None does not belong there with John 
 Ellis.

I understand (and share) your opinion, currently in the templates we are just 
iterating over the full list of authors and maybe we should start using the 
other keys. 
Lets see what the others think about this, although this is something that each 
Invenio instance should do with their data model definition.

Cheers,
--
Esteban J. G. Gabancho