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

Separate resource definitions by data source #1386

Merged
merged 5 commits into from
Jan 7, 2022
Merged

Conversation

zaneselvans
Copy link
Member

@zaneselvans zaneselvans commented Dec 28, 2021

Getting the table-level metadata integrated into dev now will help @katie-lamb close #1253

To that end this PR does:

@codecov
Copy link

codecov bot commented Dec 28, 2021

Codecov Report

Merging #1386 (36d1bb4) into dev (6c65cd0) will increase coverage by 0.53%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1386      +/-   ##
==========================================
+ Coverage   83.17%   83.70%   +0.53%     
==========================================
  Files          61       64       +3     
  Lines        6762     6896     +134     
==========================================
+ Hits         5624     5772     +148     
+ Misses       1138     1124      -14     
Impacted Files Coverage Δ
src/pudl/metadata/labels.py 100.00% <ø> (ø)
src/pudl/metadata/resources/eia.py 100.00% <ø> (ø)
src/pudl/metadata/resources/epacems.py 100.00% <ø> (ø)
src/pudl/metadata/resources/ferc1.py 100.00% <ø> (ø)
src/pudl/metadata/resources/ferc714.py 100.00% <ø> (ø)
src/pudl/transform/eia860.py 96.43% <ø> (-0.03%) ⬇️
src/pudl/constants.py 100.00% <100.00%> (ø)
src/pudl/metadata/codes.py 100.00% <100.00%> (ø)
src/pudl/metadata/fields.py 100.00% <100.00%> (ø)
src/pudl/metadata/resources/eia860.py 100.00% <100.00%> (ø)
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c65cd0...36d1bb4. Read the comment docs.

@zaneselvans zaneselvans changed the title Eia861 metadata Pydantic metadata for EIA-861 Dec 29, 2021
@zaneselvans zaneselvans added eia861 Anything having to do with EIA Form 861 metadata Anything having to do with the content, formatting, or storage of metadata. Mostly datapackages. labels Dec 29, 2021
Split the EIA resource definitions out by form to make it easier to keep track of them.
Started incrementally adding EIA-861 tables to the metadata definitions, but not pulling
them into the main RESOURCE_METADATA construction yet since they don't work.

Also: the EIA 861 data uses multiple different sets of codes to identify the utility
"entity type" and they aren't all being recoded right now, so the use of a strict
categorical on that column ends up yielding a NA column. Temporarily reverted to
StringDtype() to avoid this issue
@zaneselvans zaneselvans changed the title Pydantic metadata for EIA-861 Separate resource definitions by data source Jan 6, 2022
@zaneselvans zaneselvans marked this pull request as ready for review January 6, 2022 22:33
@zaneselvans zaneselvans added eia860 Anything having to do with EIA Form 860 eia923 Anything having to do with EIA Form 923 labels Jan 6, 2022
Copy link
Member

@katie-lamb katie-lamb 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. Only question I had was about unknown and pd.NA values. I think for code fields like entity_type it's okay to leave unknown and not turn it into pd.NA during the transform.

@zaneselvans zaneselvans merged commit 6b6dc39 into dev Jan 7, 2022
This was referenced Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eia860 Anything having to do with EIA Form 860 eia861 Anything having to do with EIA Form 861 eia923 Anything having to do with EIA Form 923 metadata Anything having to do with the content, formatting, or storage of metadata. Mostly datapackages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants