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

Add type hints to helpers and update DBF extraction tests #2841

Merged
merged 6 commits into from
Sep 12, 2023

Conversation

zaneselvans
Copy link
Member

@zaneselvans zaneselvans commented Sep 9, 2023

PR Overview

This is just me being a little bit OCD.

  • Added type hints to all remaining functions in pudl.helpers that didn't have them.
  • Added schema compatability checks for FERC 6 and 60 DBF derived SQLite DBs.
  • Use a context manager when dropping tables in pudl.helpers.drop_tables()

PR Checklist

  • Merge the most recent version of the branch you are merging into (probably dev).
  • All CI checks are passing. Run tests locally to debug failures
  • Make sure you've included good docstrings.
  • For major data coverage & analysis changes, run data validation tests
  • Include unit tests for new functions and classes.
  • Defensive data quality/sanity checks in analyses & data processing functions.
  • Update the release notes and reference reference the PR and related issues.
  • Do your own explanatory review of the PR to help the reviewer understand what's going on and identify issues preemptively.

This is just me being a little bit OCD.

* Added type hints to all remaining functions in pudl.helpers that didn't have them.
* Added schema compatability checks for FERC 6 and 60 DBF derived SQLite DBs.
* Removed a no lonter used `pudl.hemlers.merge_dicts()` function.
* Use a context manager when dropping tables in `pudl.helpers.drop_tables()`
@zaneselvans zaneselvans changed the base branch from main to dev September 9, 2023 15:16
@e-belfer e-belfer self-requested a review September 11, 2023 14:32
Copy link
Member

@e-belfer e-belfer left a comment

Choose a reason for hiding this comment

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

Some other changes suggested while you're at it, and one non-blocking question. Otherwise looks good, presuming the code runs as expected.

src/pudl/helpers.py Show resolved Hide resolved
src/pudl/helpers.py Outdated Show resolved Hide resolved
src/pudl/helpers.py Outdated Show resolved Hide resolved
src/pudl/helpers.py Show resolved Hide resolved
@zaneselvans zaneselvans marked this pull request as ready for review September 11, 2023 22:33
@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Patch coverage: 84.8% and project coverage change: -0.1% ⚠️

Comparison is base (f19f85a) 88.5% compared to head (73a0c79) 88.5%.
Report is 4 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##             dev   #2841     +/-   ##
=======================================
- Coverage   88.5%   88.5%   -0.1%     
=======================================
  Files         90      90             
  Lines      10139   10139             
=======================================
- Hits        8983    8982      -1     
- Misses      1156    1157      +1     
Files Changed Coverage Δ
src/pudl/helpers.py 86.3% <84.8%> (-0.3%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zaneselvans zaneselvans merged commit 8564147 into dev Sep 12, 2023
9 of 11 checks passed
@zaneselvans zaneselvans deleted the type-hints-helpers branch September 12, 2023 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants