-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Expand author roles #9901
base: master
Are you sure you want to change the base?
Expand author roles #9901
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #9901 +/- ##
==========================================
- Coverage 17.50% 17.27% -0.23%
==========================================
Files 87 87
Lines 4793 4845 +52
Branches 852 860 +8
==========================================
- Hits 839 837 -2
- Misses 3432 3477 +45
- Partials 522 531 +9 ☔ View full report in Codecov by Sentry. |
@cdrini are you able to give this a review? The full list of MARC contributor abbreviations is very large, I was thinking we can expand the list as needed based on which contributors are meaningful in the OL interface. |
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.
@hornc feel free to use Github "request review" to tag me.
This looks great. I added a couple of roles, but I don't have a good feel for what others might be missing because the test data doesn't have a very big variety. Do you have an easy way of surveying your available MARC data?
"entity_type": "person" | ||
}, | ||
{ | ||
"birth_date": "1934", | ||
"name": "Timpane, P. Michael", | ||
"role": "Editor", |
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.
How will these be treated downstream? Since there is no 1xx and no 7xx with a role of author, it seems reasonable to treat these co-editors as co-authors in the current OL data model.
Is that what will happen?
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.
That is correct, they will be treated as co-authors, on both the work and the edition.
I ran the import locally to confirm.
This is the resulting work .yml:
authors:
- author:
key: /authors/OL5A
type:
key: /type/author_role
- author:
key: /authors/OL10A
type:
key: /type/author_role
- author:
key: /authors/OL11A
type:
key: /type/author_role
created:
type: /type/datetime
value: '2025-02-24T00:41:39.838663'
key: /works/OL1W
last_modified:
type: /type/datetime
value: '2025-02-24T00:41:39.838663'
latest_revision: 1
revision: 1
subject_places:
- New Jersey
subjects:
- Congresses
- Negative income tax
- Guaranteed annual income
- Labor supply
title: Work incentives and income guarantees
type:
key: /type/work
and the edition .yml:
authors:
- key: /authors/OL5A
- key: /authors/OL10A
- key: /authors/OL11A
by_statement: editors, Joseph A. Pechman, P. Michael Timpane
created:
type: /type/datetime
value: '2025-02-24T00:41:39.838663'
dewey_decimal_class:
- 361.6/2/09749
isbn_10:
- 0815769768
- 081576975X
key: /books/OL5M
languages:
- key: /languages/eng
last_modified:
type: /type/datetime
value: '2025-02-24T00:41:39.838663'
latest_revision: 1
lc_classifications:
- HC107.N53 I58
lccn:
- '75002321'
notes:
type: /type/text
value: 'Papers and comments presented at the conference at Brookings Institution,
Apr. 29-30, 1974, sponsored by the Brookings Panel on Social Experimentation.
Includes bibliographical references and index.'
number_of_pages: 232
pagination: xiii, 232 p.
publish_country: dcu
publish_date: '1975'
publish_places:
- Washington
publishers:
- Brookings Institution
revision: 1
series:
- Brookings studies in social experimentation
source_records:
- ia:test-blah
subject_places:
- New Jersey
subjects:
- Congresses
- Negative income tax
- Guaranteed annual income
- Labor supply
subtitle: the New Jersey negative income tax experiment
title: Work incentives and income guarantees
type:
key: /type/edition
works:
- key: /works/OL1W
The "Editor" role is not even represented in the work, which is what #3084 is requesting.
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 now has me worried that there is a piece missing to make this a complete feature.
It looks like role
is only picked up by OL for what ends up in the contributors
field on editions, and is lost for authors
.
Also, only work level authors
have a role
in the model, but it seems that some of these additional roles are really more appropriate at the edition level...
For example, where should you place the 'illustrator' or 'translator' of Homer's Odyssey? On the work, or on a specific edition?
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.
With the last commit c0c0fba the role is now written to the work:
authors:
- author:
key: /authors/OL5A
role: Editor
type:
key: /type/author_role
- author:
key: /authors/OL10A
role: Editor
type:
key: /type/author_role
- author:
key: /authors/OL11A
type:
key: /type/author_role
created:
type: /type/datetime
value: '2025-02-25T04:50:42.454726'
key: /works/OL2W
last_modified:
type: /type/datetime
value: '2025-02-25T04:50:42.454726'
latest_revision: 1
revision: 1
subject_places:
- New Jersey
subjects:
- Congresses
- Negative income tax
- Guaranteed annual income
- Labor supply
title: Work incentives and income guarantees
type:
key: /type/work
Co-authored-by: Tom Morris <[email protected]>
Co-authored-by: Tom Morris <[email protected]>
when an author role is present in import data add code and test
for more information, see https://pre-commit.ci
Closes #9844
Closes #3084
Technical
Builds on PR #9797 , which should be merged first and this PR rebased for ease of review. #9797 changes very many test files, this PR modifies fewer and should be more contained to address just #9844.Now that #9797 has been merged, I have rebased this and it looks a lot neater, and makes it clear what is changing with contributor roles. Selected abbreviations are expanded from the full list to controlled contributors, and also some common ones from the freeform text of
$e
subfield.Testing
Screenshot
Stakeholders
@tfmorris