stan-dev / stan

Stan development repository. The master branch contains the current release. The develop branch contains the latest stable development. See the Developer Process Wiki for details.
https://mc-stan.org
BSD 3-Clause "New" or "Revised" License
2.55k stars 365 forks source link

Remove usages of `io::rdump` from unrelated tests, util functions #3267

Closed WardBrian closed 5 months ago

WardBrian commented 5 months ago

Submission Checklist

Summary

We've been recommending against using the R dump format for a while (see https://github.com/stan-dev/cmdstan/pull/1177), but we were still using it for a lot of tests (sometimes completely unnecessarily), and for the two helper functions create_unit_e_diag_inv_metric and create_unit_e_dense_inv_metric, which were both implemented by creating a string and then parsing it again.

Intended Effect

Clean up unnecessary usages of io::dump in tests, replace others with json data, and refactor utilities that don't need to do parsing to not do it.

How to Verify

Side Effects

Documentation

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: