diff --git a/README.md b/README.md index c4b6e94..10fd93f 100644 --- a/README.md +++ b/README.md @@ -66,10 +66,10 @@ WORKSPACE=dev RECORD_SKIP_LIST= # Sets the interval for logging status updates as records are written to the output file. Defaults to 1000, which will log a status update for every thousandth record. -STATUS_UPDATE_INTERVAL = 1000 +STATUS_UPDATE_INTERVAL=1000 -# If set to a valid Sentry DSN, enables Sentry exception monitoring This is not needed for local development. -SENTRY_DSN = +# If set to a valid Sentry DSN, enables Sentry exception monitoring. This can also be set to 'none'. +SENTRY_DSN= ``` ## CLI commands diff --git a/harvester/config.py b/harvester/config.py index 1af6a1f..6b21bb2 100644 --- a/harvester/config.py +++ b/harvester/config.py @@ -14,8 +14,8 @@ class Config: - REQUIRED_ENV_VARS = ("WORKSPACE", "SENTRY_DSN") - OPTIONAL_ENV_VARS = ("RECORD_SKIP_LIST", "STATUS_UPDATE_INTERVAL") + REQUIRED_ENV_VARS = ("WORKSPACE",) + OPTIONAL_ENV_VARS = ("RECORD_SKIP_LIST", "SENTRY_DSN", "STATUS_UPDATE_INTERVAL") def __init__(self, logger: logging.Logger | None = None): """Set root logger as default when creating class instance.""" diff --git a/tests/test_config.py b/tests/test_config.py index e6e7060..52e577f 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -51,14 +51,6 @@ def test_config_check_required_env_vars_success(config): config.check_required_env_vars() -def test_config_check_required_env_vars_error(config, monkeypatch): - monkeypatch.delenv("SENTRY_DSN") - with pytest.raises( - OSError, match="Missing required environment variables: SENTRY_DSN" - ): - config.check_required_env_vars() - - def test_config_env_var_access_success(config): assert config.STATUS_UPDATE_INTERVAL == "1000"