DataConservancy / dcs-packaging-osf

Open Science Framework packaging model, client, and utilities.
2 stars 3 forks source link

"Academia" field mappings in User class misspelled #23

Open karenhanson opened 7 years ago

karenhanson commented 7 years ago

The Academia fields in the User class represent the custom components of a social field: https://{academia_institution}.academia.edu/{academia_profile_id}

Therefore, in the User class, "academicaInstitution" should be "academia_institution" and "academicaProfileId" should be "academia_profile_id" to match the json field names.

Similarly, the OWL references should be named: OwlProperties.OSF_HAS_ACADEMIAINSTITUTION and OwlProperties.OSF_HAS_ACADEMIAPROFILEID

Here is the relevant code for matching the names correctly: https://github.com/CenterForOpenScience/osf.io/blob/develop/api/users/serializers.py

I recommend waiting to do this change for a while as the social ID fields are currently available in dev mode only, pending formatting review. They may change format in the near future.

emetsger commented 7 years ago

A fix for this should include test JSON, noting that right now the client uses version 2.2 of the OSF API. Probably these fields are mis-named 1) because tests don't exist, and 2) because the fields aren't part of the production 2.2 OSF API.

If the social fields aren't going to be made available in version 2.2 of the API, but will be made available in a newer version (e.g. 2.3, or 3.0) of the API, then we would need to look at updating the OSF Java client to a newer version.