Skip to content

Commit

Permalink
Merge pull request #16451 from bernt-matthias/pin-fs.dropboxfs
Browse files Browse the repository at this point in the history
pin fs.dropboxfs to >=1
  • Loading branch information
mvdbeek authored Jul 26, 2023
2 parents 8190e41 + 1f22daf commit 43c1ea6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/config/sample/file_sources_conf.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: dropbox1
label: Dropbox files (configure access in user preferences)
doc: Your Dropbox files - configure an access token via the user preferences
accessToken: ${user.preferences['dropbox|access_token']}
access_token: ${user.preferences['dropbox|access_token']}

- type: webdav
id: owncloud1
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/dependencies/conditional-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ total-perspective-vortex>=2.2.4,<3

# For file sources plugins
fs.webdavfs>=0.4.2 # type: webdav
fs.dropboxfs # type: dropbox
fs.dropboxfs>=1.0 # type: dropbox
fs.sshfs # type: ssh
fs.anvilfs # type: anvil
fs.googledrivefs # type: googledrive
Expand Down
10 changes: 5 additions & 5 deletions lib/galaxy/files/sources/dropbox.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
try:
from fs.dropboxfs import DropboxFS
except ImportError:
# fs.dropboxfs < 0.3
try:
from dropboxfs.dropboxfs import DropboxFS
except ImportError:
DropboxFS = None
DropboxFS = None

from typing import (
Optional,
Expand All @@ -27,6 +23,10 @@ class DropboxFilesSource(PyFilesystem2FilesSource):
def _open_fs(self, user_context=None, opts: Optional[FilesSourceOptions] = None):
props = self._serialization_props(user_context)
extra_props: Union[FilesSourceProperties, dict] = opts.extra_props or {} if opts else {}
# accessToken has been renamed to access_token in fs.dropboxfs 1.0
if "accessToken" in props:
props["access_token"] = props.pop("accessToken")

handle = DropboxFS(**{**props, **extra_props})
return handle

Expand Down

0 comments on commit 43c1ea6

Please sign in to comment.