Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 6 additions & 18 deletions src/vortex/nwp/data/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
certain parameters combinations.
"""

import configparser

from bronx.fancies import loggers
from bronx.stdtypes.date import Time
from vortex.data.providers import Provider
from vortex.syntax.stdattrs import DelayedEnvValue, Namespace, namespacefp
from vortex.util.config import GenericConfigParser
from vortex.config import from_config

#: No automatic export
__all__ = []
Expand Down Expand Up @@ -118,20 +120,6 @@ class BdpeProvider(Provider):
type=int,
default=3,
),
config=dict(
info="A ready to use configuration file object for this storage place.",
type=GenericConfigParser,
optional=True,
default=None,
),
inifile=dict(
info=(
"The name of the configuration file that will be used (if "
+ "**config** is not provided."
),
optional=True,
default="@bdpe-map-resources.ini",
),
),
fastkeys={"bdpeid"},
),
Expand All @@ -140,9 +128,9 @@ class BdpeProvider(Provider):
def __init__(self, *args, **kw):
logger.debug("BDPE provider init %s", self.__class__)
super().__init__(*args, **kw)
self._actual_config = self.config
if self._actual_config is None:
self._actual_config = GenericConfigParser(inifile=self.inifile)
inifile = from_config(section="bdpe", key="map_resources")
self._actual_config = configparser.ConfigParser()
self._actual_config.read(inifile)

@property
def realkind(self):
Expand Down
Loading