-
Notifications
You must be signed in to change notification settings - Fork 2
Add author, organization and grant types. #1
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
base: main
Are you sure you want to change the base?
Conversation
| members?: (Person | Organization)[]; | ||
|
|
||
| /** Sub-organizations (inverse of parentOrganizations). */ | ||
| subOrganization?: Organization[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need subOrganizations here; if they were involved, then they should be the actual organization in the attribution. If not, then they shouldn't appear at all. I don't think this adds information that's necessary for a document to be completely described.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also includes departments for an institute which may have different identifiers and billing contracts. I was going off of how Stencila uses this portion.
| order?: number; // In JSON-schema this should have a minimum of 0. | ||
| } | ||
|
|
||
| export enum AuthorCRediT { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to avoid typescript enums; they have negative downstream consequences for building packages. See eg https://www.totaltypescript.com/why-i-dont-like-typescript-enums
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... Good point. How should we handle this? They are supported in JSON-schema.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we even want to support AuthCredit or should we just leave it as PropertyValue like other identifiers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string[]?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PropertyValue makes you have to see what kind of identifier it is in case it changes what things people want to use for contributions. Makes it a longer lasting schema.
| /** | ||
| * The name of a Person object. | ||
| */ | ||
| export type PersonName = Record<string, unknown> & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to be extremely careful about names: https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love that article! I was talking to Nokome about how I'm, myself, an edgecase with multiple legal names. So! I'm going off of schema.org and Stencila here as a compromise. I think this is the best and most common way of gathering this information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made family name optional in latest push.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm, in this case, not letting "good" get in the way of "good enough". :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In schema.org they're all optional and a single string: https://schema.org/Person
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, Stencila has multiple/array here which is where I based off of. I originally had it as a single value, but Nokome pointed out Stencila has needed to use multiple values for names so that seems fine to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nokome, tagging you here for comment: can you give a bit more context on how multiple names are used, in contrast to how CSL-JSON does it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the schema for this: https://github.com/stencila/stencila/blob/f4daaea38f09136a5b3108825b845e7ddd1d202c/json/Person.schema.json#L17
| /** ===================== | ||
| * MonetaryAmount | ||
| * ===================== */ | ||
| export type MonetaryAmount = Record<string, unknown> & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is too fine-grained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it helps add some structure. We do need to enforce something. Schema.org has these mechanics and I think it's a good way of doing it. There are multiple options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do need to enforce something.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having too much flexibility brings us back to JATS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is about exchanging documents. We truly don't have to define a standard for exchanging monetary units.
|
I think that it would be useful to see what existing systems use for name schemas.
|
This allows for the base objects of author, organization and grant types using TypeScript.