From f1816988f2a534ebbd64c06e6ecda5f191f24662 Mon Sep 17 00:00:00 2001 From: Mattia Mancini <mancini@astron.nl> Date: Tue, 29 May 2018 08:08:49 +0000 Subject: [PATCH] Story SW-300: fixing view error --- .gitattributes | 4 ---- .../django_postgresql/.pytest_cache/v/cache/lastfailed | 4 ---- .../django_postgresql/.pytest_cache/v/cache/nodeids | 5 ----- .../DBInterface/monitoringdb/rtsm_test_raw_parser.py | 5 +++++ .../DBInterface/monitoringdb/station_test_raw_parser.py | 7 +++++-- .../monitoringdb/tests/.pytest_cache/v/cache/lastfailed | 4 ---- .../monitoringdb/tests/.pytest_cache/v/cache/nodeids | 3 --- 7 files changed, 10 insertions(+), 22 deletions(-) delete mode 100644 LCU/Maintenance/DBInterface/django_postgresql/.pytest_cache/v/cache/lastfailed delete mode 100644 LCU/Maintenance/DBInterface/django_postgresql/.pytest_cache/v/cache/nodeids delete mode 100644 LCU/Maintenance/DBInterface/monitoringdb/tests/.pytest_cache/v/cache/lastfailed delete mode 100644 LCU/Maintenance/DBInterface/monitoringdb/tests/.pytest_cache/v/cache/nodeids diff --git a/.gitattributes b/.gitattributes index 01041407499..f37db444339 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1771,8 +1771,6 @@ LCU/Firmware/tools/src/view_images.sh -text LCU/Maintenance/CMakeLists.txt -text LCU/Maintenance/DBInterface/CMakeLists.txt -text LCU/Maintenance/DBInterface/__init__.py -text -LCU/Maintenance/DBInterface/django_postgresql/.pytest_cache/v/cache/lastfailed -text -LCU/Maintenance/DBInterface/django_postgresql/.pytest_cache/v/cache/nodeids -text LCU/Maintenance/DBInterface/django_postgresql/__init__.py -text LCU/Maintenance/DBInterface/django_postgresql/create_db.sql -text LCU/Maintenance/DBInterface/django_postgresql/settings.py -text @@ -1810,8 +1808,6 @@ LCU/Maintenance/DBInterface/monitoringdb/serializers/stationtest.py -text LCU/Maintenance/DBInterface/monitoringdb/serializers/tbberrorserializer.py -text LCU/Maintenance/DBInterface/monitoringdb/serializers/tileerror.py -text LCU/Maintenance/DBInterface/monitoringdb/station_test_raw_parser.py -text -LCU/Maintenance/DBInterface/monitoringdb/tests/.pytest_cache/v/cache/lastfailed -text -LCU/Maintenance/DBInterface/monitoringdb/tests/.pytest_cache/v/cache/nodeids -text LCU/Maintenance/DBInterface/monitoringdb/tests/__init__.py -text LCU/Maintenance/DBInterface/monitoringdb/tests/common.py -text LCU/Maintenance/DBInterface/monitoringdb/tests/old_tests.py -text diff --git a/LCU/Maintenance/DBInterface/django_postgresql/.pytest_cache/v/cache/lastfailed b/LCU/Maintenance/DBInterface/django_postgresql/.pytest_cache/v/cache/lastfailed deleted file mode 100644 index f00cf7b07c8..00000000000 --- a/LCU/Maintenance/DBInterface/django_postgresql/.pytest_cache/v/cache/lastfailed +++ /dev/null @@ -1,4 +0,0 @@ -{ - "monitoringdb/tests/t_stationtest_parser.py::TestStationTestsParser": true, - "monitoringdb/tests/t_stationtest_parser.py::TestStationTestsParser::()::test_parsing_one_test": true -} \ No newline at end of file diff --git a/LCU/Maintenance/DBInterface/django_postgresql/.pytest_cache/v/cache/nodeids b/LCU/Maintenance/DBInterface/django_postgresql/.pytest_cache/v/cache/nodeids deleted file mode 100644 index 81039ce4bfa..00000000000 --- a/LCU/Maintenance/DBInterface/django_postgresql/.pytest_cache/v/cache/nodeids +++ /dev/null @@ -1,5 +0,0 @@ -[ - "monitoringdb/tests/t_stationtest_parser.py::TestStationTestsParser::test_all_test_dict_parsing", - "monitoringdb/tests/t_stationtest_parser.py::TestStationTestsParser::test_component_to_dict_parsing", - "monitoringdb/tests/t_stationtest_parser.py::TestStationTestsParser::test_parsing_one_test" -] \ No newline at end of file diff --git a/LCU/Maintenance/DBInterface/monitoringdb/rtsm_test_raw_parser.py b/LCU/Maintenance/DBInterface/monitoringdb/rtsm_test_raw_parser.py index 4bbfb9be48b..132b355b3a7 100644 --- a/LCU/Maintenance/DBInterface/monitoringdb/rtsm_test_raw_parser.py +++ b/LCU/Maintenance/DBInterface/monitoringdb/rtsm_test_raw_parser.py @@ -26,6 +26,11 @@ def parse_data(date_time): def preparse_rtsm_test_file(content): + """ + Parse the content of the RTSM output into a dict representation + :param content: + :return: + """ results = [] result = dict() observation = dict() diff --git a/LCU/Maintenance/DBInterface/monitoringdb/station_test_raw_parser.py b/LCU/Maintenance/DBInterface/monitoringdb/station_test_raw_parser.py index b6be6c0f921..d815692faba 100644 --- a/LCU/Maintenance/DBInterface/monitoringdb/station_test_raw_parser.py +++ b/LCU/Maintenance/DBInterface/monitoringdb/station_test_raw_parser.py @@ -147,11 +147,9 @@ def dict_from_tbb_component_error(content): def dict_from_hba_component_error(content): - component_type = content[1] error_type = content[3] extra_args = content[4:] result = dict(tile_errors=[]) - resourcetype = 'HBAComponentError' translate = dict(x='signalX', y='signalY', xoff='signalX_offset', yoff='signalY_offset', xmean='mean_signalX', ymean='mean_signalY', proc='percentage', val='value', diff='fluctuation', ref='limit') @@ -435,6 +433,11 @@ def dict_from_raw_station_test(content): def dicts_from_tile_error(contents): + """ + Parses the content into a dict that represents the tile error's data + :param contents: + :return: + """ results = list() key_pattern = "([^XY0-9]{0,3})([X,Y]{0,1})([0-9]{1,3})" for tile_error in contents: diff --git a/LCU/Maintenance/DBInterface/monitoringdb/tests/.pytest_cache/v/cache/lastfailed b/LCU/Maintenance/DBInterface/monitoringdb/tests/.pytest_cache/v/cache/lastfailed deleted file mode 100644 index b9292b8c188..00000000000 --- a/LCU/Maintenance/DBInterface/monitoringdb/tests/.pytest_cache/v/cache/lastfailed +++ /dev/null @@ -1,4 +0,0 @@ -{ - "t_stationtest_parser.py": true, - "t_stationtest_parser.py::TestStationTestsParser::()::test_parsing_one_test": true -} \ No newline at end of file diff --git a/LCU/Maintenance/DBInterface/monitoringdb/tests/.pytest_cache/v/cache/nodeids b/LCU/Maintenance/DBInterface/monitoringdb/tests/.pytest_cache/v/cache/nodeids deleted file mode 100644 index e97b780eb13..00000000000 --- a/LCU/Maintenance/DBInterface/monitoringdb/tests/.pytest_cache/v/cache/nodeids +++ /dev/null @@ -1,3 +0,0 @@ -[ - "t_stationtest_parser.py::TestStationTestsParser::()::test_parsing_one_test" -] \ No newline at end of file -- GitLab