USEPA / useeior

Estimating potential environmental impacts of goods and services in the US economy
MIT License
33 stars 21 forks source link

Consider not exporting print2RValidationResults and validate2RCommodityTotals #307

Closed WesIngwersen closed 1 month ago

WesIngwersen commented 3 months ago

refers to https://github.com/USEPA/useeior/blob/efaed73f7726d0c59903d9bc7e4948acd757a91b/R/StateiorFunctions.R#L207 and https://github.com/USEPA/useeior/blob/efaed73f7726d0c59903d9bc7e4948acd757a91b/R/StateiorFunctions.R#L262

2R model calculation and results functions are treated equally to 1R models in build and calculate and other fxns for external users; why not incorporate print2RValidationResults() into https://github.com/USEPA/useeior/blob/efaed73f7726d0c59903d9bc7e4948acd757a91b/R/ValidateModel.R#L299 so its treated equally for validation as well? It can call print2RValidationResults() if needed, but might be too duplicative and better just to edit printValidationResults() to handle it

And then why does validate2RCommodityTotals() stand alone? Why not make it internal and incorporate it into printValidationResults() when the model is 2R?

bl-young commented 2 months ago

It can call print2RValidationResults() if needed, but might be too duplicative and better just to edit printValidationResults() to handle it

Yes, print2RValidationResults() did get pulled into the main printValidationResults here for the reason you describe. So it does not need to be called separately.

@jvendries can you confirm, is validate2RCommodityTotals only used internally (i.e., in useeio_team?)

jvendries commented 2 months ago

@jvendries can you confirm, is validate2RCommodityTotals only used internally (i.e., in useeio_team?)

Yes, I believe that is the case.