Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Rename setting activate_version to process_activate_version_messages #2805

Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
- id: check-github-workflows

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
rev: v0.8.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
- id: check-github-workflows

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
rev: v0.8.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
- id: check-github-workflows

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
rev: v0.8.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
2 changes: 1 addition & 1 deletion singer_sdk/helpers/capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@
description="The default target database schema name to use for all streams.",
),
).to_dict()
ACTIVATE_VERSION_CONFIG = PropertiesList(

Check warning on line 147 in singer_sdk/helpers/capabilities.py

View workflow job for this annotation

GitHub Actions / Check API Changes

ACTIVATE_VERSION_CONFIG

Attribute value was changed: `PropertiesList(Property('activate_version', BooleanType, default=True, title='Process `ACTIVATE_VERSION` messages', description='Whether to process `ACTIVATE_VERSION` messages.')).to_dict()` -> `PropertiesList(Property('process_activate_version_messages', BooleanType, default=True, title='Process `ACTIVATE_VERSION` messages', description='Whether to process `ACTIVATE_VERSION` messages.')).to_dict()`
Property(
"activate_version",
"process_activate_version_messages",
BooleanType,
default=True,
title="Process `ACTIVATE_VERSION` messages",
Expand Down
2 changes: 1 addition & 1 deletion singer_sdk/sinks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def process_activate_version_messages(self) -> bool:
Returns:
True if activate version messages should be processed.
"""
return self.config.get("activate_version", True)
return self.config.get("process_activate_version_messages", True)

@property
def datetime_error_treatment(self) -> DatetimeErrorTreatmentEnum:
Expand Down
7 changes: 6 additions & 1 deletion tests/samples/test_target_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ def sqlite_sample_target_hard_delete(sqlite_target_test_config):
@pytest.fixture
def sqlite_sample_target_no_activate_version(sqlite_target_test_config):
"""Get a sample target object with hard_delete disabled."""
return SQLiteTarget(config={**sqlite_target_test_config, "activate_version": False})
return SQLiteTarget(
config={
**sqlite_target_test_config,
"process_activate_version_messages": False,
}
)


@pytest.fixture
Expand Down
Loading