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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolver.workspace_from_url: usage of clobber_mets not consistent with the docstring #563

Closed
hnesk opened this issue Aug 13, 2020 · 3 comments
Assignees
Labels

Comments

@hnesk
Copy link
Contributor

hnesk commented Aug 13, 2020

clobber_mets = False does not raise an exception for existing mets.xml ('raise'), but fails silently ('skip')

clobber_mets (boolean, False): Whether to overwrite existing mets.xml. By default existing mets.xml will raise an exception.

see:
self.download_to_directory(dst_dir, mets_url, basename=mets_basename, if_exists='overwrite' if clobber_mets else 'skip')

I don't know what would be the right thing to do: Fix the docstring or fix the implementation?

@bertsky
Copy link
Collaborator

bertsky commented Aug 13, 2020

I don't know what would be the right thing to do: Fix the docstring or fix the implementation?

I'd prefer the latter option.

@kba kba added the bug label Aug 13, 2020
@hnesk hnesk changed the title Resolver.workspace_from_url: usage of clobber_mets not consistent with the doctring Resolver.workspace_from_url: usage of clobber_mets not consistent with the docstring Aug 18, 2020
@hnesk
Copy link
Contributor Author

hnesk commented Aug 18, 2020

Oh, I just found this PR #425 (review)

@bertsky
Copy link
Collaborator

bertsky commented Aug 1, 2024

@kba this needs to be revisited – including the discussion after #425.

We still have:

self.download_to_directory(dst_dir, mets_url, basename=mets_basename, if_exists='overwrite' if clobber_mets else 'skip')

At the very least, the docstring needs to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants