From 6a93520873c16262e0930464dcbddd22e617c3b1 Mon Sep 17 00:00:00 2001 From: Cortland Goffena <30168413+cmgoffena13@users.noreply.github.com> Date: Sat, 29 Aug 2026 23:32:07 -0600 Subject: [PATCH 1/2] fix(web): adjusting paths to fix windows Signed-off-by: Cortland Goffena <30168413+cmgoffena13@users.noreply.github.com> --- tests/web/test_main.py | 28 +++++++++++++++++++++++++++- web/server/api/endpoints/files.py | 4 ++-- web/server/watcher.py | 6 +++--- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/tests/web/test_main.py b/tests/web/test_main.py index b20947c49d..a6323e133a 100644 --- a/tests/web/test_main.py +++ b/tests/web/test_main.py @@ -1,7 +1,7 @@ from __future__ import annotations import threading -from pathlib import Path +from pathlib import Path, PureWindowsPath import pyarrow as pa # type: ignore import pytest @@ -75,6 +75,32 @@ def test_get_file(client: TestClient, project_tmp_path: Path) -> None: } +def test_get_file_nested_path_matches_directory_listing( + client: TestClient, project_tmp_path: Path +) -> None: + models_dir = project_tmp_path / "models" + models_dir.mkdir() + (models_dir / "mymodel.sql").write_text("SELECT 1") + + response = client.get("/api/files/models/mymodel.sql") + assert response.status_code == 200 + assert response.json()["path"] == "models/mymodel.sql" + + +def test_get_file_relative_path_uses_posix_separators(tmp_path: Path) -> None: + file_path = tmp_path / "models" / "mymodel.sql" + file_path.parent.mkdir(parents=True) + file_path.write_text("SELECT 1") + + windows_relative = PureWindowsPath("models/mymodel.sql") + assert windows_relative.as_posix() == "models/mymodel.sql" + assert str(windows_relative) == "models\\mymodel.sql" + + file = _get_file_with_content(file_path, windows_relative.as_posix()) + assert file.path == "models/mymodel.sql" + assert file.path != str(windows_relative) + + def test_get_file_not_found(client: TestClient) -> None: response = client.get("/api/files/not_found.txt") assert response.status_code == 404 diff --git a/web/server/api/endpoints/files.py b/web/server/api/endpoints/files.py index db58fce55e..5be9032c6a 100644 --- a/web/server/api/endpoints/files.py +++ b/web/server/api/endpoints/files.py @@ -37,7 +37,7 @@ def get_file( """Get a file, including its contents.""" try: file_path = Path(path) - file = _get_file_with_content(settings.project_path / file_path, str(file_path)) + file = _get_file_with_content(settings.project_path / file_path, file_path.as_posix()) except FileNotFoundError: raise HTTPException(status_code=HTTP_404_NOT_FOUND) @@ -155,7 +155,7 @@ def walk_path( return sorted(directories, key=lambda x: x.name), sorted(files, key=lambda x: x.name) directories, files = walk_path(path) - relative_path = str(Path(path).relative_to(settings.project_path)) + relative_path = Path(path).relative_to(settings.project_path).as_posix() return models.Directory( name=os.path.basename(path), diff --git a/web/server/watcher.py b/web/server/watcher.py index 8bc87c8719..696d7dfd96 100644 --- a/web/server/watcher.py +++ b/web/server/watcher.py @@ -55,7 +55,7 @@ async def watch_project() -> None: changes.append( models.ArtifactChange( change=Change.deleted, - path=str(relative_path), + path=relative_path.as_posix(), ) ) elif change == Change.added: @@ -69,9 +69,9 @@ async def watch_project() -> None: models.ArtifactChange( type=models.ArtifactType.file, change=change, - path=str(relative_path), + path=relative_path.as_posix(), file=_get_file_with_content( - settings.project_path / relative_path, str(relative_path) + settings.project_path / relative_path, relative_path.as_posix() ), ) ) From d97076ce83070619feddd2457da3cdae27469471 Mon Sep 17 00:00:00 2001 From: Cortland Goffena <30168413+cmgoffena13@users.noreply.github.com> Date: Sun, 30 Aug 2026 13:18:46 -0600 Subject: [PATCH 2/2] chore(docs): updating engine lists Signed-off-by: Cortland Goffena <30168413+cmgoffena13@users.noreply.github.com> --- docs/concepts/models/overview.md | 1 + docs/guides/configuration.md | 7 +++++-- docs/guides/connections.md | 7 ++++++- docs/installation.md | 3 +++ docs/quickstart/cli.md | 2 ++ docs/reference/configuration.md | 6 +++++- 6 files changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/concepts/models/overview.md b/docs/concepts/models/overview.md index e37be3822a..1fd16a96fc 100644 --- a/docs/concepts/models/overview.md +++ b/docs/concepts/models/overview.md @@ -190,6 +190,7 @@ This table lists each engine's support for `TABLE` and `VIEW` object comments: | Redshift | Y | N | | Snowflake | Y | Y | | Spark | Y | Y | +| StarRocks | Y | Y | | Trino | Y | Y | diff --git a/docs/guides/configuration.md b/docs/guides/configuration.md index 41f4b05594..38f6814c8b 100644 --- a/docs/guides/configuration.md +++ b/docs/guides/configuration.md @@ -929,19 +929,22 @@ Example snowflake connection configuration: These pages describe the connection configuration options for each execution engine. * [Athena](../integrations/engines/athena.md) +* [Azure SQL](../integrations/engines/azuresql.md) * [BigQuery](../integrations/engines/bigquery.md) +* [ClickHouse](../integrations/engines/clickhouse.md) * [Databricks](../integrations/engines/databricks.md) * [DuckDB](../integrations/engines/duckdb.md) * [Fabric](../integrations/engines/fabric.md) * [MotherDuck](../integrations/engines/motherduck.md) -* [MySQL](../integrations/engines/mysql.md) * [MSSQL](../integrations/engines/mssql.md) +* [MySQL](../integrations/engines/mysql.md) * [Postgres](../integrations/engines/postgres.md) * [GCP Postgres](../integrations/engines/gcp-postgres.md) * [Redshift](../integrations/engines/redshift.md) +* [RisingWave](../integrations/engines/risingwave.md) * [Snowflake](../integrations/engines/snowflake.md) -* [StarRocks](../integrations/engines/starrocks.md) * [Spark](../integrations/engines/spark.md) +* [StarRocks](../integrations/engines/starrocks.md) * [Trino](../integrations/engines/trino.md) #### State connection diff --git a/docs/guides/connections.md b/docs/guides/connections.md index bc763f3f5a..5af44c5dac 100644 --- a/docs/guides/connections.md +++ b/docs/guides/connections.md @@ -79,15 +79,20 @@ default_gateway: local_db ## Supported engines +* [Athena](../integrations/engines/athena.md) +* [Azure SQL](../integrations/engines/azuresql.md) * [BigQuery](../integrations/engines/bigquery.md) +* [ClickHouse](../integrations/engines/clickhouse.md) * [Databricks](../integrations/engines/databricks.md) * [DuckDB](../integrations/engines/duckdb.md) +* [Fabric](../integrations/engines/fabric.md) * [MotherDuck](../integrations/engines/motherduck.md) -* [MySQL](../integrations/engines/mysql.md) * [MSSQL](../integrations/engines/mssql.md) +* [MySQL](../integrations/engines/mysql.md) * [Postgres](../integrations/engines/postgres.md) * [GCP Postgres](../integrations/engines/gcp-postgres.md) * [Redshift](../integrations/engines/redshift.md) +* [RisingWave](../integrations/engines/risingwave.md) * [Snowflake](../integrations/engines/snowflake.md) * [Spark](../integrations/engines/spark.md) * [StarRocks](../integrations/engines/starrocks.md) diff --git a/docs/installation.md b/docs/installation.md index f12ec566e2..6bcac928e5 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -54,13 +54,16 @@ Other extras are required to use specific SQL engines, like Bigquery or Postgres | Bigquery | `pip install "sqlmesh[bigquery]"` | | ClickHouse | `pip install "sqlmesh[clickhouse]"` | | Databricks | `pip install "sqlmesh[databricks]"` | + | Fabric | `pip install "sqlmesh[fabric]"` | | GCP Postgres | `pip install "sqlmesh[gcppostgres]"` | | MS SQL Server | `pip install "sqlmesh[mssql]"` | + | MotherDuck | `pip install "sqlmesh[motherduck]"` | | MySQL | `pip install "sqlmesh[mysql]"` | | Postgres | `pip install "sqlmesh[postgres]"` | | Redshift | `pip install "sqlmesh[redshift]"` | | RisingWave | `pip install "sqlmesh[risingwave]"` | | Snowflake | `pip install "sqlmesh[snowflake]"` | + | StarRocks | `pip install "sqlmesh[starrocks]"` | | Trino | `pip install "sqlmesh[trino]"` | Multiple extras can be installed at once, as in `pip install "sqlmesh[github,slack]"`. diff --git a/docs/quickstart/cli.md b/docs/quickstart/cli.md index a592847470..6aa4fc34ed 100644 --- a/docs/quickstart/cli.md +++ b/docs/quickstart/cli.md @@ -116,6 +116,8 @@ Choose your SQL engine: [14] MySQL [15] Athena [16] RisingWave + [17] Fabric + [18] StarRocks Enter a number: 1 ``` diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index a1bf400c32..ae036a7774 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md @@ -218,18 +218,22 @@ Most parameters are specific to the connection engine `type` - see [below](#engi These pages describe the connection configuration options for each execution engine. * [Athena](../integrations/engines/athena.md) +* [Azure SQL](../integrations/engines/azuresql.md) * [BigQuery](../integrations/engines/bigquery.md) * [ClickHouse](../integrations/engines/clickhouse.md) * [Databricks](../integrations/engines/databricks.md) * [DuckDB](../integrations/engines/duckdb.md) +* [Fabric](../integrations/engines/fabric.md) * [MotherDuck](../integrations/engines/motherduck.md) -* [MySQL](../integrations/engines/mysql.md) * [MSSQL](../integrations/engines/mssql.md) +* [MySQL](../integrations/engines/mysql.md) * [Postgres](../integrations/engines/postgres.md) * [GCP Postgres](../integrations/engines/gcp-postgres.md) * [Redshift](../integrations/engines/redshift.md) +* [RisingWave](../integrations/engines/risingwave.md) * [Snowflake](../integrations/engines/snowflake.md) * [Spark](../integrations/engines/spark.md) +* [StarRocks](../integrations/engines/starrocks.md) * [Trino](../integrations/engines/trino.md) ### Scheduler