diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 298190ac..d5747124 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 diff --git a/setup.py b/setup.py index 36b4a82f..27652adf 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>=8,<9", "plotly>=1.13,<2", ] diff --git a/transcriptic/analysis/spectrophotometry.py b/transcriptic/analysis/spectrophotometry.py index d0c92c63..46c52f82 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 848f35f5..ba16a6dc 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}}), + 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 b9230e2e..0c3f0a13 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 14b7f076..915cd60e 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(