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 billing record ua to rules engine example input #180

Merged
merged 13 commits into from
May 21, 2024

Conversation

eriksynn
Copy link
Collaborator

Updated example csv data in test cases to enable new test for billing period home heat loss data algorithm verification.

@debajyotid2
Copy link
Collaborator

@eriksynn It looks like the old type annotation for List in test_examples.py is causing the pytest check to fail. Perhaps replacing it with list would help.

# Then overload NG Billing Input to contain new NG Billing Record Example Input subclass
class NaturalGasBillingExampleInput(NaturalGasBillingInput):
    records: List[NaturalGasBillingRecordExampleInput]

@eriksynn
Copy link
Collaborator Author

@eriksynn It looks like the old type annotation for List in test_examples.py is causing the pytest check to fail. Perhaps replacing it with list would help.

# Then overload NG Billing Input to contain new NG Billing Record Example Input subclass
class NaturalGasBillingExampleInput(NaturalGasBillingInput):
    records: List[NaturalGasBillingRecordExampleInput]

Yes, I made that change just now. I think this PR is now aligned with your previously submitted changes. And I fixed the import formatting that lint was complaining about. The only thing that is still failing is the pyodide.test.ts which I think is not a rules_engine thing.

Copy link
Collaborator Author

@eriksynn eriksynn left a comment

Choose a reason for hiding this comment

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

Complete an update to the example csv files to allow for testing billing period whole home heat loss calculations.

@eriksynn eriksynn merged commit b2b533c into main May 21, 2024
11 of 12 checks passed
@eriksynn eriksynn deleted the add-billing-record-ua-to-rules-engine-example-input branch May 21, 2024 23:55
AdamFinkle added a commit to AdamFinkle/home-energy-analysis-tool that referenced this pull request May 22, 2024
* added whole home heat loss rate to billing period outputs

Co-authored-by: Debajyoti Debnath <[email protected]>
Co-authored-by: eriksynn <[email protected]>
Co-authored-by: AdamFinkle <[email protected]>

* lint

* First attempt to add whole_home_heat_loss_rate test from example data

* Another approach to dynamically decorating a class

* Switched to using __dict__ to decorate the NGBillingRecordClass

* Final solution to adding billing period heat loss to example data

* Revert to subclass approach leveraging Sequence type to appease mypy

* Generate new example data from HLA spreadsheet examples and ensure tests pass.

* Check for more specific ua column heading and add more descriptive comment.

* Switch to built-in list to align with Deb's PR codeforboston#179 changes.

* Align changes with Deb's PR codeforboston#179

* Attempt to fix lint error in import statement formatting

---------

Co-authored-by: Alan Pinkert <[email protected]>
Co-authored-by: Debajyoti Debnath <[email protected]>
Co-authored-by: eriksynn <[email protected]>
Co-authored-by: AdamFinkle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants