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

👯‍♀️ Add collaborations to Contributor type #1038

Merged
merged 4 commits into from
Mar 28, 2024

Conversation

fwkoch
Copy link
Collaborator

@fwkoch fwkoch commented Mar 28, 2024

Now, in addition to being a Person, any Contributor in myst frontmatter may be a "collaboration" - that is, an Affiliation with collaboration: true. The logic to determine if a user-specified contributor is a person or a collaboration relies on checking the collaboration field - if true, it is a collaboration and validated as such; if falsy it is a person.

This addresses a point in #1009

@fwkoch fwkoch mentioned this pull request Mar 28, 2024
16 tasks
if (value === undefined) return undefined;
if (inputAff && Object.keys(inputAff).length > Object.keys(value).length) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice little check that says "Your input looks more like an affiliation than a person."

@@ -134,6 +134,33 @@ cases:
family: Name
email: [email protected]
corresponding: false
- title: No email is corresponding if first is false
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed this behaviour and wanted to raise it:

Is it intentional that specifying corresponding: false on one author, prevents any other author from implicitly getting the corresponding: true flag?

I can see arguments either way:

(Yes, to the above question): the user knows about the corresponding flag, as they used it on one of their authors. If they did want a corresponding author, they would have known to add it.
(No, to the above question): we should always try to have a corresponding author where possible.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets make the change! And update this test case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

@fwkoch fwkoch force-pushed the feat/reviewer-editor branch 2 times, most recently from 783fa57 to 94dd6a4 Compare March 28, 2024 22:06
Base automatically changed from feat/reviewer-editor to main March 28, 2024 23:18
@fwkoch fwkoch merged commit ffb239a into main Mar 28, 2024
4 checks passed
@fwkoch fwkoch deleted the feat/collabs-as-contribs branch March 28, 2024 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants