diff --git a/test_tsp.py b/test_tsp.py index d9a709a..62afe48 100644 --- a/test_tsp.py +++ b/test_tsp.py @@ -27,11 +27,11 @@ from tsp.response import ResponseStatus from tsp.tsp_client import TspClient -REQUESTED_TIME_XY_START = 1332170682440133097 -REQUESTED_TIME_XY_END = 1332170692664579801 -REQUESTED_TIME_XY_LENGTH = 10 -REQUESTED_TIME_XY_STEP = (REQUESTED_TIME_XY_END - - REQUESTED_TIME_XY_START) / REQUESTED_TIME_XY_LENGTH +REQUESTED_TIME_START = 1332170682440133097 +REQUESTED_TIME_END = 1332170692664579801 +REQUESTED_TIME_LENGTH = 10 +REQUESTED_TIME_STEP = (REQUESTED_TIME_END - + REQUESTED_TIME_START) / REQUESTED_TIME_LENGTH class TestTspClient: @@ -272,26 +272,39 @@ def test_fetch_xy(self, kernel): assert response.model is not None status = response.model.status.upper() - parameters = {} - requested_items = [] - for entry in response.model.model.entries: - requested_items.append(entry.id) - parameters[TspClient.REQUESTED_ITEM_KEY] = requested_items - - requested_times = [] - requested_time = REQUESTED_TIME_XY_START - while len(requested_times) < REQUESTED_TIME_XY_LENGTH: - requested_time += REQUESTED_TIME_XY_STEP - requested_times.append(int(requested_time)) - parameters[TspClient.REQUESTED_TIME_KEY] = requested_times - - params = {TspClient.PARAMETERS_KEY: parameters} + params = self.__requested_parameters(response) response = self.tsp_client.fetch_xy(experiment_uuid, output_id, params) assert response.status_code == 200 assert response.model.model_type == response.model.model_type.XY self._delete_experiments() self._delete_traces() + def test_fetch_timegraph_tree_complete(self, kernel): + traces = [] + response = self.tsp_client.open_trace(os.path.basename(kernel), kernel) + traces.append(response.model.UUID) + response = self.tsp_client.open_experiment( + os.path.basename(kernel), traces) + assert response.status_code == 200 + experiment_uuid = response.model.UUID + + response = self.tsp_client.fetch_experiment_outputs(experiment_uuid) + output_id = response.model.descriptors[0].id + status = ResponseStatus.RUNNING.name + while status == ResponseStatus.RUNNING.name: + time.sleep(1) + response = self.tsp_client.fetch_timegraph_tree( + experiment_uuid, output_id) + assert response.model is not None + status = response.model.status.upper() + + params = self.__requested_parameters(response) + response = self.tsp_client.fetch_timegraph_tree( + experiment_uuid, output_id, params) + assert response.status_code == 200 + self._delete_experiments() + self._delete_traces() + def test_fetch_extensions_none(self): response = self.tsp_client.fetch_extensions() assert response.status_code == 200 @@ -314,3 +327,18 @@ def test_posted_extension_deleted(self, extension): response = self.tsp_client.fetch_extensions() assert not response.model.extension_set + + def __requested_parameters(self, response): + parameters = {} + requested_items = [] + for entry in response.model.model.entries: + requested_items.append(entry.id) + parameters[TspClient.REQUESTED_ITEM_KEY] = requested_items + + requested_times = [] + requested_time = REQUESTED_TIME_START + while len(requested_times) < REQUESTED_TIME_LENGTH: + requested_time += REQUESTED_TIME_STEP + requested_times.append(int(requested_time)) + parameters[TspClient.REQUESTED_TIME_KEY] = requested_times + return {TspClient.PARAMETERS_KEY: parameters} diff --git a/tsp/tree_model.py b/tree_model.py similarity index 93% rename from tsp/tree_model.py rename to tree_model.py index d7681e4..2741f3f 100644 --- a/tsp/tree_model.py +++ b/tree_model.py @@ -27,8 +27,6 @@ import pandas as pd -from tsp.data_type import DataType - class TreeModel(object): @@ -109,13 +107,9 @@ def print(self, data, depth=0): print(" ", end="") for _ in range((int)(depth / self._indent) - 1): print("| ", end="") - other = "" - others = self._entry.others # TODO print TimeGraphEntry specific fields - for k in others: - other = ('{0} ({1}, {2})'.format(other, k, others.get(k))) - print("{0}{1} ({1}, {2}) {3} {4}".format( - prefix, self._entry.labels[0], self._entry.id, self._entry.parent_id, other)) + print("{0}{1} ({1}, {2}) {3}".format( + prefix, self._entry.labels[0], self._entry.id, self._entry.parent_id)) else: label_str = "" if(depth > 0): diff --git a/tsp-cli-client b/tsp-cli-client index 5664b66..17e6ede 100755 --- a/tsp-cli-client +++ b/tsp-cli-client @@ -34,7 +34,7 @@ from datetime import timedelta from decimal import Decimal from os.path import os -from tsp.tree_model import TreeModel +from tree_model import TreeModel from tsp.tsp_client import TspClient from tsp.xy_model import XYModel diff --git a/tsp/column_descriptor.py b/tsp/column_descriptor.py index f5cede6..da78888 100644 --- a/tsp/column_descriptor.py +++ b/tsp/column_descriptor.py @@ -31,7 +31,7 @@ class ColumnDescriptor(object): Basic entry ''' - def __init__(self, params, copy_others=True): + def __init__(self, params): ''' Text of header for the entry ''' @@ -47,12 +47,3 @@ def __init__(self, params, copy_others=True): if TOOLTIP_KEY in params: self.tooltip = params.get(TOOLTIP_KEY) del params[TOOLTIP_KEY] - - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.copy_others = copy_others - if copy_others: - self.others = {} - if params: - self.others = copy.deepcopy(params) diff --git a/tsp/data_type.py b/tsp/data_type.py deleted file mode 100644 index bd5cf03..0000000 --- a/tsp/data_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (C) 2020 - Ericsson -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -from enum import Enum - - -class DataType(Enum): - ''' - Type enum to define different data descriptors - ''' - - NUMBER = "NUMBER" - BINARY_NUMBER = "BINARY_NUMBER" - TIMESTAMP = "TIMESTAMP" - DURATION = "DURATION" - STRING = "STRING" diff --git a/tsp/entry.py b/tsp/entry.py index fcfa7e2..9142b46 100644 --- a/tsp/entry.py +++ b/tsp/entry.py @@ -50,7 +50,7 @@ class Entry(object): Basic entry ''' - def __init__(self, params, copy_others=True): + def __init__(self, params): ''' Unique Id for the entry ''' @@ -84,12 +84,3 @@ def __init__(self, params, copy_others=True): if params.get(STYLE_KEY) is not None: self.style = OutputElementStyle(params.get(STYLE_KEY)) del params[STYLE_KEY] - - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.copy_others = copy_others - if copy_others: - self.others = {} - if params: - self.others = copy.deepcopy(params) diff --git a/tsp/entry_model.py b/tsp/entry_model.py index 7417aad..e20cc4f 100644 --- a/tsp/entry_model.py +++ b/tsp/entry_model.py @@ -62,17 +62,9 @@ def __init__(self, params, model_type=ModelType.XY_TREE): ''' self.entries = [] if ENTRIES_KEY in params: - entries = params.get(ENTRIES_KEY) - for entry in entries: + for entry in params.get(ENTRIES_KEY): if model_type == ModelType.TIME_GRAPH_TREE: self.entries.append(TimeGraphEntry(entry)) else: self.entries.append(Entry(entry)) del params[ENTRIES_KEY] - - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) diff --git a/tsp/experiment.py b/tsp/experiment.py index 9e53ab5..16a9d56 100644 --- a/tsp/experiment.py +++ b/tsp/experiment.py @@ -51,7 +51,7 @@ def __init__(self, params): if UUID_KEY in params: self.UUID = params.get(UUID_KEY) del params[UUID_KEY] - else: + else: # pragma: no cover self.UUID = NA ''' @@ -60,7 +60,7 @@ def __init__(self, params): if NAME_KEY in params: self.name = params.get(NAME_KEY) del params[NAME_KEY] - else: + else: # pragma: no cover self.name = NA ''' @@ -69,7 +69,7 @@ def __init__(self, params): if START_TIME_KEY in params: self.start = params.get(START_TIME_KEY) del params[START_TIME_KEY] - else: + else: # pragma: no cover self.start = -1 ''' @@ -78,7 +78,7 @@ def __init__(self, params): if END_TIME_KEY in params: self.end = params.get(END_TIME_KEY) del params[END_TIME_KEY] - else: + else: # pragma: no cover self.end = -1 ''' @@ -87,7 +87,7 @@ def __init__(self, params): if NB_EVENT_KEY in params: self.number_of_events = params.get(NB_EVENT_KEY) del params[NB_EVENT_KEY] - else: + else: # pragma: no cover self.number_of_events = 0 ''' @@ -97,7 +97,7 @@ def __init__(self, params): if INDEXING_STATUS_KEY in params: self.indexin_status = params.get(INDEXING_STATUS_KEY) del params[INDEXING_STATUS_KEY] - else: + else: # pragma: no cover self.indexin_status = 0 ''' @@ -105,10 +105,3 @@ def __init__(self, params): ''' if TRACES_TIME_KEY in params: self.traces = TraceSet(params.get(TRACES_TIME_KEY)) - - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) diff --git a/tsp/output_descriptor.py b/tsp/output_descriptor.py index 5082ce4..b61736e 100644 --- a/tsp/output_descriptor.py +++ b/tsp/output_descriptor.py @@ -51,7 +51,7 @@ def __init__(self, params): if ID_KEY in params: self.id = params.get(ID_KEY) del params[ID_KEY] - else: + else: # pragma: no cover self.id = None ''' @@ -60,7 +60,7 @@ def __init__(self, params): if NAME_KEY in params: self.name = params.get(NAME_KEY) del params[NAME_KEY] - else: + else: # pragma: no cover self.name = UNKOWN ''' @@ -69,7 +69,7 @@ def __init__(self, params): if DESCRIPTION_KEY in params: self.description = params.get(DESCRIPTION_KEY) del params[DESCRIPTION_KEY] - else: + else: # pragma: no cover self.description = UNKOWN ''' @@ -79,7 +79,7 @@ def __init__(self, params): if TYPE_KEY in params: self.type = params.get(TYPE_KEY) del params[TYPE_KEY] - else: + else: # pragma: no cover self.type = UNKOWN ''' @@ -127,10 +127,3 @@ def __init__(self, params): del params[COMPATIBLE_PROVIDERS_KEY] else: self.compatible_providers = [] - - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) diff --git a/tsp/output_element_style.py b/tsp/output_element_style.py index b5bd283..fd35880 100644 --- a/tsp/output_element_style.py +++ b/tsp/output_element_style.py @@ -58,13 +58,6 @@ def __init__(self, params): else: self.style_values = {} - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) - class OutputStyleModel(object): ''' @@ -84,10 +77,3 @@ def __init__(self, params): del params[STYLES_KEY] else: self.style = None - - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) diff --git a/tsp/response.py b/tsp/response.py index ea69623..7375bb8 100644 --- a/tsp/response.py +++ b/tsp/response.py @@ -81,7 +81,7 @@ def __init__(self, params, model_type): self.model = EntryModel(params.get(MODEL_KEY), self.model_type) elif self.model_type == ModelType.XY_TREE: self.model = EntryModel(params.get(MODEL_KEY)) - elif self.model_type == ModelType.STATES: + elif self.model_type == ModelType.STATES: # pragma: no cover # TODO print("not implemented") elif self.model_type == ModelType.XY: @@ -100,7 +100,7 @@ def __init__(self, params, model_type): ''' if RESPONSE_STATUS_KEY in params: self.status = ResponseStatus(params.get(RESPONSE_STATUS_KEY)) - else: + else: # pragma: no cover self.status = ResponseStatus.FAILED ''' @@ -108,5 +108,5 @@ def __init__(self, params, model_type): ''' if STATUS_MESSAGE_KEY in params: self.status = params.get(STATUS_MESSAGE_KEY) - else: + else: # pragma: no cover self.status = "" diff --git a/tsp/time_graph_model.py b/tsp/time_graph_model.py index c3cbead..763f2dd 100644 --- a/tsp/time_graph_model.py +++ b/tsp/time_graph_model.py @@ -46,7 +46,7 @@ class TimeGraphEntry(Entry): ''' def __init__(self, params): - super(TimeGraphEntry, self).__init__(params, False) + super(TimeGraphEntry, self).__init__(params) ''' Type of the entry @@ -76,13 +76,6 @@ def __init__(self, params): self.has_row_model = params.get(HAS_ROW_MODEL_KEY) del params[HAS_ROW_MODEL_KEY] - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) - class TimeGraphModel(object): ''' @@ -96,13 +89,6 @@ def __init__(self, params): self.rows.append(TimeGraphRow(row)) del params[ROWS_KEY] - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) - class TimeGraphRow(object): ''' @@ -126,13 +112,6 @@ def __init__(self, params): self.states.append(TimeGraphState(state)) del params[STATES_KEY] - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) - class TimeGraphState(object): ''' @@ -182,13 +161,6 @@ def __init__(self, params): self.style = params.get(STYLE_KEY) del params[STYLE_KEY] - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) - class TimeGraphArrow(object): ''' @@ -237,10 +209,3 @@ def __init__(self, params): if STYLE_KEY in params: self.style = params.get(STYLE_KEY) del params[STYLE_KEY] - - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) diff --git a/tsp/trace.py b/tsp/trace.py index cf5450c..adb082c 100644 --- a/tsp/trace.py +++ b/tsp/trace.py @@ -49,7 +49,7 @@ def __init__(self, params): if UUID_KEY in params: self.UUID = params.get(UUID_KEY) del params[UUID_KEY] - else: + else: # pragma: no cover self.UUID = NA ''' @@ -58,7 +58,7 @@ def __init__(self, params): if NAME_KEY in params: self.name = params.get(NAME_KEY) del params[NAME_KEY] - else: + else: # pragma: no cover self.name = NA ''' @@ -67,7 +67,7 @@ def __init__(self, params): if START_TIME_KEY in params: self.start = params.get(START_TIME_KEY) del params[START_TIME_KEY] - else: + else: # pragma: no cover self.start = -1 ''' @@ -76,7 +76,7 @@ def __init__(self, params): if END_TIME_KEY in params: self.end = params.get(END_TIME_KEY) del params[END_TIME_KEY] - else: + else: # pragma: no cover self.end = -1 ''' @@ -85,7 +85,7 @@ def __init__(self, params): if PATH_TIME_KEY in params: self.path = params.get(PATH_TIME_KEY) del params[PATH_TIME_KEY] - else: + else: # pragma: no cover self.path = -1 ''' @@ -94,7 +94,7 @@ def __init__(self, params): if NB_EVENT_KEY in params: self.number_of_events = params.get(NB_EVENT_KEY) del params[NB_EVENT_KEY] - else: + else: # pragma: no cover self.number_of_events = 0 ''' @@ -104,12 +104,5 @@ def __init__(self, params): if INDEXING_STATUS_KEY in params: self.indexin_status = params.get(INDEXING_STATUS_KEY) del params[INDEXING_STATUS_KEY] - else: + else: # pragma: no cover self.indexin_status = 0 - - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) diff --git a/tsp/tsp_client.py b/tsp/tsp_client.py index a4f8073..d04ad45 100644 --- a/tsp/tsp_client.py +++ b/tsp/tsp_client.py @@ -63,7 +63,7 @@ def fetch_traces(self): response = requests.get(api_url, headers=headers) if response.status_code == 200: return TspClientResponse(TraceSet(json.loads(response.content.decode('utf-8'))), response.status_code, response.text) - else: + else: # pragma: no cover print("get traces failed: {0}".format(response.status_code)) return TspClientResponse(None, response.status_code, response.text) @@ -98,7 +98,7 @@ def open_trace(self, name, path): if response.status_code == 200: return TspClientResponse(Trace(json.loads(response.content.decode('utf-8'))), response.status_code, response.text) - else: + else: # pragma: no cover print("post trace failed: {0}".format(response.status_code)) return TspClientResponse(None, response.status_code, response.text) @@ -113,7 +113,7 @@ def delete_trace(self, uuid, delete_trace, remove_cache=False): ''' api_url = '{0}traces/{1}'.format(self.base_url, uuid) parameters = {} - if delete_trace: + if delete_trace: # pragma: no cover parameters['deleteTrace'] = "true" if remove_cache: @@ -122,7 +122,7 @@ def delete_trace(self, uuid, delete_trace, remove_cache=False): response = requests.delete(api_url, json=parameters, headers=headers) if response.status_code == 200: return TspClientResponse(Trace(json.loads(response.content.decode('utf-8'))), response.status_code, response.text) - else: + else: # pragma: no cover print("delete trace failed: {0}".format(response.status_code)) return TspClientResponse(None, response.status_code, response.text) @@ -136,7 +136,7 @@ def fetch_experiments(self): response = requests.get(api_url, headers=headers) if response.status_code == 200: return TspClientResponse(ExperimentSet(json.loads(response.content.decode('utf-8'))), response.status_code, response.text) - else: + else: # pragma: no cover print("get experiments failed: {0}".format(response.status_code)) return TspClientResponse(None, response.status_code, response.text) @@ -166,7 +166,7 @@ def delete_experiment(self, uuid): response = requests.delete(api_url, headers=headers) if response.status_code == 200: return TspClientResponse(Experiment(json.loads(response.content.decode('utf-8'))), response.status_code, response.text) - else: + else: # pragma: no cover print("delete experiment failed: {0}".format(response.status_code)) return TspClientResponse(None, response.status_code, response.text) @@ -185,7 +185,7 @@ def open_experiment(self, name, traces): if response.status_code == 200: return TspClientResponse(Experiment(json.loads(response.content.decode('utf-8'))), response.status_code, response.text) - else: + else: # pragma: no cover print("post experiment failed: {0}".format(response.status_code)) return TspClientResponse(None, response.status_code, response.text) @@ -202,7 +202,7 @@ def fetch_experiment_outputs(self, exp_uuid): if response.status_code == 200: return TspClientResponse(OutputDescriptorSet(json.loads(response.content.decode('utf-8'))), response.status_code, response.text) - else: + else: # pragma: no cover print("get output descriptors failed: {0}".format( response.status_code)) return TspClientResponse(None, response.status_code, response.text) @@ -223,7 +223,7 @@ def fetch_experiment_output(self, exp_uuid, output_id): if response.status_code == 200: return TspClientResponse(OutputDescriptor(json.loads(response.content.decode('utf-8'))), response.status_code, response.text) - else: + else: # pragma: no cover print("failed to get tree: {0}".format(response.status_code)) return TspClientResponse(None, response.status_code, response.text) @@ -247,7 +247,7 @@ def fetch_timegraph_tree(self, exp_uuid, output_id, parameters=None): if response.status_code == 200: return TspClientResponse(GenericResponse(json.loads(response.content.decode('utf-8')), ModelType.TIME_GRAPH_TREE), response.status_code, response.text) - else: + else: # pragma: no cover print("failed to get tree: {0}".format(response.status_code)) return TspClientResponse(None, response.status_code, response.text) @@ -271,7 +271,7 @@ def fetch_xy_tree(self, exp_uuid, output_id, parameters=None): if response.status_code == 200: return TspClientResponse(GenericResponse(json.loads(response.content.decode('utf-8')), ModelType.XY_TREE), response.status_code, response.text) - else: + else: # pragma: no cover print("failed to get tree: {0}".format(response.status_code)) return TspClientResponse(None, response.status_code, response.text) @@ -291,7 +291,7 @@ def fetch_xy(self, exp_uuid, output_id, parameters): if response.status_code == 200: return TspClientResponse(GenericResponse(json.loads(response.content.decode('utf-8')), ModelType.XY), response.status_code, response.text) - else: + else: # pragma: no cover print("failed to get xy: {0}".format(response.status_code)) return TspClientResponse(None, response.status_code, response.text) @@ -305,7 +305,7 @@ def fetch_extensions(self): if response.status_code == 200: return TspClientResponse(ExtensionSet(json.loads(response.content.decode('utf-8'))), response.status_code, response.text) - else: + else: # pragma: no cover print("failed to get extensions: {0}".format(response.status_code)) return TspClientResponse(None, response.status_code, response.text) @@ -320,7 +320,7 @@ def post_extension(self, mypath): if response.status_code == 200: return TspClientResponse("Loaded", response.status_code, response.text) - else: + else: # pragma: no cover print("post extension failed: {0}".format(response.status_code)) return TspClientResponse(None, response.status_code, response.text) @@ -334,6 +334,6 @@ def delete_extension(self, name): if response.status_code == 200: return TspClientResponse("Deleted", response.status_code, response.text) - else: + else: # pragma: no cover print("post extension failed: {0}".format(response.status_code)) return TspClientResponse(None, response.status_code, response.text) diff --git a/tsp/xy_model.py b/tsp/xy_model.py index 7664c14..ab729d6 100644 --- a/tsp/xy_model.py +++ b/tsp/xy_model.py @@ -66,14 +66,7 @@ def __init__(self, params): self.series.append(XYSeries(series)) del params[SERIES_KEY] - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) - - def print(self): + def print(self): # pragma: no cover print(f'XY title: {self.title}') common_x_axis = False @@ -83,8 +76,6 @@ def print(self): for series in self.series: series.print() - for other_item in self.others.items(): - print(f'XY other item: {other_item}') class XYSeries(object): @@ -148,14 +139,7 @@ def __init__(self, params): self.tags.append(tag) del params[TAGS_KEY] - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) - - def print(self): + def print(self): # pragma: no cover print(f' Series name: {self.series_name}') print(f' Series id: {self.series_id}') @@ -168,8 +152,6 @@ def print(self): print(f' Series Y-value: {value}') for tag in self.tags: print(f' Series tag: {tag}') - for other_item in self.others.items(): - print(f' Series other item: {other_item}') class XYAxis(object): @@ -199,16 +181,7 @@ def __init__(self, params): self.data_type = params.get(DATA_TYPE_KEY) del params[DATA_TYPE_KEY] - ''' - Store other key/value pairs that are not defined in the TSP in a dictionary - ''' - self.others = {} - if params: - self.others = copy.deepcopy(params) - - def print(self): + def print(self): # pragma: no cover print(f' Axis label: {self.label}') print(f' Axis unit: {self.unit}') print(f' Axis data type: {self.data_type}') - for other_item in self.others.items(): - print(f' Axis other item: {other_item}')