diff --git a/README.md b/README.md index 1d393aa..46f138d 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ For the time being, there are two sets of annotation generators: ## Adding an annotation -- Add the command in the dictionary in (https://github.com/binpash/annotations/blob/main/pash_annotations/annotation_generation/AnnotationGeneration.py#L13) +- Add the command in the dictionary in (https://github.com/binpash/annotations/blob/main/pash_annotations/annotation_generation/AnnotationGenerator().py#L13) - Add a json file with the command flags in (https://github.com/binpash/annotations/tree/main/pash_annotations/parser/command_flag_option_info/data). This could be used to generate a first version of it: (https://github.com/binpash/annotations/blob/main/pash_annotations/parser/command_flag_option_info/manpage-to-json.sh). - Add an `InputOutputInfoGeneratorXXX.py` in (https://github.com/binpash/annotations/tree/main/pash_annotations/annotation_generation/annotation_generators) - (Optionally) add a `ParallelizabilityInfoGeneratorXXX.py` in (https://github.com/binpash/annotations/tree/main/pash_annotations/annotation_generation/annotation_generators) diff --git a/pash_annotations/annotation_generation/annotation_generation.py b/pash_annotations/annotation_generation/annotation_generation.py index 7bb3033..3af82d1 100644 --- a/pash_annotations/annotation_generation/annotation_generation.py +++ b/pash_annotations/annotation_generation/annotation_generation.py @@ -1,5 +1,5 @@ import os -import sys +import importlib from typing import Optional from collections import namedtuple @@ -15,7 +15,6 @@ ) ### directory paths -ROOT_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__), "../..")) ANNOTATION_GENERATORS = "pash_annotations.annotation_generation.annotation_generators" CMD_NAMES = [ "alt_bigrams_aux", @@ -50,78 +49,62 @@ "wc", ] - -def to_pascal_case(string: str) -> str: - """ - Turns a snake_case string to PascalCase - """ - return string.replace("_", " ").title().replace(" ", "") - - IO_INFO_PREFIX = "input_output_info_generator" PAR_INFO_PREFIX = "parallelizability_info_generator" FileModulePair = namedtuple("FileModulePair", ["file", "module"]) -io_info_gen_file_module_names = [ - FileModulePair( - f"{ANNOTATION_GENERATORS}.{IO_INFO_PREFIX}_{cmd}", - to_pascal_case(IO_INFO_PREFIX) + to_pascal_case(cmd), - ) - for cmd in CMD_NAMES -] - -par_info_gen_file_module_names = [ - FileModulePair( - f"{ANNOTATION_GENERATORS}.{PAR_INFO_PREFIX}_{cmd}", - to_pascal_case(PAR_INFO_PREFIX) + to_pascal_case(cmd), - ) - for cmd in CMD_NAMES -] - -for filename, module in io_info_gen_file_module_names + par_info_gen_file_module_names: - import_str = "from " + filename + " import " + module - try: - exec(import_str) - except ModuleNotFoundError: - pass # it's fine if some do not exist, we catch that later - - -# cannot be merged due to types -def get_input_output_info_from_cmd_invocation( - cmd_invocation: CommandInvocationInitial, -) -> Optional[InputOutputInfo]: - # Get the Generator, info_generator_class_for_cmd_repr, info_generator_class_for_cmd_repr - try: - info_generator_class_for_cmd = str_to_class( - to_pascal_case(IO_INFO_PREFIX) + to_pascal_case(cmd_invocation.cmd_name) - ) - # Initialize the info generator object - info_generator_object = info_generator_class_for_cmd(cmd_invocation) - # Generate info - info_generator_object.generate_info() - return info_generator_object.get_info() - except Exception as sth: # module does not exist - return None - - -def get_parallelizability_info_from_cmd_invocation( - cmd_invocation: CommandInvocationInitial, -) -> Optional[ParallelizabilityInfo]: - # Get the Generator - try: - info_generator_class_for_cmd = str_to_class( - to_pascal_case(PAR_INFO_PREFIX) + to_pascal_case(cmd_invocation.cmd_name) - ) - # Initialize the info generator object - # TODO: be more rigorous and allow empty parallelization annotation: return ParallelizabilityInfo with [] as default - info_generator_object = info_generator_class_for_cmd(cmd_invocation) - # Generate info - info_generator_object.generate_info() - return info_generator_object.get_info() - except Exception: # module does not exist - return None - -def str_to_class(classname): - return getattr(sys.modules[__name__], classname) +class AnnotationGenerator: + # cannot be merged due to types + def get_input_output_info_from_cmd_invocation( + self, + cmd_invocation: CommandInvocationInitial, + ) -> Optional[InputOutputInfo]: + try: + # Get the Generator, info_generator_class_for_cmd_repr, info_generator_class_for_cmd_repr + cmd = cmd_invocation.cmd_name + module = importlib.import_module( + f"{ANNOTATION_GENERATORS}.{IO_INFO_PREFIX}_{cmd}" + ) + info_gen_class = getattr( + module, self.to_pascal_case(IO_INFO_PREFIX) + self.to_pascal_case(cmd) + ) + # Initialize the info generator object + info_generator_object = info_gen_class(cmd_invocation) + # Generate info + info_generator_object.generate_info() + return info_generator_object.get_info() + except: + return None + + def get_parallelizability_info_from_cmd_invocation( + self, + cmd_invocation: CommandInvocationInitial, + ) -> Optional[ParallelizabilityInfo]: + # Get the Generator + try: + cmd = cmd_invocation.cmd_name + module = importlib.import_module( + f"{ANNOTATION_GENERATORS}.{PAR_INFO_PREFIX}_{cmd}" + ) + print(module) + info_gen_class = getattr( + module, self.to_pascal_case(PAR_INFO_PREFIX) + self.to_pascal_case(cmd) + ) + # Initialize the info generator object + info_generator_object = info_gen_class(cmd_invocation) + # Initialize the info generator object + # TODO: be more rigorous and allow empty parallelization annotation: return ParallelizabilityInfo with [] as default + # Generate info + info_generator_object.generate_info() + return info_generator_object.get_info() + except: + return None + + @staticmethod + def to_pascal_case(string: str) -> str: + """ + Turns a snake_case string to PascalCase + """ + return string.replace("_", " ").title().replace(" ", "") diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_alt_bigram_aux_reduce.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_alt_bigram_aux_reduce.py index cf135eb..4d13df1 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_alt_bigram_aux_reduce.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_alt_bigram_aux_reduce.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorAltBigramAuxReduce(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_alt_bigrams_aux.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_alt_bigrams_aux.py index 1dccc69..03a58a8 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_alt_bigrams_aux.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_alt_bigrams_aux.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorAltBigramsAux(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_awk.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_awk.py index a122489..3505b7c 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_awk.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_awk.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorAwk(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_bigrams_aux.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_bigrams_aux.py index 7a8674a..2d9422c 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_bigrams_aux.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_bigrams_aux.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorBigramsAux(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_cat.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_cat.py index 86a1682..b21e049 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_cat.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_cat.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorCat(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_col.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_col.py index 08a39d8..184c68b 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_col.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_col.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorCol(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_comm.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_comm.py index 2847397..f415b6f 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_comm.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_comm.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorComm(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_custom_sort.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_custom_sort.py index ceeb473..50f5d10 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_custom_sort.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_custom_sort.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorCustomSort(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_custom_tr.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_custom_tr.py index 97461c4..9aacd5c 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_custom_tr.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_custom_tr.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorCustomTr(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_cut.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_cut.py index e0c0b52..81b2097 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_cut.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_cut.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorCut(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_diff.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_diff.py index c9fae20..a2c01f0 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_diff.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_diff.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorDiff(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_grep.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_grep.py index 52341fa..3b94d07 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_grep.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_grep.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorGrep(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_head.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_head.py index 34dbf4a..d043ec8 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_head.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_head.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorHead(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_interface.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_interface.py index f5e369a..d8f2043 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_interface.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_interface.py @@ -1,6 +1,6 @@ from typing import List, Tuple, Union, Literal, Dict -from config.definitions import INDICATORS_FOR_FILENAMES +from pash_annotations.config.definitions import INDICATORS_FOR_FILENAMES from pash_annotations.datatypes.basic_datatypes import Flag, Option, WhichClassForArg from pash_annotations.datatypes.access_kind import AccessKind, get_access_from_string diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_mkfifo.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_mkfifo.py index faac101..f4141f0 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_mkfifo.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_mkfifo.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorMkfifo(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_mv.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_mv.py index 9138bde..bd962fe 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_mv.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_mv.py @@ -1,6 +1,6 @@ from typing import List from pash_annotations.datatypes.basic_datatypes import FlagOption -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorMv(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_rm.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_rm.py index 62d0689..ed244d5 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_rm.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_rm.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorRm(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_sed.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_sed.py index 0876b81..848d1a6 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_sed.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_sed.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorSed(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_seq.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_seq.py index b148cbb..d097bdc 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_seq.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_seq.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorSeq(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_set_diff.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_set_diff.py index ad439a8..ca290ec 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_set_diff.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_set_diff.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorSetDiff(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_sort.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_sort.py index 38d8e49..42701e9 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_sort.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_sort.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorSort(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_tail.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_tail.py index 789bf34..860f68e 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_tail.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_tail.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorTail(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_tee.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_tee.py index 7a54287..cc71ae7 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_tee.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_tee.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorTee(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_test_one.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_test_one.py index 181157c..91928bd 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_test_one.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_test_one.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorTestOne(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_test_two.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_test_two.py index 2f0fd53..aa417b5 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_test_two.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_test_two.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorTestTwo(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_tr.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_tr.py index 37a2159..305d85b 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_tr.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_tr.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorTr(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_uniq.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_uniq.py index 10f37ed..0a70dad 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_uniq.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_uniq.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorUniq(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_wc.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_wc.py index b2a3bf7..3a96f4b 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_wc.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_wc.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorWc(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_xargs.py b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_xargs.py index 237d4c4..5bae4dc 100644 --- a/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_xargs.py +++ b/pash_annotations/annotation_generation/annotation_generators/input_output_info_generator_xargs.py @@ -1,4 +1,4 @@ -from input_output_info_generator_interface import InputOutputInfoGeneratorInterface +from pash_annotations.annotation_generation.annotation_generators.input_output_info_generator_interface import InputOutputInfoGeneratorInterface class InputOutputInfoGeneratorXargs(InputOutputInfoGeneratorInterface): diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_alt_bigrams_aux.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_alt_bigrams_aux.py index 06a9281..e5ce2d9 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_alt_bigrams_aux.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_alt_bigrams_aux.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) from pash_annotations.annotation_generation.datatypes.parallelizability.aggregator_spec import ( diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_bigrams_aux.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_bigrams_aux.py index 233758b..f792a4c 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_bigrams_aux.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_bigrams_aux.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) from pash_annotations.annotation_generation.datatypes.parallelizability.AggregatorSpec import ( diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_col.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_col.py index acab165..d20bfe4 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_col.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_col.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_custom_sort.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_custom_sort.py index 038a8af..dc5945f 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_custom_sort.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_custom_sort.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) from pash_annotations.annotation_generation.datatypes.parallelizability.aggregator_spec import ( diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_custom_tr.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_custom_tr.py index 9a9c60f..8e6bd33 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_custom_tr.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_custom_tr.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_cut.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_cut.py index cb9f43a..e47bd12 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_cut.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_cut.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_grep.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_grep.py index 5ccad2b..f22d079 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_grep.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_grep.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) from pash_annotations.annotation_generation.datatypes.parallelizability.parallelizer import ( diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_sed.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_sed.py index 10081c9..1c6f494 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_sed.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_sed.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_set_diff.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_set_diff.py index b75fcab..8e7ac28 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_set_diff.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_set_diff.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_sort.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_sort.py index e796093..2e72908 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_sort.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_sort.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) from pash_annotations.annotation_generation.datatypes.parallelizability.aggregator_spec import ( diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_test_one.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_test_one.py index 48a0fd1..de0f500 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_test_one.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_test_one.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) from pash_annotations.annotation_generation.datatypes.parallelizability.aggregator_spec import ( diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_test_two.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_test_two.py index d8c5361..8e3191c 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_test_two.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_test_two.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) from pash_annotations.annotation_generation.datatypes.parallelizability.aggregator_spec import ( diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_tr.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_tr.py index 1cf6fe2..eb2df96 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_tr.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_tr.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) from pash_annotations.datatypes.basic_datatypes import Operand diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_uniq.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_uniq.py index 467a6e4..3b5392c 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_uniq.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_uniq.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) from pash_annotations.annotation_generation.datatypes.parallelizability.parallelizer import ( diff --git a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_xargs.py b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_xargs.py index 251879a..f97c95a 100644 --- a/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_xargs.py +++ b/pash_annotations/annotation_generation/annotation_generators/parallelizability_info_generator_xargs.py @@ -1,4 +1,4 @@ -from pash_annotations.annotation_generation.datatypes.parallelizability_info_generator_interface import ( +from pash_annotations.annotation_generation.annotation_generators.parallelizability_info_generator_interface import ( ParallelizabilityInfoGeneratorInterface, ) diff --git a/pash_annotations/annotation_generation/tests/test_ann_gen_cat.py b/pash_annotations/annotation_generation/tests/test_ann_gen_cat.py index 6c43ac8..ff71c20 100644 --- a/pash_annotations/annotation_generation/tests/test_ann_gen_cat.py +++ b/pash_annotations/annotation_generation/tests/test_ann_gen_cat.py @@ -18,7 +18,7 @@ ParallelizabilityInfo, ) -import pash_annotations.annotation_generation.annotation_generation as AnnotationGeneration +from pash_annotations.annotation_generation.annotation_generation import AnnotationGenerator cmd_name = "cat" @@ -33,7 +33,7 @@ def test_cat_1() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -50,7 +50,7 @@ def test_cat_1() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is None @@ -67,7 +67,7 @@ def test_cat_2() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -84,7 +84,7 @@ def test_cat_2() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is None @@ -101,7 +101,7 @@ def test_cat_3() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -118,7 +118,7 @@ def test_cat_3() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is None @@ -133,7 +133,7 @@ def test_cat_4() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -150,7 +150,7 @@ def test_cat_4() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is None @@ -167,7 +167,7 @@ def test_cat_5() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -184,5 +184,5 @@ def test_cat_5() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is None diff --git a/pash_annotations/annotation_generation/tests/test_ann_gen_comm.py b/pash_annotations/annotation_generation/tests/test_ann_gen_comm.py index cdf6811..409b73c 100644 --- a/pash_annotations/annotation_generation/tests/test_ann_gen_comm.py +++ b/pash_annotations/annotation_generation/tests/test_ann_gen_comm.py @@ -17,7 +17,7 @@ from pash_annotations.annotation_generation.datatypes.parallelizability_info import ( ParallelizabilityInfo, ) -import pash_annotations.annotation_generation.annotation_generation as AnnotationGeneration +from pash_annotations.annotation_generation.annotation_generation import AnnotationGenerator cmd_name = "comm" @@ -33,7 +33,7 @@ def test_comm_1() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -50,7 +50,7 @@ def test_comm_1() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is None @@ -64,5 +64,5 @@ def test_comm_2() -> None: io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is None diff --git a/pash_annotations/annotation_generation/tests/test_ann_gen_cut.py b/pash_annotations/annotation_generation/tests/test_ann_gen_cut.py index 1e48300..7a3611f 100644 --- a/pash_annotations/annotation_generation/tests/test_ann_gen_cut.py +++ b/pash_annotations/annotation_generation/tests/test_ann_gen_cut.py @@ -34,7 +34,7 @@ make_aggregator_spec_concatenate, ) -import pash_annotations.annotation_generation.annotation_generation as AnnotationGeneration +from pash_annotations.annotation_generation.annotation_generation import AnnotationGenerator cmd_name = "cut" @@ -54,7 +54,7 @@ def test_cut_1() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -71,7 +71,7 @@ def test_cut_1() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 2 parallelizer1: Parallelizer = para_info.parallelizer_list[0] parallelizer2: Parallelizer = para_info.parallelizer_list[1] @@ -99,7 +99,7 @@ def test_cut_2() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -119,7 +119,7 @@ def test_cut_2() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 2 parallelizer1: Parallelizer = para_info.parallelizer_list[0] parallelizer2: Parallelizer = para_info.parallelizer_list[1] diff --git a/pash_annotations/annotation_generation/tests/test_ann_gen_grep.py b/pash_annotations/annotation_generation/tests/test_ann_gen_grep.py index e381741..be697c9 100644 --- a/pash_annotations/annotation_generation/tests/test_ann_gen_grep.py +++ b/pash_annotations/annotation_generation/tests/test_ann_gen_grep.py @@ -37,7 +37,7 @@ make_aggregator_spec_concatenate, ) -import pash_annotations.annotation_generation.annotation_generation as AnnotationGeneration +from pash_annotations.annotation_generation.annotation_generation import AnnotationGenerator cmd_name = "grep" @@ -58,7 +58,7 @@ def test_grep_1() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -75,7 +75,7 @@ def test_grep_1() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 0 # currently not implemented and thus not added to parallelizer_list # parallelizer1: Parallelizer = para_info.parallelizer_list[0] @@ -110,7 +110,7 @@ def test_grep_2() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -127,7 +127,7 @@ def test_grep_2() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 0 # currently not implemented and thus not added to parallelizer_list # parallelizer1: Parallelizer = para_info.parallelizer_list[0] @@ -162,7 +162,7 @@ def test_grep_3() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -179,7 +179,7 @@ def test_grep_3() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 2 parallelizer1: Parallelizer = para_info.parallelizer_list[0] parallelizer2: Parallelizer = para_info.parallelizer_list[1] @@ -211,7 +211,7 @@ def test_grep_4() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -228,7 +228,7 @@ def test_grep_4() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 0 # currently not implemented and thus not added to parallelizer_list # parallelizer1: Parallelizer = para_info.parallelizer_list[0] @@ -256,7 +256,7 @@ def test_grep_5() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -270,7 +270,7 @@ def test_grep_5() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 0 @@ -282,7 +282,7 @@ def test_grep_5() -> None: # cmd_inv_pref: CommandInvocationPrefix = CommandInvocationPrefix(cmd_inv.cmd_name, cmd_inv.flag_option_list, []) # # # IO Info -# io_info: InputOutputInfo = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) +# io_info: InputOutputInfo = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) # cmd_inv_with_io: CommandInvocationWithIO = io_info.apply_input_output_info_to_command_invocation(cmd_inv) # print(cmd_inv_with_io.operand_list) # assert len(cmd_inv_with_io.get_operands_with_config_input()) == 1 @@ -292,7 +292,7 @@ def test_grep_5() -> None: # assert cmd_inv_with_io.implicit_use_of_streaming_output == make_stdout_with_access_output() # # # Parallelizability Info -# para_info: ParallelizabilityInfo = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) +# para_info: ParallelizabilityInfo = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) # assert len(para_info.parallelizer_list) == 2 # parallelizer1: Parallelizer = para_info.parallelizer_list[0] # parallelizer2: Parallelizer = para_info.parallelizer_list[1] diff --git a/pash_annotations/annotation_generation/tests/test_ann_gen_head.py b/pash_annotations/annotation_generation/tests/test_ann_gen_head.py index 02099af..a8eb736 100644 --- a/pash_annotations/annotation_generation/tests/test_ann_gen_head.py +++ b/pash_annotations/annotation_generation/tests/test_ann_gen_head.py @@ -19,7 +19,7 @@ ParallelizabilityInfo, ) -import pash_annotations.annotation_generation.annotation_generation as AnnotationGeneration +from pash_annotations.annotation_generation.annotation_generation import AnnotationGenerator cmd_name = "head" @@ -40,7 +40,7 @@ def test_head_1() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -57,7 +57,7 @@ def test_head_1() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is None @@ -74,7 +74,7 @@ def test_head_2() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -92,5 +92,5 @@ def test_head_2() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is None diff --git a/pash_annotations/annotation_generation/tests/test_ann_gen_mv.py b/pash_annotations/annotation_generation/tests/test_ann_gen_mv.py index 07ca33b..4182521 100644 --- a/pash_annotations/annotation_generation/tests/test_ann_gen_mv.py +++ b/pash_annotations/annotation_generation/tests/test_ann_gen_mv.py @@ -15,7 +15,7 @@ ParallelizabilityInfo, ) -import pash_annotations.annotation_generation.annotation_generation as AnnotationGeneration +from pash_annotations.annotation_generation.annotation_generation import AnnotationGenerator cmd_name = "mv" @@ -31,7 +31,7 @@ def test_mv_1() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -48,7 +48,7 @@ def test_mv_1() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is None @@ -67,7 +67,7 @@ def test_mv_2() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -83,7 +83,7 @@ def test_mv_2() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is None @@ -104,5 +104,5 @@ def test_mv_3() -> None: io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is None diff --git a/pash_annotations/annotation_generation/tests/test_ann_gen_sort.py b/pash_annotations/annotation_generation/tests/test_ann_gen_sort.py index b6f76b7..9ff44d3 100644 --- a/pash_annotations/annotation_generation/tests/test_ann_gen_sort.py +++ b/pash_annotations/annotation_generation/tests/test_ann_gen_sort.py @@ -42,7 +42,7 @@ make_aggregator_spec_custom_2_ary_from_cmd_inv_with_transformers, ) -import pash_annotations.annotation_generation.annotation_generation as AnnotationGeneration +from pash_annotations.annotation_generation.annotation_generation import AnnotationGenerator cmd_name = "sort" @@ -63,7 +63,7 @@ def test_sort_1() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -80,7 +80,7 @@ def test_sort_1() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 1 parallelizer1: Parallelizer = para_info.parallelizer_list[0] # only check splitter and actual mappers and aggregators @@ -137,7 +137,7 @@ def test_sort_2() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -157,7 +157,7 @@ def test_sort_2() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 1 parallelizer1: Parallelizer = para_info.parallelizer_list[0] # only check splitter and actual mappers and aggregators @@ -179,7 +179,7 @@ def test_sort_3() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -196,7 +196,7 @@ def test_sort_3() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert ( para_info is not None and len(para_info.parallelizer_list) == 0 ) # because of stable sort @@ -212,7 +212,7 @@ def test_sort_5() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -232,7 +232,7 @@ def test_sort_5() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert ( para_info is not None and len(para_info.parallelizer_list) == 0 ) # because of stable sort @@ -248,7 +248,7 @@ def test_sort_6() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -265,7 +265,7 @@ def test_sort_6() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert ( para_info is not None and len(para_info.parallelizer_list) == 0 ) # because of files0-from diff --git a/pash_annotations/annotation_generation/tests/test_ann_gen_tail.py b/pash_annotations/annotation_generation/tests/test_ann_gen_tail.py index 6167ff8..7eab2cf 100644 --- a/pash_annotations/annotation_generation/tests/test_ann_gen_tail.py +++ b/pash_annotations/annotation_generation/tests/test_ann_gen_tail.py @@ -18,7 +18,7 @@ ParallelizabilityInfo, ) -import pash_annotations.annotation_generation.annotation_generation as AnnotationGeneration +from pash_annotations.annotation_generation.annotation_generation import AnnotationGenerator cmd_name = "tail" @@ -36,7 +36,7 @@ def test_tail_1() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -54,7 +54,7 @@ def test_tail_1() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is None @@ -71,7 +71,7 @@ def test_tail_2() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -89,5 +89,5 @@ def test_tail_2() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is None diff --git a/pash_annotations/annotation_generation/tests/test_ann_gen_tr.py b/pash_annotations/annotation_generation/tests/test_ann_gen_tr.py index 31b1c62..a1cae66 100644 --- a/pash_annotations/annotation_generation/tests/test_ann_gen_tr.py +++ b/pash_annotations/annotation_generation/tests/test_ann_gen_tr.py @@ -35,7 +35,7 @@ make_aggregator_spec_adj_lines_func_from_string_representation, ) -import pash_annotations.annotation_generation.annotation_generation as AnnotationGeneration +from pash_annotations.annotation_generation.annotation_generation import AnnotationGenerator cmd_name = "tr" @@ -55,7 +55,7 @@ def test_tr_1() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -75,7 +75,7 @@ def test_tr_1() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 2 parallelizer1: Parallelizer = para_info.parallelizer_list[0] parallelizer2: Parallelizer = para_info.parallelizer_list[1] @@ -111,7 +111,7 @@ def test_tr_2() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -131,7 +131,7 @@ def test_tr_2() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 2 parallelizer1: Parallelizer = para_info.parallelizer_list[0] parallelizer2: Parallelizer = para_info.parallelizer_list[1] @@ -157,7 +157,7 @@ def test_tr_3() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -177,7 +177,7 @@ def test_tr_3() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 2 parallelizer1: Parallelizer = para_info.parallelizer_list[0] parallelizer2: Parallelizer = para_info.parallelizer_list[1] @@ -203,7 +203,7 @@ def test_tr_4() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -223,7 +223,7 @@ def test_tr_4() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 2 parallelizer1: Parallelizer = para_info.parallelizer_list[0] parallelizer2: Parallelizer = para_info.parallelizer_list[1] @@ -249,7 +249,7 @@ def test_tr_5() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -269,7 +269,7 @@ def test_tr_5() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 2 parallelizer1: Parallelizer = para_info.parallelizer_list[0] parallelizer2: Parallelizer = para_info.parallelizer_list[1] @@ -295,7 +295,7 @@ def test_tr_6() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -315,7 +315,7 @@ def test_tr_6() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 2 parallelizer1: Parallelizer = para_info.parallelizer_list[0] parallelizer2: Parallelizer = para_info.parallelizer_list[1] diff --git a/pash_annotations/annotation_generation/tests/test_ann_gen_uniq.py b/pash_annotations/annotation_generation/tests/test_ann_gen_uniq.py index 6d67aa2..42370c2 100644 --- a/pash_annotations/annotation_generation/tests/test_ann_gen_uniq.py +++ b/pash_annotations/annotation_generation/tests/test_ann_gen_uniq.py @@ -34,7 +34,7 @@ make_aggregator_spec_adj_lines_func_from_string_representation, ) -import pash_annotations.annotation_generation.annotation_generation as AnnotationGeneration +from pash_annotations.annotation_generation.annotation_generation import AnnotationGenerator cmd_name = "uniq" @@ -51,7 +51,7 @@ def test_uniq_1() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -65,7 +65,7 @@ def test_uniq_1() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 0 @@ -82,7 +82,7 @@ def test_uniq_2() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -102,7 +102,7 @@ def test_uniq_2() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 2 parallelizer1: Parallelizer = para_info.parallelizer_list[0] parallelizer2: Parallelizer = para_info.parallelizer_list[1] @@ -138,7 +138,7 @@ def test_uniq_3() -> None: # IO Info io_info: Optional[ InputOutputInfo - ] = AnnotationGeneration.get_input_output_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_input_output_info_from_cmd_invocation(cmd_inv) assert io_info is not None cmd_inv_with_io: CommandInvocationWithIO = ( io_info.apply_input_output_info_to_command_invocation(cmd_inv) @@ -152,7 +152,7 @@ def test_uniq_3() -> None: # Parallelizability Info para_info: Optional[ ParallelizabilityInfo - ] = AnnotationGeneration.get_parallelizability_info_from_cmd_invocation(cmd_inv) + ] = AnnotationGenerator().get_parallelizability_info_from_cmd_invocation(cmd_inv) assert para_info is not None and len(para_info.parallelizer_list) == 2 parallelizer1: Parallelizer = para_info.parallelizer_list[0] parallelizer2: Parallelizer = para_info.parallelizer_list[1]