Skip to content

Commit a01a455

Browse files
authored
Chore: put connection config link in a separate line (#3760)
1 parent 2cc96c7 commit a01a455

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

sqlmesh/cli/example_project.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def _gen_config(
3232
connection_settings = """ type: duckdb
3333
database: db.db"""
3434

35-
doc_link = "# Visit https://sqlmesh.readthedocs.io/en/stable/integrations/engines{engine_link} for more information on configuring the connection to your execution engine."
35+
doc_link = "https://sqlmesh.readthedocs.io/en/stable/integrations/engines{engine_link}"
3636
engine_link = ""
3737

3838
engine = "mssql" if dialect == "tsql" else dialect
@@ -65,7 +65,9 @@ def _gen_config(
6565
engine_link = f"/{engine}/#connection-options"
6666

6767
connection_settings = (
68-
f" {doc_link.format(engine_link=engine_link)}\n{connection_settings}"
68+
" # For more information on configuring the connection to your execution engine, visit:\n"
69+
" # https://sqlmesh.readthedocs.io/en/stable/reference/configuration/#connections\n"
70+
f" # {doc_link.format(engine_link=engine_link)}\n{connection_settings}"
6971
)
7072
else:
7173
connection_settings = settings

tests/cli/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ def test_init_project_dialects(runner, tmp_path):
962962
for dialect, expected_config in dialect_to_config.items():
963963
init_example_project(tmp_path, dialect=dialect)
964964

965-
config_start = f"gateways:\n dev:\n connection:\n # Visit https://sqlmesh.readthedocs.io/en/stable/integrations/engines/{dialect}/#connection-options for more information on configuring the connection to your execution engine.\n type: {dialect}\n "
965+
config_start = f"gateways:\n dev:\n connection:\n # For more information on configuring the connection to your execution engine, visit:\n # https://sqlmesh.readthedocs.io/en/stable/reference/configuration/#connections\n # https://sqlmesh.readthedocs.io/en/stable/integrations/engines/{dialect}/#connection-options\n type: {dialect}\n "
966966
config_end = f"\n\n\ndefault_gateway: dev\n\nmodel_defaults:\n dialect: {dialect}\n start: {yesterday_ds()}\n"
967967

968968
with open(tmp_path / "config.yaml") as file:

0 commit comments

Comments
 (0)