You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
strip absolute path to input and output files #228
When I run the Drake file under demos/McIlroy, I get the following output:
user@n550:~/tmp/workflow-pipelines/drake/demos/McIlroy$ drake
Using DRAKE_HOME: /home/user/tmp/workflow-pipelines/drake
Using drip to start up JVM...
The following steps will be run, in order:
1: /home/user/tmp/workflow-pipelines/drake/demos/McIlroy/././word-freqs.txt <- /home/user/tmp/workflow-pipelines/drake/demos/McIlroy/././book.txt [missing output]
Confirm? [y/n] y
Running 1 steps with concurrence of 1...
--- 0. Running (missing output): /home/user/tmp/workflow-pipelines/drake/demos/McIlroy/././word-freqs.txt <- /home/user/tmp/workflow-pipelines/drake/demos/McIlroy/././book.txt
--- 0: /home/user/tmp/workflow-pipelines/drake/demos/McIlroy/././word-freqs.txt <- /home/user/tmp/workflow-pipelines/drake/demos/McIlroy/././book.txt -> done in 0.07s
Done (1 steps run).
Is it possible to strip paths to files? So that the output looks like:
The following steps will be run, in order:
1: word-freqs.txt <- book.txt [missing output]
Confirm? [y/n]
@nfultz and @chen-factual thanks for looking at this! A minor caveat to consider: what to do for the edge case where stripping paths makes the naming ambiguous?
For example, with paths it looks like: /home/user/other/stuff/output/my-file.txt <- /home/user/other/stuff/input/my-file.txt
Then, do this new feature and strip the paths, now it looks like: my-file.txt <- my-file.txt
I guess you want to think about whether to bother detecting ambiguities, and what do when you detect them. If you choose not to bother, then the user is probably owed some kind of switch or setting to request full paths for clarity.
On Mon, Aug 20, 2018 at 11:08 AM Aaron Crow ***@***.***> wrote:
@nfultz <https://github.com/nfultz> and @chen-factual
<https://github.com/chen-factual> thanks for looking at this! A minor
caveat to consider: what to do for the edge case where stripping paths
makes the naming ambiguous?
For example, with paths it looks like:
/home/user/other/stuff/output/my-file.txt <-
/home/user/other/stuff/input/my-file.txt
Then, do this new feature and strip the paths, now it looks like:
my-file.txt <- my-file.txt
I guess you want to think about whether to bother detecting ambiguities,
and what do when you detect them. If you choose not to bother, then the
user is probably owed some kind of switch or setting to request full paths
for clarity.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#228 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAZjTvoSrpeE2whovr_LVHkDGf7lEtY2ks5uSvsCgaJpZM4WBaxR>
.
Activity
nfultz commentedon Aug 17, 2018
I think you could do this by editing here:
https://github.com/Factual/drake/blob/develop/src/drake/core.clj#L62-L68
chen-factual commentedon Aug 17, 2018
This has actually long been a pet peeves of mine, I can look into making a fix unless @nfultz you've already got one?
nfultz commentedon Aug 17, 2018
Go for it :)
dirtyvagabond commentedon Aug 20, 2018
@nfultz and @chen-factual thanks for looking at this! A minor caveat to consider: what to do for the edge case where stripping paths makes the naming ambiguous?
For example, with paths it looks like:
/home/user/other/stuff/output/my-file.txt <- /home/user/other/stuff/input/my-file.txtThen, do this new feature and strip the paths, now it looks like:
my-file.txt <- my-file.txtI guess you want to think about whether to bother detecting ambiguities, and what do when you detect them. If you choose not to bother, then the user is probably owed some kind of switch or setting to request full paths for clarity.
nfultz commentedon Aug 20, 2018
chen-factual commentedon Aug 20, 2018
That's a good idea, for instance my emacs does this when I have multiple
core.cljs open.