Skip to content

Commit

Permalink
Update Toolbox imports (will fail testing)
Browse files Browse the repository at this point in the history
Update Toolbox imports in advance of releasing next Toolbox version. This does mean that this commit will fail testing until the Toolbox import changes are live in PyPI.
  • Loading branch information
jgaff committed Feb 26, 2018
1 parent 9e8102b commit 72cab05
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Untitled*.ipynb

*.cache*
.pytest_cache*

*temp/*

Expand Down
10 changes: 5 additions & 5 deletions mdf_forge/forge.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from six import print_, string_types

from mdf_toolbox import toolbox
import mdf_toolbox

# Maximum recommended number of HTTP file transfers
# Large transfers are much better suited to Globus Transfer use
Expand Down Expand Up @@ -52,10 +52,10 @@ def __init__(self, index=__default_index, local_ep=None, anonymous=False, **kwar

if self.__anonymous:
services = kwargs.get('services', self.__anon_services)
clients = toolbox.anonymous_login(services)
clients = mdf_toolbox.anonymous_login(services)
else:
services = kwargs.get('services', self.__auth_services)
clients = toolbox.login(credentials={
clients = mdf_toolbox.login(credentials={
"app_name": self.__app_name,
"services": services,
"index": self.index})
Expand Down Expand Up @@ -821,7 +821,7 @@ def globus_download(self, results, dest=".", dest_ep=None, preserve_dir=False,
results = results[0]
if not dest_ep:
if not self.local_ep:
self.local_ep = toolbox.get_local_ep(self.__transfer_client)
self.local_ep = mdf_toolbox.get_local_ep(self.__transfer_client)
dest_ep = self.local_ep

# Assemble the transfer data
Expand Down Expand Up @@ -1211,7 +1211,7 @@ def search(self, q=None, index=None, advanced=None, limit=SEARCH_LIMIT, info=Fal
"limit": limit,
"offset": 0
}
res = toolbox.gmeta_pop(self.__search_client.post_search(uuid_index, qu), info=info)
res = mdf_toolbox.gmeta_pop(self.__search_client.post_search(uuid_index, qu), info=info)
# Add additional info
if info:
res[1]["query"] = qu
Expand Down
6 changes: 3 additions & 3 deletions tests/test_forge.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
import globus_sdk
from globus_sdk.exc import SearchAPIError
from mdf_forge import forge
from mdf_toolbox import toolbox
import mdf_toolbox


# Manually logging in for Query testing
query_search_client = toolbox.login(credentials={"app_name": "MDF_Forge",
"services": ["search"]})["search"]
query_search_client = mdf_toolbox.login(credentials={"app_name": "MDF_Forge",
"services": ["search"]})["search"]


def test_query_init():
Expand Down

0 comments on commit 72cab05

Please sign in to comment.