-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
suggest format method after error due to old syntax #852
Conversation
Examplef <- write_stan_file(
"
parameters {
real x[3];
}
model {
x ~ normal(0, 1);
}
"
)
m <- cmdstan_model(f)
The last line of the error message is new. But instead of suggesting how to call the format method I have it point to the example in the format doc that I updated. The user needs to set We can also do this interactively in the future, but as a start this message should help. |
This might conflict with changes in #836, so we should merge that first. |
Just merged that branch into this one, so I can avoid conflicts |
@andrjohns @rok-cesnovar @avehtari This is ready for a look if any of you have a chance. We should wait to merge it until #836 is merged (I'll merge that one if the checks that are running pass). |
Codecov Report
@@ Coverage Diff @@
## master #852 +/- ##
=======================================
Coverage 88.18% 88.19%
=======================================
Files 12 12
Lines 4215 4218 +3
=======================================
+ Hits 3717 3720 +3
Misses 498 498
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proposed error message is fine, I'd make changes to the format doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
I updated the doc based on @avehtari's suggestion. Will merge if everything passes. |
Submission Checklist
Summary
Advances #849 (doesn't address the interactive part)
Suggests
format
method if compilation error due to old syntax. This doesn't yet do the formatting if in interactive mode, just suggests looking at the example in the doc forformat
. I added an example to that doc showing how to change old syntax.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):
Columbia University
By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the following licenses: