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

Expand author roles #9901

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Expand author roles #9901

wants to merge 13 commits into from

Conversation

hornc
Copy link
Collaborator

@hornc hornc commented Sep 23, 2024

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

@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 17.27%. Comparing base (fb469a6) to head (c8a0291).
Report is 197 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

@hornc hornc marked this pull request as ready for review January 28, 2025 20:20
@cdrini cdrini self-assigned this Feb 3, 2025
@hornc hornc requested a review from cdrini February 10, 2025 20:24
@hornc
Copy link
Collaborator Author

hornc commented Feb 10, 2025

@cdrini are you able to give this a review?
@tfmorris, your review here would also be helpful, I believe this closes out the MARC import contributor improvements we've bene working towards for a while. Let me know if there is anything glaring missing.

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.

@hornc hornc requested a review from scottbarnes February 14, 2025 10:06
Copy link
Contributor

@tfmorris tfmorris left a 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",
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

@hornc hornc Feb 24, 2025

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?

Copy link
Collaborator Author

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

hornc and others added 2 commits February 24, 2025 11:58
@hornc hornc added the Module: Import Issues related to the configuration or use of importbot and other bulk import systems. [managed] label Feb 25, 2025
hornc and others added 2 commits February 25, 2025 15:27
when an author role is present in import data
add code
and test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: Import Issues related to the configuration or use of importbot and other bulk import systems. [managed]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import Author roles from import source data Make use of 'editor' as an author role
4 participants