From c2b7f2682cfdda542f7e8a1a7cacacdbc1259595 Mon Sep 17 00:00:00 2001 From: Sondre Sortland Date: Fri, 27 Oct 2023 08:05:48 +0200 Subject: [PATCH] Remove unused functions --- src/ert/gui/tools/plot/plot_api.py | 31 ------------------------------ 1 file changed, 31 deletions(-) diff --git a/src/ert/gui/tools/plot/plot_api.py b/src/ert/gui/tools/plot/plot_api.py index af9d01064ae..dc9aeaff729 100644 --- a/src/ert/gui/tools/plot/plot_api.py +++ b/src/ert/gui/tools/plot/plot_api.py @@ -1,15 +1,9 @@ -import io import logging from itertools import combinations as combi -from json.decoder import JSONDecodeError from typing import List, Optional -import httpx import pandas as pd -import requests -from pandas.errors import ParserError -from ert.services import StorageService from ert.storage import StorageReader logger = logging.getLogger(__name__) @@ -47,31 +41,6 @@ def _get_all_cases(self) -> List[dict]: ) return self._all_cases - @staticmethod - def _check_response(response: requests.Response): - if response.status_code != httpx.codes.OK: - raise httpx.RequestError( - f" Please report this error and try restarting the application." - f"{response.text} from url: {response.url}." - ) - - def _get_experiments(self) -> dict: - with StorageService.session() as client: - response: requests.Response = client.get( - "/experiments", timeout=self._timeout - ) - self._check_response(response) - return response.json() - - def _get_ensembles(self, experiement_id) -> List: - with StorageService.session() as client: - response: requests.Response = client.get( - f"/experiments/{experiement_id}/ensembles", timeout=self._timeout - ) - self._check_response(response) - response_json = response.json() - return response_json - def all_data_type_keys(self) -> List: """Returns a list of all the keys except observation keys.