Skip to content
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

Issue 127: Check Stan code is valid syntax #158

Merged
merged 1 commit into from
Jul 15, 2024
Merged

Issue 127: Check Stan code is valid syntax #158

merged 1 commit into from
Jul 15, 2024

Conversation

athowes
Copy link
Collaborator

@athowes athowes commented Jul 12, 2024

Description

This PR closes #127.

I have added an issue about the complexity with where the invalid code comes from #159.

Checklist

  • My PR is based on a package issue and I have explicitly linked it.
  • I have included the target issue or issues in the PR title in the for Issue(s) issue-numbers: PR title
  • I have read the contribution guidelines.
  • I have tested my changes locally.
  • I have added or updated unit tests where necessary.
  • I have updated the documentation if required.
  • My code follows the established coding standards.
  • I have added a news item linked to this PR.
  • I have reviewed CI checks for this PR and addressed them as far as I am able.

skip_on_cran()
stancode <- epidist(data = prep_obs, fn = brms::make_stancode)
mod <- cmdstan_model(stan_file = write_stan_file(stancode), compile = FALSE)
expect_true(mod$check_syntax())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the comments here an issue : https://github.com/epinowcast/epinowcast/blob/d957b21af07c7708d8ae28fc248fffe39d453828/.github/workflows/check-cmdstan.yaml#L67

The concern would be that brms has pedantic problems at some point and this then breaks out testing.

Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the pedantic comment/issue this is looking good

@seabbs seabbs merged commit 3702b00 into main Jul 15, 2024
7 of 8 checks passed
@seabbs seabbs deleted the valid-stancode branch July 15, 2024 11:18
seabbs pushed a commit that referenced this pull request Jan 10, 2025
Former-commit-id: ec3b20f99398556f041214e08052faff1087b961 [formerly 4a3bf2d82c5834efa6df8d9f5b846be6cef72338]
Former-commit-id: 542597ab3df5302e3430f4cb075b6401e6577b0e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test that brms and custom Stan code is valid
2 participants