fdl-cli 0.24.1__tar.gz → 0.24.2__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 (109) hide show
  1. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/CHANGELOG.md +26 -0
  2. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/PKG-INFO +1 -1
  3. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/pyproject.toml +1 -1
  4. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/repo.py +6 -1
  5. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/stores.py +9 -1
  6. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_http.py +17 -0
  7. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_profiles.py +41 -0
  8. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/uv.lock +1 -1
  9. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.github/workflows/docs.yml +0 -0
  10. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.github/workflows/publish.yml +0 -0
  11. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.github/workflows/release.yml +0 -0
  12. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.github/workflows/test.yml +0 -0
  13. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.gitignore +0 -0
  14. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.node-version +0 -0
  15. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/.python-version +0 -0
  16. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/CLAUDE.md +0 -0
  17. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/CONTRIBUTING.md +0 -0
  18. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/LICENSE +0 -0
  19. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/README.md +0 -0
  20. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/SECURITY.md +0 -0
  21. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/blume.config.ts +0 -0
  22. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/cases/collection.json +0 -0
  23. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/concepts/meta.ts +0 -0
  24. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/concepts/repositories.md +0 -0
  25. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/concepts/versions-and-refs.md +0 -0
  26. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/concepts/working-catalogs.md +0 -0
  27. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/getting-started.md +0 -0
  28. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/building-a-host.md +0 -0
  29. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/meta.ts +0 -0
  30. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/mirrors.md +0 -0
  31. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/public-and-private.md +0 -0
  32. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/reading-without-duckdb.md +0 -0
  33. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/serving-over-http.md +0 -0
  34. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/guides/stores.md +0 -0
  35. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/index.md +0 -0
  36. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/internals/ducklake-formats.md +0 -0
  37. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/internals/from-write-to-read.md +0 -0
  38. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/internals/inside-a-repository.md +0 -0
  39. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/internals/meta.ts +0 -0
  40. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/concepts/meta.ts +0 -0
  41. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/concepts/repositories.md +0 -0
  42. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/concepts/versions-and-refs.md +0 -0
  43. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/concepts/working-catalogs.md +0 -0
  44. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/getting-started.md +0 -0
  45. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/building-a-host.md +0 -0
  46. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/meta.ts +0 -0
  47. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/mirrors.md +0 -0
  48. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/public-and-private.md +0 -0
  49. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/reading-without-duckdb.md +0 -0
  50. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/serving-over-http.md +0 -0
  51. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/guides/stores.md +0 -0
  52. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/index.md +0 -0
  53. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/internals/ducklake-formats.md +0 -0
  54. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/internals/from-write-to-read.md +0 -0
  55. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/internals/inside-a-repository.md +0 -0
  56. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/internals/meta.ts +0 -0
  57. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/reference/cli.md +0 -0
  58. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/reference/meta.ts +0 -0
  59. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/reference/python.md +0 -0
  60. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/collection-cases.md +0 -0
  61. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/data-files.md +0 -0
  62. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/http.md +0 -0
  63. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/index.md +0 -0
  64. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/layout.md +0 -0
  65. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/meta.ts +0 -0
  66. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/reading.md +0 -0
  67. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/refs.md +0 -0
  68. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/versions.md +0 -0
  69. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/spec/writing.md +0 -0
  70. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/ja/stability.md +0 -0
  71. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/reference/cli.md +0 -0
  72. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/reference/meta.ts +0 -0
  73. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/reference/python.md +0 -0
  74. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/collection-cases.md +0 -0
  75. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/data-files.md +0 -0
  76. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/http.md +0 -0
  77. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/index.md +0 -0
  78. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/layout.md +0 -0
  79. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/meta.ts +0 -0
  80. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/reading.md +0 -0
  81. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/refs.md +0 -0
  82. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/versions.md +0 -0
  83. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/spec/writing.md +0 -0
  84. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/docs/stability.md +0 -0
  85. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/package-lock.json +0 -0
  86. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/package.json +0 -0
  87. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/public/CNAME +0 -0
  88. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/__init__.py +0 -0
  89. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/catalog.py +0 -0
  90. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/cli.py +0 -0
  91. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/dataset.py +0 -0
  92. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/diff.py +0 -0
  93. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/layout.py +0 -0
  94. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/lineage.py +0 -0
  95. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/merge.py +0 -0
  96. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/objects.py +0 -0
  97. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/profiles.py +0 -0
  98. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/py.typed +0 -0
  99. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/refs.py +0 -0
  100. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/store.py +0 -0
  101. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/src/fdl/version.py +0 -0
  102. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/http_repo.py +0 -0
  103. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_cli.py +0 -0
  104. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_collection_cases.py +0 -0
  105. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_dataset.py +0 -0
  106. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_merge.py +0 -0
  107. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_objects.py +0 -0
  108. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_repo.py +0 -0
  109. {fdl_cli-0.24.1 → fdl_cli-0.24.2}/tests/test_stores.py +0 -0
@@ -1,6 +1,32 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v0.24.2 (2026-11-13)
5
+
6
+ ### Bug Fixes
7
+
8
+ - Give requests over HTTP a timeout so a silent host fails instead of hanging
9
+ ([#54](https://github.com/queria-io/fdl/pull/54),
10
+ [`a7070a5`](https://github.com/queria-io/fdl/commit/a7070a5c06de0a6cd1e8862d9afa766fb822759f))
11
+
12
+ - Reuse a parent's profile when only files.json's columns key differs
13
+ ([#55](https://github.com/queria-io/fdl/pull/55),
14
+ [`30223cb`](https://github.com/queria-io/fdl/commit/30223cb158d86db0a5aad216dd06d0f9483c9637))
15
+
16
+ * fix: reuse a parent's profile when only files.json's columns key differs
17
+
18
+ A parent written before files.json listed each table's columns never matched, so every commit on top
19
+ of it profiled every table from all of its data. Compare only the data files; profiles.reusable
20
+ already checks the columns.
21
+
22
+ * fix: still compare the columns when the parent's files.json lists them
23
+
24
+ Comparing only the data files kept a stale profile for a column dropped and added again under the
25
+ same name and type: the data files and the names and types match, but the column is new and has no
26
+ values. Leave the columns out of the comparison only for a parent written before files.json listed
27
+ them.
28
+
29
+
4
30
  ## v0.24.1 (2026-11-13)
5
31
 
6
32
  ### Bug Fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: fdl-cli
3
- Version: 0.24.1
3
+ Version: 0.24.2
4
4
  Summary: Versions of a DuckLake catalog on object storage, kept the way Git keeps commits
5
5
  Project-URL: Homepage, https://fdl.queria.io/
6
6
  Project-URL: Documentation, https://fdl.queria.io/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fdl-cli"
3
- version = "0.24.1"
3
+ version = "0.24.2"
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"
@@ -568,7 +568,12 @@ def write_profiles(
568
568
  key = f"{table['schema']}.{table['name']}"
569
569
  relative = profiles.path(table["schema"], table["name"])
570
570
  previous = None
571
- if parent is not None and key in files_before and files_before[key] == files_now.get(key):
571
+ before, now = files_before.get(key), files_now.get(key, {})
572
+ if before is not None and "columns" not in before:
573
+ # A parent written before files.json listed the columns: compare the
574
+ # rest, and leave the names and types to profiles.reusable.
575
+ now = {name: value for name, value in now.items() if name != "columns"}
576
+ if parent is not None and before is not None and before == now:
572
577
  try:
573
578
  previous = store.get(layout.version_dir(parent.id) + relative)
574
579
  except Exception as exc: # noqa: BLE001
@@ -69,8 +69,14 @@ class _SameOriginRedirects(urllib.request.HTTPRedirectHandler):
69
69
  _opener = urllib.request.build_opener(_SameOriginRedirects)
70
70
 
71
71
 
72
+ #: Seconds a request may wait to connect, or between two reads of the answer,
73
+ #: before it fails. Without it a connection a host stops answering holds the
74
+ #: command forever instead of failing so it can be run again.
75
+ TIMEOUT = 120
76
+
77
+
72
78
  def _open(request: urllib.request.Request):
73
- return _opener.open(request)
79
+ return _opener.open(request, timeout=TIMEOUT)
74
80
 
75
81
 
76
82
  class StoreError(RuntimeError):
@@ -318,6 +324,8 @@ class HttpStore:
318
324
  ) from exc
319
325
  except urllib.error.URLError as exc:
320
326
  raise StoreError(f"{method} {key or '/'}: {exc.reason}") from exc
327
+ except TimeoutError as exc:
328
+ raise StoreError(f"{method} {key or '/'}: no answer in {TIMEOUT} s") from exc
321
329
 
322
330
  @staticmethod
323
331
  def _conditions(
@@ -411,3 +411,20 @@ def test_a_merge_over_http(served, tmp_path: Path) -> None:
411
411
  )
412
412
  assert con.execute("SELECT count(*) FROM v.main.towns").fetchone() == (4,)
413
413
  assert con.execute("SELECT count(*) FROM v.main.roads").fetchone() == (1,)
414
+
415
+
416
+ def test_a_host_that_stops_answering_fails_instead_of_waiting(monkeypatch) -> None:
417
+ import socket
418
+ import threading
419
+
420
+ listener = socket.socket()
421
+ listener.bind(("127.0.0.1", 0))
422
+ listener.listen()
423
+ accepted = []
424
+ threading.Thread(target=lambda: accepted.append(listener.accept()), daemon=True).start()
425
+ monkeypatch.setattr(stores, "TIMEOUT", 0.5)
426
+ try:
427
+ with pytest.raises(StoreError, match="no answer"):
428
+ HttpStore(f"http://127.0.0.1:{listener.getsockname()[1]}/").get("fdl.json")
429
+ finally:
430
+ listener.close()
@@ -129,6 +129,47 @@ def test_an_unchanged_table_keeps_its_parents_profile(repository, monkeypatch) -
129
129
  assert profile_of(store, "other")["rows"] == 2
130
130
 
131
131
 
132
+ def test_a_parent_without_columns_in_its_files_keeps_its_profile(repository, monkeypatch) -> None:
133
+ store, working = repository
134
+ write(working, store, "CREATE TABLE lake.main.towns AS SELECT 1 AS id")
135
+ write(working, store, "CREATE TABLE lake.main.other AS SELECT 1 AS id")
136
+ commit(working, "-m", "m", "--author", "t")
137
+ parent = repo.head(store)
138
+ key = layout.version_dir(parent.id) + parent.files.path
139
+ files = json.loads(store.get(key))
140
+ for table in files["tables"].values():
141
+ table.pop("columns", None)
142
+ store.put(key, json.dumps(files).encode())
143
+ write(working, store, "INSERT INTO lake.main.other VALUES (2)")
144
+
145
+ built: list[str] = []
146
+ original = profiles.build
147
+
148
+ def spy(working, wanted, **kwargs):
149
+ wanted = list(wanted)
150
+ built.extend(t["name"] for t in wanted)
151
+ return original(working, wanted, **kwargs)
152
+
153
+ monkeypatch.setattr(profiles, "build", spy)
154
+ commit(working, "-m", "again", "--author", "t")
155
+ assert built == ["other"]
156
+ assert profile_of(store, "towns")["rows"] == 1
157
+
158
+
159
+ def test_a_column_dropped_and_added_again_is_profiled_again(repository) -> None:
160
+ store, working = repository
161
+ write(working, store, "CREATE TABLE lake.main.towns AS SELECT i AS id, i AS c FROM range(5) t(i)")
162
+ write(working, store, "CREATE TABLE lake.main.other AS SELECT 1 AS id")
163
+ commit(working, "-m", "m", "--author", "t")
164
+ # The same name and type, and the same data files, but a new column with no values.
165
+ write(working, store, "ALTER TABLE lake.main.towns DROP COLUMN c")
166
+ write(working, store, "ALTER TABLE lake.main.towns ADD COLUMN c BIGINT")
167
+ write(working, store, "INSERT INTO lake.main.other VALUES (2)")
168
+ commit(working, "-m", "again", "--author", "t")
169
+ c = {column["name"]: column for column in profile_of(store)["columns"]}["c"]
170
+ assert c.get("max") is None
171
+
172
+
132
173
  def test_expiry_deletes_the_profiles(repository) -> None:
133
174
  store, working = repository
134
175
  write(working, store, "CREATE TABLE lake.main.towns AS SELECT 1 AS id")
@@ -360,7 +360,7 @@ wheels = [
360
360
 
361
361
  [[package]]
362
362
  name = "fdl-cli"
363
- version = "0.21.1"
363
+ version = "0.24.0"
364
364
  source = { editable = "." }
365
365
  dependencies = [
366
366
  { name = "duckdb" },
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
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