Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
description='The SolveBio Python client',
long_description=long_description,
long_description_content_type='text/markdown',
python_requires='>=3.8',
author='Solve, Inc.',
author_email='contact@solvebio.com',
url='https://github.com/solvebio/solvebio-python',
Expand Down
1 change: 0 additions & 1 deletion solvebio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def _set_cached_api_host(host):
from .global_search import GlobalSearch
from .annotate import Annotator, Expression
from .client import client, SolveClient
from .auth import authenticate
from .resource import (
Application,
Beacon,
Expand Down
3 changes: 0 additions & 3 deletions solvebio/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@

import sys

from .cli.main import main

if __name__ == "__main__":
Expand Down
20 changes: 10 additions & 10 deletions solvebio/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@ def authenticate(
# Find credentials from environment variables
if not host:
host = (
os.environ.get("QUARTZBIO_API_HOST", None)
or os.environ.get("EDP_API_HOST", None)
or os.environ.get("SOLVEBIO_API_HOST", None)
os.environ.get("QUARTZBIO_API_HOST", None) or
os.environ.get("EDP_API_HOST", None) or
os.environ.get("SOLVEBIO_API_HOST", None)
)

if not token:
api_key = (
os.environ.get("QUARTZBIO_API_KEY", None)
or os.environ.get("EDP_API_KEY", None)
or os.environ.get("SOLVEBIO_API_KEY", None)
os.environ.get("QUARTZBIO_API_KEY", None) or
os.environ.get("EDP_API_KEY", None) or
os.environ.get("SOLVEBIO_API_KEY", None)
)

access_token = (
os.environ.get("QUARTZ_ACCESS_TOKEN", None)
or os.environ.get("EDP_ACCESS_TOKEN", None)
or os.environ.get("SOLVEBIO_ACCESS_TOKEN", None)
os.environ.get("QUARTZ_ACCESS_TOKEN", None) or
os.environ.get("EDP_ACCESS_TOKEN", None) or
os.environ.get("SOLVEBIO_ACCESS_TOKEN", None)
)

if access_token:
Expand Down Expand Up @@ -184,4 +184,4 @@ def validate_api_host_url(url):
elif not parsed.netloc:
raise SolveError("Invalid API host: %s." % url)

return parsed.geturl()
return parsed.geturl()
2 changes: 1 addition & 1 deletion solvebio/cli/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ def print_user(user):
email = user['email']
domain = user['account']['domain']
print(f'You are logged-in to the "{domain}" domain as {email}'
f' (server: {solvebio.get_api_host()}).')
f' (server: {solvebio.get_api_host()}).')
2 changes: 1 addition & 1 deletion solvebio/cli/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def get_credentials(api_host: str = None) -> ApiCredentials:
# available option that ends with '.api.quartzbio.com',
netrc_host = next(
filter(lambda h: h.endswith(".api.quartzbio.com"), netrc_obj.hosts), None
)
)

# Otherwise use the first available.
if netrc_host is None:
Expand Down
4 changes: 0 additions & 4 deletions solvebio/cli/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,10 +1044,6 @@ def _ls(full_path, recursive=False, follow_shortcuts=False):
return files


def _is_single_file(objects):
return len(objects) == 1 and objects[0].get("object_type") == "file"


def should_tag_by_object_type(args, object_):
"""Returns True if object matches object type requirements"""
valid = True
Expand Down