From 07502e34c7e21c59bf10a12359cb047c1761c56d Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 26 Aug 2023 14:31:50 -0400 Subject: [PATCH 1/4] =?UTF-8?q?Fix=20typo=20in=20CLI=20help=20text=20(quer?= =?UTF-8?q?ry=E2=86=92query)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- brukerapi/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brukerapi/cli.py b/brukerapi/cli.py index 8423d49..b449e92 100644 --- a/brukerapi/cli.py +++ b/brukerapi/cli.py @@ -81,7 +81,7 @@ def main(): parser_split.set_defaults(func=split) # filter sub-command - parser_filter = subparsers.add_parser('filter', help='get files based on querry') + parser_filter = subparsers.add_parser('filter', help='get files based on query') parser_filter.add_argument( "-i", "--input", From 22f3d3902c86314f94ebe1a1130cf8e0a90e1833 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 26 Aug 2023 14:35:05 -0400 Subject: [PATCH 2/4] =?UTF-8?q?Use=20=E2=80=9Csplit=E2=80=9D=20instead=20o?= =?UTF-8?q?f=20nonstandard=20=E2=80=9Csplitted=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This affects CLI help text and a doc string. --- brukerapi/cli.py | 2 +- brukerapi/splitters.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/brukerapi/cli.py b/brukerapi/cli.py index b449e92..751de8c 100644 --- a/brukerapi/cli.py +++ b/brukerapi/cli.py @@ -62,7 +62,7 @@ def main(): dest="path_out", type=str, required=False, - help="Folder to save splitted data sets", + help="Folder to save split data sets", ) parser_split.add_argument( "-s", diff --git a/brukerapi/splitters.py b/brukerapi/splitters.py index a48911c..a0c5452 100644 --- a/brukerapi/splitters.py +++ b/brukerapi/splitters.py @@ -136,7 +136,7 @@ def split(self, dataset, select=None, write=False, path_out=None, **kwargs): # number of samples in self.fg dimension fg_size = dataset.shape[fg_abs_index] - # If no index is specified, all elements of given dimension will be splited + # If no index is specified, all elements of given dimension will be split if select is None: select = list(range(0, fg_size)) @@ -266,9 +266,9 @@ def split(self, dataset, write=False, path_out=None): This functionality might be used for instance when converting data to a different data format. :param dataset: 2dseq dataset with multiple slice packages - :param write: if True, splitted data sets will we writen to drive + :param write: if True, split data sets will we writen to drive :param path_out: a path to store data sets (optional) - :return: list of splitted data sets + :return: list of split data sets """ try: @@ -276,7 +276,7 @@ def split(self, dataset, write=False, path_out=None): except KeyError: print('Parameter VisuCoreSlicePacksSlices not found') - # list of splitted data sets + # list of split data sets datasets = [] # range of frames of given slice package @@ -391,4 +391,4 @@ def _split_VisuCoreSlicePacksSliceDist(self, visu_pars_, sp_index): VisuCoreSlicePacksSliceDist = visu_pars_['VisuCoreSlicePacksSliceDist'] value = int(VisuCoreSlicePacksSliceDist.value[sp_index]) VisuCoreSlicePacksSliceDist.value = value - VisuCoreSlicePacksSliceDist.size = 1 \ No newline at end of file + VisuCoreSlicePacksSliceDist.size = 1 From c50972fcadd8ab3327f97049db0235774bb0aed1 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 26 Aug 2023 14:35:36 -0400 Subject: [PATCH 3/4] =?UTF-8?q?Correct=20=E2=80=9Cwe=20writen=E2=80=9D=20t?= =?UTF-8?q?o=20=E2=80=9Cbe=20written=E2=80=9D=20in=20a=20doc=20string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- brukerapi/splitters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brukerapi/splitters.py b/brukerapi/splitters.py index a0c5452..24f763d 100644 --- a/brukerapi/splitters.py +++ b/brukerapi/splitters.py @@ -266,7 +266,7 @@ def split(self, dataset, write=False, path_out=None): This functionality might be used for instance when converting data to a different data format. :param dataset: 2dseq dataset with multiple slice packages - :param write: if True, split data sets will we writen to drive + :param write: if True, split data sets will be written to drive :param path_out: a path to store data sets (optional) :return: list of split data sets """ From aeedc58e9fea36fea9eff11c191909df0d245433 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 26 Aug 2023 14:36:53 -0400 Subject: [PATCH 4/4] Fix a couple of typos in comments --- brukerapi/jcampdx.py | 2 +- brukerapi/splitters.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/brukerapi/jcampdx.py b/brukerapi/jcampdx.py index 37eae07..ed57cef 100644 --- a/brukerapi/jcampdx.py +++ b/brukerapi/jcampdx.py @@ -872,7 +872,7 @@ def divide_jcampdx_line(cls, line): @classmethod def split_key_value_pair(cls, line): - # ASSUMPTION the first occurence of = in jcampdx line divides key and value pair + # ASSUMPTION the first occurrence of = in jcampdx line divides key and value pair # example: match = re.search(GRAMMAR['EQUAL_SIGN'], line) key = line[0:match.start()] diff --git a/brukerapi/splitters.py b/brukerapi/splitters.py index 24f763d..7b12026 100644 --- a/brukerapi/splitters.py +++ b/brukerapi/splitters.py @@ -303,7 +303,7 @@ def split(self, dataset, write=False, path_out=None): # construct a new Dataset, without loading data, the data will be supplied later dataset_ = Dataset(dataset.path.parents[1] / name, load=False) - # SPLIT parameteres + # SPLIT parameters dataset_.parameters = self._split_parameters(dataset, frame_range, fg_rel_index, fg_abs_index, sp_index, frame_count) # construct properties from the new set of parameters