From 95766618a4d9e7a76af3cf27dc3c530cd8b92501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tatjana=20Damnjanovi=C4=87?= Date: Wed, 27 Aug 2025 20:46:45 +0200 Subject: [PATCH 1/4] Set py 3.8 as required version --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index e304e9f7..1664905b 100644 --- a/setup.py +++ b/setup.py @@ -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', From 55f21c74900a4aef4c3d2e975ba97458386cb467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tatjana=20Damnjanovi=C4=87?= Date: Wed, 27 Aug 2025 22:41:20 +0200 Subject: [PATCH 2/4] linting --- solvebio/__init__.py | 1 - solvebio/__main__.py | 3 --- solvebio/cli/auth.py | 2 +- solvebio/cli/credentials.py | 2 +- solvebio/cli/data.py | 4 ---- 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/solvebio/__init__.py b/solvebio/__init__.py index 8f5cd14b..460b3848 100644 --- a/solvebio/__init__.py +++ b/solvebio/__init__.py @@ -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, diff --git a/solvebio/__main__.py b/solvebio/__main__.py index 9070a092..4e063336 100644 --- a/solvebio/__main__.py +++ b/solvebio/__main__.py @@ -1,6 +1,3 @@ - -import sys - from .cli.main import main if __name__ == "__main__": diff --git a/solvebio/cli/auth.py b/solvebio/cli/auth.py index c215bf84..ba147243 100644 --- a/solvebio/cli/auth.py +++ b/solvebio/cli/auth.py @@ -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()}).') diff --git a/solvebio/cli/credentials.py b/solvebio/cli/credentials.py index a28c9051..0e2d155d 100644 --- a/solvebio/cli/credentials.py +++ b/solvebio/cli/credentials.py @@ -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: diff --git a/solvebio/cli/data.py b/solvebio/cli/data.py index 6ca60392..9917ab1b 100644 --- a/solvebio/cli/data.py +++ b/solvebio/cli/data.py @@ -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 From 3a2941a8d5c57439eccad28e595edf619c74f4c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tatjana=20Damnjanovi=C4=87?= Date: Wed, 27 Aug 2025 22:50:49 +0200 Subject: [PATCH 3/4] linting --- solvebio/auth.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/solvebio/auth.py b/solvebio/auth.py index ac39e284..c798d924 100644 --- a/solvebio/auth.py +++ b/solvebio/auth.py @@ -58,9 +58,9 @@ 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: @@ -71,9 +71,9 @@ def authenticate( ) 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: @@ -184,4 +184,4 @@ def validate_api_host_url(url): elif not parsed.netloc: raise SolveError("Invalid API host: %s." % url) - return parsed.geturl() \ No newline at end of file + return parsed.geturl() From 37d0051711ff0cee77f48701f0901f35858328b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tatjana=20Damnjanovi=C4=87?= Date: Wed, 27 Aug 2025 23:28:07 +0200 Subject: [PATCH 4/4] linting --- solvebio/auth.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/solvebio/auth.py b/solvebio/auth.py index c798d924..47e78e56 100644 --- a/solvebio/auth.py +++ b/solvebio/auth.py @@ -65,9 +65,9 @@ def authenticate( 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 = (