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
RF: <Dataset path=...> -> <Dataset ...> #4420
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me.
YES, PLEASE! ;) I always hated it but was too shy to suggest stripping it away -- one pros will be that you could just double click on the path to select it in the terminal, where now it would also grab |
so, not a single unittest tested our |
I'm looking forward to that too :) In the debugger, I often type |
I'd be happy to see this change land as is, but even better to my eyes would be a format like |
Codecov Report
@@ Coverage Diff @@
## master #4420 +/- ##
=======================================
Coverage 88.91% 88.92%
=======================================
Files 285 285
Lines 37765 37802 +37
=======================================
+ Hits 33578 33614 +36
- Misses 4187 4188 +1
Continue to review full report at Codecov.
|
So what about this then (to really get to a C&P-able state that works for the cmdline and for Python): >>> print('Dataset({})'.format(quote_cmdlinearg("/home/mih/this is fun/dataset")))
Dataset('/home/mih/this is fun/dataset')
>>> print('Dataset({})'.format(quote_cmdlinearg("/home/mih/that's it folks/dataset")))
Dataset('/home/mih/that'"'"'s it folks/dataset') |
Looks nice to me. |
Yes! |
__repr__ of a dataset always uses the 'path=' prefix to the path, but a dataset is also always and only identified by a path. Hence the prefix is superfluous, and only takes space. On any platform an absolute path is easy to recognize as such. This change switched the formatting to yield a C&P ready path, with all needed quoting for the cmdline.
Force-pushed this change. |
repr of a dataset always uses the 'path=' prefix to the path, but a
dataset is also always and only identified by a path. Hence the prefix
is superfluous, and only takes space. On any platform an absolute path
is easy to recognize as such.
This change removes the 'path=' prefix.