Repository navigation
Conversation
With the default path = ".", the new run folder stayed relative and the fit, which runs from the prior's temporary folder, could not find inputs/gendata.csv. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTyUgJEd5uCEmv9qYrv8dC
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new assertion is not portable to the repository’s Windows CI job.
1 open finding
What changed in this PR
Fixes relative run paths when fitting from a prior run’s temporary directory.
Changes:
- Normalizes the run directory after creation.
- Adds a regression test for numeric priors and relative paths.
| File | Description |
|---|---|
R/PM_model.R |
Makes the created run path absolute. |
tests/testthat/test-pm-fit-prior-run-path.R |
Tests data and output path resolution. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ) | ||
|
|
||
| expect_true(data_found) | ||
| expect_equal(captured_output, file.path(normalizePath("2"), "outputs")) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #396 +/- ##
=======================================
Coverage 64.77% 64.78%
=======================================
Files 52 52
Lines 22964 22963 -1
=======================================
+ Hits 14876 14877 +1
+ Misses 8088 8086 -2
🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Bug.
fit(prior = 1)with the defaultpath = "."fails withData path does not exist: ./2/inputs/gendata.csv.normalizePath()leaves the new run folder relative because it doesn't exist yet. The fit runs from the prior's temporary folder, so that relative path points nowhere.Fix. Normalize
path_runafter the folder is created.Test. A mocked fit with a relative path checks that the data file is found and the output path is absolute. The test fails on
main.Note. This changes
PM_model$fit, sotest-data-currency.Rwill fail untildata/*.rdais regenerated.🤖 Generated with Claude Code
https://claude.ai/code/session_01GTyUgJEd5uCEmv9qYrv8dC
Generated by Claude Code