disdrodb.issue package#
Submodules#
disdrodb.issue.checks module#
Checks for issue YAML files.
- disdrodb.issue.checks.check_issue_compliance(data_source, campaign_name, station_name, metadata_archive_dir=None)[source][source]#
Check DISDRODB issue compliance.
- disdrodb.issue.checks.check_issue_dict(issue_dict)[source][source]#
Check validity of the issue dictionary.
disdrodb.issue.reader module#
Issue YAML File Reader.
- class disdrodb.issue.reader.NoDatesSafeLoader(stream)[source][source]#
Bases:
SafeLoaderA YAML loader that does not parse dates.
Initialize the scanner.
- disdrodb.issue.reader.read_station_issue(data_source, campaign_name, station_name, metadata_archive_dir=None)[source][source]#
Open the station issue YAML file into a dictionary.
- Parameters:
data_source (str) – The name of the institution (for campaigns spanning multiple countries) or the name of the country (for campaigns or sensor networks within a single country). Must be provided in UPPER CASE.
campaign_name (str) – The name of the campaign. Must be provided in UPPER CASE.
station_name (str) – The name of the station.
data_archive_dir (str, optional) – The base directory of DISDRODB, expected in the format
<...>/DISDRODB. If not specified, thedata_archive_dirpath specified in the DISDRODB active configuration will be used.
- Returns:
issue_dict – The station issue dictionary
- Return type:
dictionary
disdrodb.issue.writer module#
Issue YAML File Writer.
- disdrodb.issue.writer.create_station_issue(data_source, campaign_name, station_name, metadata_archive_dir=None)[source][source]#
Write an empty YAML issue YAML file for a DISDRODB station.
An error is raised if the file already exists !
- Parameters:
data_source (str) – The name of the institution (for campaigns spanning multiple countries) or the name of the country (for campaigns or sensor networks within a single country). Must be provided in UPPER CASE.
campaign_name (str) – The name of the campaign. Must be provided in UPPER CASE.
station_name (str) – The name of the station.
data_archive_dir (str, optional) – The base directory of DISDRODB, expected in the format
<...>/DISDRODB. If not specified, thedata_archive_dirpath specified in the DISDRODB active configuration will be used.
Module contents#
DISDRODB issue files module.
- disdrodb.issue.read_station_issue(data_source, campaign_name, station_name, metadata_archive_dir=None)[source][source]#
Open the station issue YAML file into a dictionary.
- Parameters:
data_source (str) – The name of the institution (for campaigns spanning multiple countries) or the name of the country (for campaigns or sensor networks within a single country). Must be provided in UPPER CASE.
campaign_name (str) – The name of the campaign. Must be provided in UPPER CASE.
station_name (str) – The name of the station.
data_archive_dir (str, optional) – The base directory of DISDRODB, expected in the format
<...>/DISDRODB. If not specified, thedata_archive_dirpath specified in the DISDRODB active configuration will be used.
- Returns:
issue_dict – The station issue dictionary
- Return type:
dictionary