Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change role to Credit #373

Open
Jomula opened this issue Sep 29, 2023 · 4 comments
Open

Change role to Credit #373

Jomula opened this issue Sep 29, 2023 · 4 comments
Assignees

Comments

@Jomula
Copy link
Contributor

Jomula commented Sep 29, 2023

Right now, the role field in contacts refers to our internal role taxonomy. We should change it to an array and insert the CRediT PIDs, e.g. 0c8ca7d4-06ad-4527-9cea-a8801fcb8746 for Supervision (or even the whole URI).

@theodore-s-beers
Copy link
Collaborator

I've mostly taken care of this in #375. role became roles. It's now an array, each of whose values must belong to a defined set of strings, representing the CRediT roles. (This uses the enum type in Zod; we do the same thing to validate keywords.)

What used to be our role 0 became supervision. The old role 1 became investigation. I don't know whether this was ideal in every case, but I didn't see better options for blanket changes. NB: 0 and 1 were the only roles in the previous system that we were actually using. @XeniaMonika, we now have a lot more options in this part of the schema. There are fourteen roles to choose from, and a given contact can be assigned more than one of them. It's something to think about in terms of maintaining/updating existing entries in our database, as well as adding new projects.

The schema version has been bumped from 0.2.0 to 0.2.1. @XeniaMonika, this will require another brief entry in the schema changelog.

@Jomula, I haven't added the role PIDs yet. How should that work? Should each role be an object with name and id fields?

@Jomula
Copy link
Contributor Author

Jomula commented Oct 11, 2023

I think object with name and id would be perfect, this would make it possible to refer to the PID, but also provides a way to simply read the name of the role in the data.

@theodore-s-beers
Copy link
Collaborator

I've done a bit more on this in #388.

@Jomula, as you can see, for the time being I've gone with (name, id) tuples instead of objects. It's just a more compact type. Let me know if this seems problematic.

So far the role IDs have been added only in the schema. i.e., in a roles array in a project JSON file, it will still just be a list of role names. I can change that once I know that people are ok with using tuples. (You can imagine that, if multiple roles were listed for a given contact, an array of tuples would look less messy than an array of objects.)

@Jomula
Copy link
Contributor Author

Jomula commented Oct 18, 2023

I'm fine with tuple arrays, as long as it's properly documented!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants