fdl-cli 0.18.0__tar.gz → 0.18.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/CHANGELOG.md +12 -0
  2. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/PKG-INFO +1 -1
  3. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/pyproject.toml +1 -1
  4. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/src/fdl/catalog.py +9 -2
  5. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/src/fdl/cli.py +1 -0
  6. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/src/fdl/repo.py +7 -1
  7. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/tests/test_http.py +23 -0
  8. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/.github/workflows/docs.yml +0 -0
  9. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/.github/workflows/publish.yml +0 -0
  10. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/.github/workflows/release.yml +0 -0
  11. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/.gitignore +0 -0
  12. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/.node-version +0 -0
  13. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/.python-version +0 -0
  14. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/CLAUDE.md +0 -0
  15. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/CONTRIBUTING.md +0 -0
  16. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/LICENSE +0 -0
  17. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/README.md +0 -0
  18. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/blume.config.ts +0 -0
  19. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/concepts/meta.ts +0 -0
  20. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/concepts/repositories.md +0 -0
  21. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/concepts/versions-and-refs.md +0 -0
  22. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/concepts/working-catalogs.md +0 -0
  23. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/getting-started.md +0 -0
  24. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/guides/building-a-host.md +0 -0
  25. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/guides/meta.ts +0 -0
  26. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/guides/mirrors.md +0 -0
  27. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/guides/public-and-private.md +0 -0
  28. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/guides/reading-without-duckdb.md +0 -0
  29. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/guides/serving-over-http.md +0 -0
  30. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/guides/stores.md +0 -0
  31. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/index.md +0 -0
  32. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/internals/ducklake-formats.md +0 -0
  33. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/internals/inside-a-repository.md +0 -0
  34. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/internals/meta.ts +0 -0
  35. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/concepts/meta.ts +0 -0
  36. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/concepts/repositories.md +0 -0
  37. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/concepts/versions-and-refs.md +0 -0
  38. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/concepts/working-catalogs.md +0 -0
  39. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/getting-started.md +0 -0
  40. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/guides/building-a-host.md +0 -0
  41. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/guides/meta.ts +0 -0
  42. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/guides/mirrors.md +0 -0
  43. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/guides/public-and-private.md +0 -0
  44. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/guides/reading-without-duckdb.md +0 -0
  45. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/guides/serving-over-http.md +0 -0
  46. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/guides/stores.md +0 -0
  47. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/index.md +0 -0
  48. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/internals/ducklake-formats.md +0 -0
  49. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/internals/inside-a-repository.md +0 -0
  50. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/internals/meta.ts +0 -0
  51. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/reference/cli.md +0 -0
  52. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/reference/meta.ts +0 -0
  53. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/reference/python.md +0 -0
  54. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/spec/data-files.md +0 -0
  55. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/spec/http.md +0 -0
  56. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/spec/index.md +0 -0
  57. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/spec/layout.md +0 -0
  58. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/spec/meta.ts +0 -0
  59. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/spec/reading.md +0 -0
  60. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/spec/refs.md +0 -0
  61. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/spec/versions.md +0 -0
  62. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/ja/spec/writing.md +0 -0
  63. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/reference/cli.md +0 -0
  64. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/reference/meta.ts +0 -0
  65. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/reference/python.md +0 -0
  66. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/spec/data-files.md +0 -0
  67. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/spec/http.md +0 -0
  68. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/spec/index.md +0 -0
  69. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/spec/layout.md +0 -0
  70. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/spec/meta.ts +0 -0
  71. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/spec/reading.md +0 -0
  72. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/spec/refs.md +0 -0
  73. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/spec/versions.md +0 -0
  74. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/docs/spec/writing.md +0 -0
  75. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/package-lock.json +0 -0
  76. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/package.json +0 -0
  77. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/public/CNAME +0 -0
  78. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/src/fdl/__init__.py +0 -0
  79. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/src/fdl/dataset.py +0 -0
  80. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/src/fdl/layout.py +0 -0
  81. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/src/fdl/py.typed +0 -0
  82. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/src/fdl/refs.py +0 -0
  83. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/src/fdl/store.py +0 -0
  84. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/src/fdl/stores.py +0 -0
  85. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/src/fdl/version.py +0 -0
  86. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/tests/http_repo.py +0 -0
  87. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/tests/test_cli.py +0 -0
  88. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/tests/test_dataset.py +0 -0
  89. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/tests/test_repo.py +0 -0
  90. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/tests/test_stores.py +0 -0
  91. {fdl_cli-0.18.0 → fdl_cli-0.18.1}/uv.lock +0 -0
