USEPA / useeior

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

Consider not exporting print2RValidationResults and validate2RCommodityTotals #307

Open WesIngwersen opened 1 month ago

WesIngwersen commented 1 month 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 4 weeks 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 4 weeks ago

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

Yes, I believe that is the case.