Issue/1226 filename parsing - some path logic.#1228
Conversation
|
@WardBrian or @dylex - could you please check on why this failed? |
|
I think it is because you checked in a change to the |
not difficult at all - will add to this PR. |
|
checks are failing because performance tests specify output files with suffix ".tmp". @WardBrian - will this work? |
|
Could someone please point me to or write doc for how this is supposed to behave? This PR just says "Make parsing of filename suffixes more robust" and the issue #1226 just lists a bunch of quirky behavior without a spec for what should happen in general. The problem starts with the name of the argument, To allow the current behavior, I would suggest (a) splitting directory off, and (b) operating on the file to remove the final period and anything following it. The code needs to check that the string-based path is reasonable. That is, we can't just have If it didn't break backward compatibility, I would say just slap another |
|
made all suggested changes, added fix for #1213 - ready for re-review. |
…-dev/cmdstan into issue/1226-filename-parsing
The CmdStan
This design (sic) is problematic because:
W/R/T creating good output filenames:
absolutely. CmdStanPy only has argument
That's pretty much the way that things are re-imlemented here. The problem is that C++14 doesn't have good filepath parsing routines and the Boost
Agreed.
Backwards compatibility is how we got here. We just fixed an annoying feature of the downstream performance tests which created output files that ended in ".tmp" not ".csv". |
I think that even this would have some subtle issues, like if the 'base file prefix' also contained a path separator. I think the fundamental flaw is we should never have set it up like this in the first place. IMO, when multiple files are required, we should have required the user to give us a comma separated list of the correct length and removed any guesswork about "if I specify X as the argument, the actual files created on disk will have the name..."
I think this is reasonable. We are also within our rights to say "besides for CSV outputs, we will force the correct extension". So the bug reported in #1213 would yield |
…-dev/cmdstan into issue/1226-filename-parsing
WardBrian
left a comment
There was a problem hiding this comment.
A few small things, should be last review. Thanks!
Submisison Checklist
./runCmdStanTests.py src/testSummary:
Make parsing of filename suffixes more robust - adds logic to handle filepath separators plus some edge cases.
Intended Effect:
Correct weirdness reported in #1226
How to Verify:
Unit tests
Side Effects:
N/A
Documentation:
N/A
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: