-
Notifications
You must be signed in to change notification settings - Fork 59
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
Applying Unit Test Harness #1302
Comments
Can I make some changes to |
|
So maybe this is a call back to the prior decision that the unit model costing blocks don't have a dedicated test folder, and therefore have been tested in the unit model tests. In |
Hmmm, I see. So the options would be to (1) make changes to the UnitTestHarness as you mentioned above or (2) choose to not test As far as translating from |
I have up the GAC test converted to the harness up until the costing variable checks. So I can push for more context but yea, I was also just curious for opinions. |
The solution may also be to create a |
I think this sounds good, especially for scenarios where we want to test keeping the operating conditions the same but only change how the costing is handled. |
@MarcusHolly @hunterbarber I think since IDAES and WaterTAP are organized around property, unit, and cost models as separate, that we should make a separate I think we've been a little loose with mixing unit and cost models together and that in general we should separate them more, specifically the tests and documentation (right now we don't really have costs documented, some unit models have them at the end of their unit model documentation but not all). The challenge that I see is that the costing test needs a unit model built, specified, and solved (which is what the UnitTestHarness does). I think it would be bad to duplicate the whole unit model build and specification in a separate test file under the costing folder that then uses the CostingTestHarness (one of the points of test harness was to reduce copying and pasting), maybe what we do is that the costing test file imports the build/specifying the variables from the unit test file. Anyways, what should we do now with our cost tests without a
|
For testing costing, you should mock up a unit model that has only the variable that costing requires. E.g.,
This will let you unit test the costing in isolation. You can then add some integration tests where you double check that it works with a full unit, but you cn run these more sparingly. |
Ohhh interesting. Yeah that could be best. That way all the unit model costing doesn't have to fully solve the detailed model, which is already tested. |
The WaterTAP costing package does inherit the costing method based on the unit model class, so there will have to be some slightly strategic dummy blocks made here. I'm going to play around with the idea in #1311. |
Alright, I will play around with this in my PR as well whenever I have some free time. |
Description
To be completed in the December release:
Completed in the June release:
Completed in the March Release:
Motivation
This will make unit model testing more standardized across the repository.
Possible Implementation
See Anaerobic Digester Test.
Additional Context
No response
The text was updated successfully, but these errors were encountered: