Skip to content

Commit fe7d221

Browse files
authored
Fix!: Automatically categorize python models by default (#3594)
1 parent f1a2bb0 commit fe7d221

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

docs/guides/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ With the example configuration above, SQLMesh would evaluate environment names a
334334

335335
SQLMesh compares the current state of project files to an environment when `sqlmesh plan` is run. It detects changes to models, which can be classified as breaking or non-breaking.
336336

337-
SQLMesh can attempt to automatically [categorize](../concepts/plans.md#change-categories) the changes it detects. The `plan.auto_categorize_changes` option determines whether SQLMesh should attempt automatic change categorization. This option is in the [environments](../reference/configuration.md#environments) section of the configuration reference page.
337+
SQLMesh can attempt to automatically [categorize](../concepts/plans.md#change-categories) the changes it detects. The `plan.auto_categorize_changes` option determines whether SQLMesh should attempt automatic change categorization. This option is in the [plan](../reference/configuration.md#plan) section of the configuration reference page.
338338

339339
Supported values:
340340

examples/sushi/config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@
5858
test_config = Config(
5959
gateways={"in_memory": GatewayConfig(connection=DuckDBConnectionConfig())},
6060
default_gateway="in_memory",
61-
plan=PlanConfig(auto_categorize_changes=CategorizerConfig(sql=AutoCategorizationMode.SEMI)),
61+
plan=PlanConfig(
62+
auto_categorize_changes=CategorizerConfig(
63+
sql=AutoCategorizationMode.SEMI, python=AutoCategorizationMode.OFF
64+
)
65+
),
6266
model_defaults=model_defaults,
6367
)
6468

sqlmesh/core/config/categorizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class CategorizerConfig(BaseConfig):
2929
"""
3030

3131
external: AutoCategorizationMode = AutoCategorizationMode.FULL
32-
python: AutoCategorizationMode = AutoCategorizationMode.OFF
32+
python: AutoCategorizationMode = AutoCategorizationMode.FULL
3333
sql: AutoCategorizationMode = AutoCategorizationMode.FULL
3434
seed: AutoCategorizationMode = AutoCategorizationMode.FULL
3535

0 commit comments

Comments
 (0)