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

Refactor test_validate_override_fixes to be a unit test #3256

Open
3 tasks
katie-lamb opened this issue Jan 18, 2024 · 0 comments
Open
3 tasks

Refactor test_validate_override_fixes to be a unit test #3256

katie-lamb opened this issue Jan 18, 2024 · 0 comments
Labels
ferc1 Anything having to do with FERC Form 1 ppe Plant Parts EIA (formerly the EIA plant parts list) testing Writing tests, creating test data, automating testing, etc.

Comments

@katie-lamb
Copy link
Member

katie-lamb commented Jan 18, 2024

As was pointed out in #3251 , currently test_validate_override_fixes is an integration test for the FERC to EIA entity matching module that tests the functionality of validate_override_fixes. The test has parameters with record IDs that need to be updated annually to ensure that those records are from report years that are processed in the fast ETL. The test uses the FERC to EIA training data within validate_override_fixes.

Instead, this test should be refactored to be a unit test that takes synthetic training data that is passed into validate_override_fixes. Additionally, instead of XFAIL-ing, the tests should pass if an expected exception is raised or failure condition is observed. Finally, validate_override_fixes shouldn't allow duplicate FERC IDs to be matched to different EIA records after the overrides are complete. There are test parameters set up to test this, but the validate_override_fixes function won't actually catch that condition in it's current state.

  • Refactor test_validate_override_fixes to be a unit test that uses synthetic FERC to EIA training data
  • Change XFAIL-ing tests to tests that pass if an expected exception is raised
  • Add a check in pudl.analysis.record_linkage.eia_ferc1_record_linkage.validate_override_fixes to make sure that there aren't duplicate FERC1 IDs matched to EIA records.
@zaneselvans zaneselvans added ferc1 Anything having to do with FERC Form 1 testing Writing tests, creating test data, automating testing, etc. ppe Plant Parts EIA (formerly the EIA plant parts list) labels Jan 18, 2024
@jdangerx jdangerx moved this from New to Icebox in Catalyst Megaproject Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ferc1 Anything having to do with FERC Form 1 ppe Plant Parts EIA (formerly the EIA plant parts list) testing Writing tests, creating test data, automating testing, etc.
Projects
Status: Icebox
Development

No branches or pull requests

2 participants