-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Make it possible to add non-PUDL data sources and metadata to the archiver #506
Merged
+106
−32
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e724bd7
Move MECS to metadata sources dictionary, add non-pudl-metadata method
e-belfer 4ce5cd8
Merge branch 'main' into add-non-pudl-metadata
e-belfer e2a4fb5
Make archiving flow work, rename to eiamecs, update README
e-belfer d4f0acb
Restore from_id() method
e-belfer ef9180e
Make from_pudl_metadata more obvious by specifying sources
e-belfer 14638ef
Merge branch 'main' into add-non-pudl-metadata
e-belfer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
"""Metadata and operational constants.""" | ||
|
||
from typing import Any | ||
|
||
from pudl.metadata.constants import CONTRIBUTORS, LICENSES | ||
|
||
# To add a new contributor, follow the following format to add an entry to the | ||
# ADDL_CONTRIBUTORS dictionary below formatted like this: | ||
# "name-shorthand": { | ||
# "title": "Catalyst Cooperative", | ||
# "email": "[email protected]", | ||
# "path": "https://catalyst.coop", | ||
# "role": "publisher", | ||
# "zenodo_role": "distributor", | ||
# "organization": "Catalyst Cooperative", | ||
# "orcid": "0000-1234-5678-9101" | ||
# } | ||
# Note that the only required fields are title (your name) and path | ||
# (e.g., a link to your Github account, your ORCID site or a personal webpage), but | ||
# filling other fields is strongly encouraged! | ||
ADDL_CONTRIBUTORS: dict[str, dict[str, str]] = {} | ||
|
||
NON_PUDL_SOURCES: dict[str, Any] = { | ||
"eiamecs": { | ||
"title": "EIA Manufacturing Energy Consumption Survey", | ||
"path": "https://www.eia.gov/consumption/manufacturing/data/2018/", | ||
"description": ( | ||
"EIA Form 846 A and B is more commonly known as the Manufacturing Energy" | ||
"Consumption Survey (MECS). MECS is a national sample survey that collects" | ||
"information on the stock of U.S. manufacturing establishment, their" | ||
"energy-related building characteristics, and their energy consumption" | ||
"and expenditures. MECS is conducted every four years." | ||
), | ||
"working_partitions": { | ||
"years": [1991, 1994, 1998, 2002, 2006, 2010, 2014, 2018] | ||
}, # Census DP1 is monolithic. | ||
"keywords": sorted( | ||
{ | ||
"manufacturing", | ||
"MECS", | ||
} | ||
), | ||
"license_raw": LICENSES["us-govt"], | ||
"license_pudl": LICENSES["cc-by-4.0"], | ||
"contributors": [CONTRIBUTORS["catalyst-cooperative"]], | ||
}, | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 if you change this to call
from_id
instead ofdict_from_id
, that should fix the broken tests.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.
Whoops, I see now that
from_id
doesn't take thesources
dict right now. It's a bit of a pain to have to do another PUDL PR, but I think the most consistent API would be to addsources
to thefrom_id
method, since you're basically just copying whatfrom_id
does here.