cmdstanpy icon indicating copy to clipboard operation
cmdstanpy copied to clipboard

Recursive up-to-date checks (ref #614).

Open tillahoffmann opened this issue 3 years ago • 1 comments

Submission Checklist

  • [x] Run unit tests
  • [x] Declare copyright holder and open-source license: see below

Summary

This PR addresses #614 by running up-to-date checks recursively on included files.

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): Harvard University

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

  • Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)

tillahoffmann avatar Oct 12 '22 03:10 tillahoffmann

Codecov Report

Merging #627 (cb356a6) into develop (fb3dfe2) will decrease coverage by 0.00%. The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop     #627      +/-   ##
===========================================
- Coverage    80.20%   80.19%   -0.01%     
===========================================
  Files           69       69              
  Lines        10326    10332       +6     
===========================================
+ Hits          8282     8286       +4     
- Misses        2044     2046       +2     
Impacted Files Coverage Δ
a/cmdstanpy/cmdstanpy/cmdstanpy/model.py 89.50% <0.00%> (-0.36%) :arrow_down:
cmdstanpy/cmdstanpy/model.py 88.71% <0.00%> (+0.04%) :arrow_up:
...runner/work/cmdstanpy/cmdstanpy/cmdstanpy/model.py 88.71% <0.00%> (+0.04%) :arrow_up:

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

codecov-commenter avatar Oct 12 '22 03:10 codecov-commenter

As an afterthought, it turns out that src_info fails relatively silently if an included file is missing (it only logs a debug message). Consequently, included_files is not available if an included file is missing. This leads to the following bug:

  1. create CmdstanpyModel (compiles the model)
  2. delete the included file
  3. create CmdstanpyModel (will not compile the model or raise an error)

tillahoffmann avatar Oct 20 '22 15:10 tillahoffmann

That’s no worse that the behavior before this PR, right?

WardBrian avatar Oct 20 '22 15:10 WardBrian

True, maybe something to fix another time.

tillahoffmann avatar Oct 20 '22 21:10 tillahoffmann