From aff6d5eef123762d7db7b7d1e5ebd1555c1940ec Mon Sep 17 00:00:00 2001 From: Lewis Blake Date: Mon, 7 Oct 2024 15:32:20 +0200 Subject: [PATCH] feedback --- pyaerocom/aeroval/collections.py | 3 ++- pyaerocom/aeroval/experiment_output.py | 2 +- pyaerocom/aeroval/obsentry.py | 3 ++- pyaerocom/aeroval/setup_classes.py | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pyaerocom/aeroval/collections.py b/pyaerocom/aeroval/collections.py index 482ade93c..96d442b28 100644 --- a/pyaerocom/aeroval/collections.py +++ b/pyaerocom/aeroval/collections.py @@ -11,8 +11,9 @@ class BaseCollection(BrowseDict, abc.ABC): #: maximum length of entry names MAXLEN_KEYS = 25 #: Invalid chars in entry names - FORBIDDEN_CHARS_KEYS = [] # "_" + FORBIDDEN_CHARS_KEYS = [] + # TODO: Wait a few release cycles after v0.23.0 and see if this can be removed def _check_entry_name(self, key): if any([x in key for x in self.FORBIDDEN_CHARS_KEYS]): raise EvalEntryNameError( diff --git a/pyaerocom/aeroval/experiment_output.py b/pyaerocom/aeroval/experiment_output.py index 0e827b495..1dd43f9a6 100644 --- a/pyaerocom/aeroval/experiment_output.py +++ b/pyaerocom/aeroval/experiment_output.py @@ -425,7 +425,7 @@ def _check_clean_ts_file(self, fp) -> bool: return True models_avail = list(data) - models_in_exp = self.cfg.model_cfg.web_interfaceface_names + models_in_exp = self.cfg.model_cfg.web_interface_names if all([mod in models_in_exp for mod in models_avail]): # nothing to clean up return False diff --git a/pyaerocom/aeroval/obsentry.py b/pyaerocom/aeroval/obsentry.py index cc43986eb..c879042f3 100644 --- a/pyaerocom/aeroval/obsentry.py +++ b/pyaerocom/aeroval/obsentry.py @@ -106,7 +106,7 @@ class ObsEntry(BaseModel): ## Optional attributes ###################### obs_ts_type_read: str | dict | None = None - obs_vert_type: Literal["Column", "Profile", "Surface"] = "Surface" + obs_vert_type: Literal["Column", "Profile", "Surface", "ModelLevel"] = "Surface" obs_aux_requires: dict[str, dict] = {} instr_vert_loc: str | None = None is_superobs: bool = False @@ -115,6 +115,7 @@ class ObsEntry(BaseModel): profile_layer_limits: tuple[LayerLimits, ...] | None = None web_interface_name: str | None = None diurnal_only: bool = False + obs_type: str | None = None read_opts_ungridded: dict = {} # attributes for reading colocated data files made outside of pyaerocom diff --git a/pyaerocom/aeroval/setup_classes.py b/pyaerocom/aeroval/setup_classes.py index aaddbc11a..1677c1b3e 100644 --- a/pyaerocom/aeroval/setup_classes.py +++ b/pyaerocom/aeroval/setup_classes.py @@ -9,6 +9,7 @@ import datetime from pyaerocom.aeroval.glob_defaults import VarWebInfo, VarWebScaleAndColormap +from pyaerocom.aeroval.obsentry import ObsEntry if sys.version_info >= (3, 11): from typing import Self @@ -528,7 +529,7 @@ def serialize_model_cfg(self, model_cfg: ModelCollection): ## Methods ########################### - def get_obs_entry(self, obs_name): + def get_obs_entry(self, obs_name) -> ObsEntry: """Returns ObsEntry instance for network obs_name""" return self.obs_cfg.get_entry(obs_name)