es_sfgtools.config.loadconfigs module

This module provides functions for loading survey-specific configurations.

It determines which filter settings and GARPOS parameters to use based on the type of survey being processed (e.g., CENTER, CIRCLE). It also provides helpers for loading settings from the environment.

es_sfgtools.config.loadconfigs.get_garpos_site_config(survey_type: SurveyType | str) GarposSiteConfig

Get the GARPOS site configuration based on the survey type.

Parameters:

survey_type – The type of the survey.

Returns:

The GARPOS site configuration for the survey type.

es_sfgtools.config.loadconfigs.get_survey_filter_config(survey_type: SurveyType | str) FilterConfig

Get the filter configuration based on the survey type.

Parameters:

survey_type – The type of the survey.

Returns:

The filter configuration for the survey type.

es_sfgtools.config.loadconfigs.load_s3_sync_bucket() str | None

Load and validate the S3 sync bucket from environment variables.

Returns:

The S3 sync bucket name, or None if not set.

Raises:

ValueError – If the S3_SYNC_BUCKET environment variable is not set or contains an invalid bucket name.

es_sfgtools.config.loadconfigs.load_working_environment() Tuple[WorkingEnvironment, str]

Load the current working environment from environment variables.

Returns:

A tuple containing the current WorkingEnvironment and the main directory for the GEOLAB environment (if applicable).