Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX: Make export-to-figshare yield an impossible result instead of a RunTimeError in dirty ds #6543

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

adswa
Copy link
Member

@adswa adswa commented Mar 14, 2022

This aims at standardizing result reporting/behavior over operations that
refuse to operate in dirty datasets. export-to-figshare does it similarly
to run now, and yields an impossible result. Fixes #6474.

Before:

datalad export-to-figshare
[ERROR  ] RuntimeError(Paranoid authors of DataLad refuse to proceed in a dirty repository) (RuntimeError)

Now:

datalad export-to-figshare
export_to_figshare(impossible): /tmp/super (dataset) [clean dataset required to export; use `datalad status` to inspect unsaved changes]

Changelog

馃挮 Enhancements and new features

  • When operating in a dirty dataset, export-to-figshare now yields and impossible result instead of raising a RunTimeError

This aims at standardizing result reporting/behavior over operations that
refuse to operate in dirty datasets. export-to-figshare does it similarly
to run now, and yields an impossible result. Fixes datalad#6474

Before:
datalad export-to-figshare
[ERROR  ] RuntimeError(Paranoid authors of DataLad refuse to proceed in a dirty repository) (RuntimeError)

Now:
datalad export-to-figshare
export_to_figshare(impossible): /tmp/super (dataset) [clean dataset required to export; use `datalad status` to inspect unsaved changes]
@adswa adswa added the semver-patch Increment the patch version when merged label Mar 14, 2022
@codeclimate
Copy link

codeclimate bot commented Mar 14, 2022

Code Climate has analyzed commit ac95f2f and detected 0 issues on this pull request.

View more on Code Climate.

@adswa
Copy link
Member Author

adswa commented Mar 15, 2022

All test failures look like the "familiar" ones that show up everywhere.

@adswa
Copy link
Member Author

adswa commented Mar 23, 2022

In the interest of reducing the number of open PRs, I think this one is tiny to review and pretty uncontroversial - any takers?

@mslw
Copy link
Contributor

mslw commented Mar 31, 2022

Looks good to me - indeed uncontroversial. The export_to_figshare(impossible) result makes sense in this context, and works for me as advertised. Code change is small, no issues there.

@bpoldrack bpoldrack merged commit fb60dee into datalad:master Apr 1, 2022
@bpoldrack
Copy link
Member

Thx, @adswa !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

export-to-figshare raises RunTimeError in dirty datasets - standardize on impossible instead?
3 participants