@@ -1,6 +1,18 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v0.18.1 (2026-11-03)
5
+
6
+ ### Bug Fixes
7
+
8
+ - Compare a rebuild over HTTP with the new files where they were written
9
+ ([`c0f091a`](https://github.com/queria-io/fdl/commit/c0f091a76831b58afa91be16643e3b08ae9ae2c1))
10
+
11
+ A working catalog of a repository over HTTP writes new data files to a local folder, but comparing
12
+ with the parent read them under the repository's URL. The read failed (404), the commit fell back
13
+ to making a version, and every rebuild made one even when nothing changed.
14
+
15
+
4
16
  ## v0.18.0 (2026-11-03)
5
17
 
6
18
  ### Bug Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: fdl-cli
3
- Version: 0.18.0
3
+ Version: 0.18.1
4
4
  Summary: Versions of a DuckLake catalog on object storage, kept the way Git keeps commits
5
5
  Project-URL: Homepage, https://fdl.flo8s.com/
6
6
  Project-URL: Documentation, https://fdl.flo8s.com/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fdl-cli"
3
- version = "0.18.0"
3
+ version = "0.18.1"
4
4
  description = "Versions of a DuckLake catalog on object storage, kept the way Git keeps commits"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -659,9 +659,13 @@ def last_snapshot(working: Path) -> int:
659
659
  con.close()
660
660
 
661
661
 
662
- def same_contents(working: Path, since: int) -> bool:
662
+ def same_contents(working: Path, since: int, *, data_path: str | None = None) -> bool:
663
663
  """Whether the working catalog's last snapshot holds what snapshot ``since`` held.
664
664
 
665
+ ``data_path`` is where the working catalog's new data files are, when not
666
+ where it records (a working catalog of a repository over HTTP writes them
667
+ to a folder on this machine).
668
+
665
669
  The same tables and views, each table with the same columns and the same
666
670
  rows, in any order. A table rebuilt from the same input is written to new
667
671
  files, so files are compared first and rows only where the files differ.
@@ -677,7 +681,10 @@ def same_contents(working: Path, since: int) -> bool:
677
681
  con = duckdb.connect()
678
682
  try:
679
683
  for statement in attach_sql(
680
- working, alias="lake", data_path=_working_data_path(working), read_only=True
684
+ working,
685
+ alias="lake",
686
+ data_path=data_path or _working_data_path(working),
687
+ read_only=True,
681
688
  ):
682
689
  if statement:
683
690
  con.execute(statement)
@@ -127,6 +127,7 @@ def commit(
127
127
  message=message,
128
128
  dataset=declared,
129
129
  allow_empty=allow_empty,
130
+ working_data=Path(state["data"]).resolve().as_posix() + "/" if state.get("data") else None,
130
131
  )
131
132
 
132
133
  try:
@@ -121,6 +121,7 @@ def commit(
121
121
  annotations: dict | None = None,
122
122
  dataset: dict | None = None,
123
123
  allow_empty: bool = True,
124
+ working_data: str | None = None,
124
125
  ) -> Version:
125
126
  """Freeze the working catalog into a version under ``out_dir/<ID>/``.
126
127
 
@@ -136,6 +137,9 @@ def commit(
136
137
  data_dir), written into the frozen catalog. Every file reference must be
137
138
  relative to it, or the version would point readers at the writer's disk.
138
139
  Nothing is uploaded: that is `push`.
140
+
141
+ ``working_data`` is where the working catalog wrote its new data files,
142
+ when not where it records (see `checkout`): comparing reads them there.
139
143
  """
140
144
  Path(out_dir).mkdir(parents=True, exist_ok=True)
141
145
  frozen = Path(out_dir) / f".freezing-{new_id()}.duckdb"
@@ -154,7 +158,9 @@ def commit(
154
158
  # the contents can read every row of a rebuilt table.
155
159
  if not allow_empty and parent is not None and _same_description(frozen, dataset, parent):
156
160
  try:
157
- unchanged = catalog.same_contents(working, parent.ducklake.snapshot_id)
161
+ unchanged = catalog.same_contents(
162
+ working, parent.ducklake.snapshot_id, data_path=working_data
163
+ )
158
164
  except catalog.CatalogError as exc:
159
165
  raise CannotCompare(str(exc)) from exc
160
166
  if unchanged:
@@ -157,3 +157,26 @@ def test_a_file_the_host_will_not_sign_goes_through_the_host(tmp_path: Path) ->
157
157
  assert local.get("data/small.parquet") == b"ab" and local.get("data/large.parquet") == b"abcdef"
158
158
  puts = [key for method, key in server.requests if method == "PUT"]
159
159
  assert puts == ["storage/data/small.parquet", "data/large.parquet"]
160
+
161
+
162
+ def test_a_rebuild_of_the_same_rows_over_http_is_nothing_to_commit(served, tmp_path: Path) -> None:
163
+ local, url, _ = served
164
+ working = tmp_path / "work" / "lake.sqlite"
165
+ run("checkout", url, working)
166
+ write(working, "CREATE SCHEMA lake.s; CREATE TABLE lake.s.towns AS SELECT 1 AS id")
167
+ run("commit", working, "-m", "first", "--author", "tester")
168
+ # The way dbt rebuilds a table: a new table beside it, then renames.
169
+ again = tmp_path / "again" / "lake.sqlite"
170
+ run("checkout", url, again)
171
+ write(
172
+ again,
173
+ "CREATE TABLE lake.s.towns__dbt_tmp AS SELECT 1 AS id; "
174
+ "ALTER TABLE lake.s.towns RENAME TO towns__dbt_backup; "
175
+ "ALTER TABLE lake.s.towns__dbt_tmp RENAME TO towns; DROP TABLE lake.s.towns__dbt_backup",
176
+ )
177
+ working = again
178
+ result = runner.invoke(app, ["commit", str(working), "-m", "again", "--author", "tester"])
179
+ assert result.exit_code == 0, result.output
180
+ assert "Nothing to commit" in result.output
181
+ assert "could not tell" not in result.output
182
+ assert len(list(repo.log(local))) == 1
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes