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

[SVCS-132] Factor out move/copy code #212

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

Johnetordoff
Copy link
Contributor

@Johnetordoff Johnetordoff commented Apr 13, 2017

Purpose

If WB core provider the move and copy code repeats itself unnecessarily this factors it out and cleans up the functions substantially.

Changes

Moves the metrics, name handling and intra_move/copy code into a decorator which wraps the move and copy functions, also adds/updates some docstrings. Changes some keyword arguments to positional arguments.

Side Effects

None that I know of.

Ticket

https://openscience.atlassian.net/browse/SVCS-132

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 75.204% when pulling 188b4a3 on Johnetordoff:DRY-move-or-copy into 753bdd2 on CenterForOpenScience:develop.

Johnetordoff and others added 2 commits August 30, 2017 11:25
…erbutler into DRY-move-or-copy

* 'develop' of https://github.com/CenterForOpenScience/waterbutler: (40 commits)
  bump version & update changelog
  add provider to sentry tags
  Typo fix
  Allow sentry to capture node ID for apiv1 errors
  ignore the new type annotations for gdrive.intra_move
  undo the previous changes to intra_copy, it only works on files
  Allow file or folder metadata to be returned instead of just file metadata.
  Revert "enable retries for WB => Dropbox uploads"
  enable retries for WB => Dropbox uploads
  Restore per-incoming-request throttling
  bump version and update changelog
  avoid dumping duplicate information to the application log
  bump version & update changelog
  fix figshare uploads by swapping read() for readexactly()
  bump version & update changelog
  properly format Last-Modified headers from v1 HEAD requests
  add mypy type ignores to silence errors (for now)
  add tests for bitbucket provider
  safely encode most BB file names
  don't blindy trust metadata_file's parent_dir optimization
  ...

# Conflicts:
#	waterbutler/core/provider.py
Copy link
Contributor

@AddisonSchiller AddisonSchiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your build is currently failing. Throwing back to you to fix it.

Johnetordoff and others added 3 commits November 16, 2017 15:06
…erbutler into DRY-move-or-copy

* 'develop' of https://github.com/CenterForOpenScience/waterbutler: (118 commits)
  final cleanups for onedrive
  make provider readonly
  start cleaning up and reorganizing onedrive
  implement Microsoft OneDrive provider using dropbox as base
  added onedrive provider -- copied from Dropbox
  don't assume file metadata has a modified/created date
  add mypy type annotations
  add modified/created dates to file metadata
  expand docstrings
  add ruby serialization workaround to download
  clean up commit_sha vs. branch_name handling
  add tests for revisions and uninit-ed repos
  add artificial test for missing folder
  remove unused and obsolete code
  rewrite test suite for provider changes and coverage
  update some more docstrings on the provider
  GL provider is read-only: folder creation is not allowed
  add workaround for non-existent directories not being reported in GL
  document workarounds in download & _fetch_file_contents
  remove unneeded error wrapping from metadata
  ...

# Conflicts:
#	waterbutler/core/provider.py
…terbutler into DRY-move-or-copy

* 'DRY-move-or-copy' of https://github.com/johnetordoff/waterbutler:

# Conflicts:
#	waterbutler/core/provider.py
@coveralls
Copy link

coveralls commented Nov 16, 2017

Coverage Status

Coverage decreased (-0.002%) to 89.879% when pulling 4656859 on Johnetordoff:DRY-move-or-copy into e2e6266 on CenterForOpenScience:develop.

Copy link
Contributor

@cslzchen cslzchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For ⛺️ 🔥 :

Love this one. I don't think it will conflict with current active PRs. Need to 1) rebase, 2) add/update tests, and 3) retest it locally to make sure nothing breaks.

@cslzchen cslzchen self-assigned this Jun 27, 2018
@NyanHelsing
Copy link
Contributor

Need to make it not a decorator

@cslzchen cslzchen removed their assignment Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants