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

Improve handling of user header #818

Merged
merged 18 commits into from
Aug 24, 2023

Conversation

martinmodrak
Copy link
Contributor

@martinmodrak martinmodrak commented Aug 10, 2023

Submission Checklist

  • Run unit tests
  • Declare copyright holder and agree to license (see below)

Summary

Resolves #812 and #813 (as the fix to #813 requires changes needed to fix #812, I've made a single PR for both)

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):
Institute of Microbiology of the Czech Academy of Sciences

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

@codecov-commenter
Copy link

codecov-commenter commented Aug 11, 2023

Codecov Report

Merging #818 (e7a935f) into master (e4ff5d4) will increase coverage by 0.14%.
Report is 12 commits behind head on master.
The diff coverage is 92.85%.

❗ Current head e7a935f differs from pull request most recent head f4a7fb2. Consider uploading reports for the commit f4a7fb2 to get more accurate results

@@            Coverage Diff             @@
##           master     #818      +/-   ##
==========================================
+ Coverage   88.26%   88.40%   +0.14%     
==========================================
  Files          12       12              
  Lines        4166     4201      +35     
==========================================
+ Hits         3677     3714      +37     
+ Misses        489      487       -2     
Files Changed Coverage Δ
R/model.R 91.12% <91.17%> (+0.50%) ⬆️
R/utils.R 74.50% <95.45%> (+0.63%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@martinmodrak
Copy link
Contributor Author

@rok-cesnovar @jgabry So this appears ready to merge. Beyond the changes to header handling I made some tweaks to tests. In particular, there are now expect_compile and expect_no_recompilation helpers that standardize the behaviour to have file existence and modifications time checked at all places and not rely only on messages (which I am not sure are actually checked when testing within the CI environment as they are bound to interactive mode). I've also added a dry_run argument to $compile that let's us test argument handling and messages without actually trigerring the C++ compilation. Both could probably be used more extensively, but I didn't want to pollute the PR too much. If you like the concept, I will open a separate issue + PR on applying this more broadly.

@jgabry jgabry linked an issue Aug 16, 2023 that may be closed by this pull request
Copy link
Member

@jgabry jgabry left a comment

Choose a reason for hiding this comment

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

Thanks @martinmodrak! I made a few suggestions but I'm just being nitpicky to match style, no substantive changes. @rok-cesnovar has written much more of the compile method code than I have so let's see if he has any other feedback, but this looks good to me.

I've also added a dry_run argument to $compile that let's us test argument handling and messages without actually trigerring the C++ compilation.

Good idea.

Both could probably be used more extensively, but I didn't want to pollute the PR too much. If you like the concept, I will open a separate issue + PR on applying this more broadly.

Great, yeah I like the concept.

R/model.R Outdated Show resolved Hide resolved
R/model.R Outdated Show resolved Hide resolved
R/model.R Outdated Show resolved Hide resolved
R/model.R Outdated Show resolved Hide resolved
R/model.R Outdated Show resolved Hide resolved
Co-authored-by: Jonah Gabry <jgabry@gmail.com>
Copy link
Member

@rok-cesnovar rok-cesnovar left a comment

Choose a reason for hiding this comment

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

Thanks!

@martinmodrak
Copy link
Contributor Author

Hi, just merged master back in. Could somebody merge this before it gets out of sync 🙏 ? Or is there something else to be done/approved?

@rok-cesnovar rok-cesnovar merged commit b1a767a into stan-dev:master Aug 24, 2023
12 checks passed
@rok-cesnovar
Copy link
Member

I just assume the author can merge once its approved :) Thanks Martin!

@martinmodrak martinmodrak deleted the 813-user_header branch August 24, 2023 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants