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
ENH+BF: make it possible to export_to_figshare without cd'ing #2723
Changes from 2 commits
337768b
0d54343
ab7fe17
231f6b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,8 +165,8 @@ class ExportToFigshare(Interface): | |
metavar="PATH", | ||
nargs='?', | ||
doc="""File name of the generated ZIP archive. If no file name is | ||
given the archive will be generated in the current directory and | ||
will be named: datalad_<dataset_uuid>.zip.""", | ||
given the archive will be generated in the top directory | ||
of the dataset and will be named: datalad_<dataset_uuid>.zip.""", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be consistent with other places in datalad, shouldn't this be the top-level of the dataset if There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As you wish, but I think this would surprise me as a user. |
||
constraints=EnsureStr() | EnsureNone()), | ||
no_annex=Parameter( | ||
args=("--no-annex",), | ||
|
@@ -230,7 +230,11 @@ def __call__(dataset, filename=None, missing_content='error', no_annex=False, | |
raise RuntimeError( | ||
"Paranoid authors of DataLad refuse to proceed in a dirty repository" | ||
) | ||
lgr.info("Exporting current tree as an archive since figshare does not support directories") | ||
lgr.info( | ||
"Exporting current tree as an archive since figshare " | ||
"does not support directories") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this message mention the destination? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, adding, thanks |
||
if filename is None: | ||
filename = dataset.path | ||
archive_out = next( | ||
export_archive( | ||
dataset, | ||
|
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.
I find this name confusing because I assume "tmpl" is for "template", but it isn't used as a template for the file name. It's just the base name.
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.
yeah, indeed... I guess I had some visions of making it into cmdline option template so we could provide dataset etc objects for it to get filled in. renaming to
default_filename