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

Pass sources to DataSource.from_id() #4013

Merged
merged 4 commits into from
Jan 15, 2025
Merged

Conversation

e-belfer
Copy link
Member

@e-belfer e-belfer commented Jan 14, 2025

Overview

Relevant to catalyst-cooperative/pudl-archiver#506.

What problem does this address?

In #4003 I updated DataSource.dict_from_id() to take sources. However, from_id() is an upstream method called in the pudl-archiver repository, and I neglected to add sources as a parameter here. This PR fixes this problem.

What did you change?

  • Added sources as a parameter to DataSource.from_id()
  • Made SOURCES the default in from_id() and not dict_from_id(). from_id() is more widely called both in PUDL and the pudl-archiver repo, and this removes duplicate defaults in the class.

Documentation

Make sure to update relevant aspects of the documentation.

Tasks

Preview Give feedback

Testing

How did you make sure this worked? How can a reviewer verify this?

To-do list

Preview Give feedback

@e-belfer e-belfer requested a review from zschira January 14, 2025 16:06
@e-belfer e-belfer self-assigned this Jan 14, 2025
Copy link
Member

@zschira zschira left a comment

Choose a reason for hiding this comment

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

Looks good!

@e-belfer e-belfer added this pull request to the merge queue Jan 14, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 14, 2025
@e-belfer e-belfer enabled auto-merge January 15, 2025 14:56
@e-belfer e-belfer added this pull request to the merge queue Jan 15, 2025
Merged via the queue into main with commit 5825a26 Jan 15, 2025
17 checks passed
@e-belfer e-belfer deleted the fix-datasources-from-id-sources branch January 15, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants