pysiral.scripts._argparse_actions ================================= .. py:module:: pysiral.scripts._argparse_actions Attributes ---------- .. autoapisummary:: pysiral.scripts._argparse_actions.__author__ Functions --------- .. autoapisummary:: pysiral.scripts._argparse_actions.required_length pysiral.scripts._argparse_actions.is_valid_date pysiral.scripts._argparse_actions.period_conversion pysiral.scripts._argparse_actions.pysiral_settings_action Module Contents --------------- .. py:data:: __author__ :value: 'Stefan Hendricks ' .. py:function:: required_length(nmin: int, nmax: int) -> Type[argparse.Action] argparse action that defines the required number of arguments for an argument with nargs `+` or `*`. The action will raise an error if the number of arguments is not within the specified range. :param nmin: minimum number of arguments required :param nmax: maximum number of arguments allowed :return: a subclass of `argparse.Action` that checks the number of arguments .. py:function:: is_valid_date(date_str: str) -> bool Check if a date string is valid in the format YYYY-MM[-DD]. :param date_str: The string to check, e.g. "2020-01" or "2020-01-15". :return: Boolean indicating whether the date string is valid. .. py:function:: period_conversion() -> Type[argparse.Action] Argparse action to convert a list of datetime objects into a start and end time coverage. :return: argparse.Action subclass .. py:function:: pysiral_settings_action(target: Literal['proc', 'output'], level: Union[pysiral.core.flags.PysiralProcessingLevels, pysiral.core.flags.ProductProcessingLevels] = None) -> Type[argparse.Action]