From c939e3f2da63ca68c4a4a07c448df3781af02412 Mon Sep 17 00:00:00 2001 From: Eriberto Lopez Date: Tue, 1 Mar 2022 16:33:52 -0800 Subject: [PATCH 1/5] fix: upload-release command api.post_release To upload the release archive to an org the POST data requires the `user_id` of the session. --- transcriptic/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transcriptic/commands.py b/transcriptic/commands.py index 848f35f..55f741b 100644 --- a/transcriptic/commands.py +++ b/transcriptic/commands.py @@ -159,7 +159,7 @@ def upload_release(api, archive, package): bar.update(20) try: up = api.post_release( - data=json.dumps({"release": {"upload_id": upload_id}}), + data=json.dumps({"release": {"upload_id": upload_id, "user_id": api.user_id}}), package_id=package_id, ) re = up["id"] From 206fd5cbe89fd0e9b553a3659cac6f292cae0ccf Mon Sep 17 00:00:00 2001 From: EribertoLopez Date: Wed, 2 Mar 2022 11:50:01 -0800 Subject: [PATCH 2/5] fix: build errors --- transcriptic/analysis/spectrophotometry.py | 4 ++-- transcriptic/commands.py | 4 +++- transcriptic/english.py | 10 +++++----- transcriptic/util.py | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/transcriptic/analysis/spectrophotometry.py b/transcriptic/analysis/spectrophotometry.py index d0c92c6..46c52f8 100644 --- a/transcriptic/analysis/spectrophotometry.py +++ b/transcriptic/analysis/spectrophotometry.py @@ -140,7 +140,7 @@ def plot(self, mpl=True, plot_type="box", **plt_kwargs): is rendered plot_type : {"box", "bar", "line", "hist"}, optional Type of plot to render - \**plot_kwargs : dict, optional + plot_kwargs : dict, optional Optional dictionary of specifications for your plot type of choice """ py.offline.init_notebook_mode() @@ -215,7 +215,7 @@ def beers_law(self, conc_list=None, use_adj=True, **kwargs): use_adj: Boolean, optional Boolean option which determines if the adjusted absorbance readings are used - \**plot_kwargs : dict + kwargs : dict Optional dictionary of specifications for your plot type of choice """ if "title" not in kwargs: diff --git a/transcriptic/commands.py b/transcriptic/commands.py index 55f741b..ba16a6d 100644 --- a/transcriptic/commands.py +++ b/transcriptic/commands.py @@ -159,7 +159,9 @@ def upload_release(api, archive, package): bar.update(20) try: up = api.post_release( - data=json.dumps({"release": {"upload_id": upload_id, "user_id": api.user_id}}), + data=json.dumps( + {"release": {"upload_id": upload_id, "user_id": api.user_id}} + ), package_id=package_id, ) re = up["id"] diff --git a/transcriptic/english.py b/transcriptic/english.py index b9230e2..0c3f0a1 100644 --- a/transcriptic/english.py +++ b/transcriptic/english.py @@ -114,8 +114,8 @@ def job_tree(self): def depth_one(steps): depth_one = [] for step in steps: - if type(step) is list: - if type(step[0]) is list: + if isinstance(step, list): + if isinstance(step[0], list): depth_one.append(step[0]) else: depth_one.append(step) @@ -390,7 +390,7 @@ def dict_to_list(forest): def print_tree(lst, level=0): print(" " * (level - 1) + "+---" * (level > 0) + str(lst[0])) for l in lst[1:]: - if type(l) is list: + if isinstance(l, list): print_tree(l, level + 1) else: print(" " * level + "+---" + l) @@ -436,12 +436,12 @@ def autopick(self, opts): % ( len(g["to"]), len(g["from"]), - ("well" if len(g["from"]) is 1 else "wells"), + ("well" if len(g["from"]) == 1 else "wells"), self.well_list(g["from"]), self.well_list(g["to"]), ( f"data saved at '{opts['dataref']}'" - if i is 0 + if i == 0 else "analyzed with previous" ), ) diff --git a/transcriptic/util.py b/transcriptic/util.py index 14b7f07..915cd60 100644 --- a/transcriptic/util.py +++ b/transcriptic/util.py @@ -43,7 +43,7 @@ def regex_manifest(protocol, input): """Special input types, gets updated as more input types are added""" if "type" in input and input["type"] == "choice": if "options" in input: - pattern = "\[(.*?)\]" + pattern = r"\[(.*?)\]" match = re.search(pattern, str(input["options"])) if not match: click.echo( From 760d4df6f2e1a6e55750bad23be6863b4b2219da Mon Sep 17 00:00:00 2001 From: EribertoLopez Date: Wed, 2 Mar 2022 13:48:16 -0800 Subject: [PATCH 3/5] update: pillow --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 36b4a82..bf665a2 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ def run_tests(self): # Version 1.21 upwards only support Python >= 3.7 "numpy>=1.14,<=1.20.3", "pandas>=1,<2", - "pillow>=3,<4", + "pillow>=9", "plotly>=1.13,<2", ] From 6e68bc0f1d1ae43cc2f4efa15b229bfa39fb7ee3 Mon Sep 17 00:00:00 2001 From: EribertoLopez Date: Wed, 2 Mar 2022 14:14:57 -0800 Subject: [PATCH 4/5] update: pillow --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bf665a2..27652ad 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ def run_tests(self): # Version 1.21 upwards only support Python >= 3.7 "numpy>=1.14,<=1.20.3", "pandas>=1,<2", - "pillow>=9", + "pillow>=8,<9", "plotly>=1.13,<2", ] From 30e3030129bb695ce8fc9d978eb93d02f591a012 Mon Sep 17 00:00:00 2001 From: EribertoLopez Date: Wed, 2 Mar 2022 16:59:17 -0800 Subject: [PATCH 5/5] CHANGELOG --- CHANGELOG.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 298190a..d574712 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,16 @@ Changelog Unreleased ---------- +Fixed +----- +- upload-release command to release archive requires the `user_id` of the session. +- Linting, equivalence, and docstring issues. + +Updated +------- +- Updated pillow version <=8,<9 + + Added ~~~~~ - Python 3.9 support