okf-cli 0.1.1__tar.gz → 0.1.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.
- {okf_cli-0.1.1 → okf_cli-0.1.2}/PKG-INFO +1 -1
- {okf_cli-0.1.1 → okf_cli-0.1.2}/example/README.md +2 -2
- {okf_cli-0.1.1 → okf_cli-0.1.2}/pyproject.toml +1 -1
- {okf_cli-0.1.1 → okf_cli-0.1.2}/src/okf/cli.py +7 -0
- {okf_cli-0.1.1 → okf_cli-0.1.2}/tests/test_cli.py +9 -9
- {okf_cli-0.1.1 → okf_cli-0.1.2}/uv.lock +1 -1
- {okf_cli-0.1.1 → okf_cli-0.1.2}/.gitignore +0 -0
- {okf_cli-0.1.1 → okf_cli-0.1.2}/LICENSE +0 -0
- {okf_cli-0.1.1 → okf_cli-0.1.2}/OKF_SPEC.md +0 -0
- {okf_cli-0.1.1 → okf_cli-0.1.2}/README.md +0 -0
- {okf_cli-0.1.1 → okf_cli-0.1.2}/example/datasets/sales.md +0 -0
- {okf_cli-0.1.1 → okf_cli-0.1.2}/example/domain.md +0 -0
- {okf_cli-0.1.1 → okf_cli-0.1.2}/example/playbooks/incident-response.md +0 -0
- {okf_cli-0.1.1 → okf_cli-0.1.2}/example/playbooks/oncall-guide.md +0 -0
- {okf_cli-0.1.1 → okf_cli-0.1.2}/example/tables/customers.md +0 -0
- {okf_cli-0.1.1 → okf_cli-0.1.2}/example/tables/orders.md +0 -0
- {okf_cli-0.1.1 → okf_cli-0.1.2}/example/tables/partitions/2026/q1/jan/january.md +0 -0
- {okf_cli-0.1.1 → okf_cli-0.1.2}/example/tables/partitions/daily.md +0 -0
- {okf_cli-0.1.1 → okf_cli-0.1.2}/src/okf/__init__.py +0 -0
|
@@ -5,8 +5,8 @@ Run `okf bundle` to convert them into an OKF-conformant knowledge bundle.
|
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
7
|
# From repo root:
|
|
8
|
-
uv run okf example output-bundle
|
|
8
|
+
uv run okf bundle example output-bundle
|
|
9
9
|
|
|
10
10
|
# With a default type for root-level files (if any):
|
|
11
|
-
uv run okf example output-bundle --default-type reference
|
|
11
|
+
uv run okf bundle example output-bundle --default-type reference
|
|
12
12
|
```
|
|
@@ -125,7 +125,7 @@ def test_bundle_basic(tmp_path: Path):
|
|
|
125
125
|
},
|
|
126
126
|
)
|
|
127
127
|
|
|
128
|
-
result = runner.invoke(app, [str(src), str(dst)])
|
|
128
|
+
result = runner.invoke(app, ["bundle", str(src), str(dst)])
|
|
129
129
|
assert result.exit_code == 0, result.output
|
|
130
130
|
|
|
131
131
|
# Check output structure
|
|
@@ -162,7 +162,7 @@ def test_bundle_root_file_with_default_type(tmp_path: Path):
|
|
|
162
162
|
},
|
|
163
163
|
)
|
|
164
164
|
|
|
165
|
-
result = runner.invoke(app, [str(src), str(dst), "--default-type", "reference"])
|
|
165
|
+
result = runner.invoke(app, ["bundle", str(src), str(dst), "--default-type", "reference"])
|
|
166
166
|
assert result.exit_code == 0, result.output
|
|
167
167
|
|
|
168
168
|
stand = (dst / "standalone.md").read_text()
|
|
@@ -189,7 +189,7 @@ def test_bundle_skip_root_file_without_default(tmp_path: Path, capsys):
|
|
|
189
189
|
},
|
|
190
190
|
)
|
|
191
191
|
|
|
192
|
-
result = runner.invoke(app, [str(src), str(dst)])
|
|
192
|
+
result = runner.invoke(app, ["bundle", str(src), str(dst)])
|
|
193
193
|
assert result.exit_code == 0, result.output
|
|
194
194
|
|
|
195
195
|
assert not (dst / "standalone.md").exists()
|
|
@@ -213,7 +213,7 @@ def test_bundle_validation_error(tmp_path: Path):
|
|
|
213
213
|
},
|
|
214
214
|
)
|
|
215
215
|
|
|
216
|
-
result = runner.invoke(app, [str(src), str(dst)])
|
|
216
|
+
result = runner.invoke(app, ["bundle", str(src), str(dst)])
|
|
217
217
|
assert result.exit_code == 1
|
|
218
218
|
assert "Line 1 must be" in result.output
|
|
219
219
|
|
|
@@ -226,7 +226,7 @@ def test_bundle_replaces_existing_output(tmp_path: Path):
|
|
|
226
226
|
(dst / "leftover.txt").write_text("should be gone")
|
|
227
227
|
_write_fixture(src, {"tables/a.md": "# A\n\n> Desc.\n"})
|
|
228
228
|
|
|
229
|
-
result = runner.invoke(app, [str(src), str(dst)])
|
|
229
|
+
result = runner.invoke(app, ["bundle", str(src), str(dst)])
|
|
230
230
|
assert result.exit_code == 0, result.output
|
|
231
231
|
assert "Removed existing" in result.output
|
|
232
232
|
assert (dst / "tables" / "a.md").exists()
|
|
@@ -240,7 +240,7 @@ def test_bundle_no_md_files(tmp_path: Path):
|
|
|
240
240
|
# Create a non-md file
|
|
241
241
|
(src / "readme.txt").write_text("hello")
|
|
242
242
|
|
|
243
|
-
result = runner.invoke(app, [str(src), str(dst)])
|
|
243
|
+
result = runner.invoke(app, ["bundle", str(src), str(dst)])
|
|
244
244
|
assert result.exit_code == 1
|
|
245
245
|
assert "No markdown files" in result.output
|
|
246
246
|
|
|
@@ -253,7 +253,7 @@ def test_bundle_logmd_warning(tmp_path: Path):
|
|
|
253
253
|
(src / "tables").mkdir()
|
|
254
254
|
(src / "tables/orders.md").write_text("# Orders\n\n> One row.\n\nBody.")
|
|
255
255
|
|
|
256
|
-
result = runner.invoke(app, [str(src), str(dst)])
|
|
256
|
+
result = runner.invoke(app, ["bundle", str(src), str(dst)])
|
|
257
257
|
assert result.exit_code == 0, result.output
|
|
258
258
|
assert "reserved filename" in result.output
|
|
259
259
|
assert "log.md" in result.output
|
|
@@ -274,7 +274,7 @@ def test_bundle_readme_is_reserved(tmp_path: Path):
|
|
|
274
274
|
"# Orders\n\n> One row.\n\nBody."
|
|
275
275
|
)
|
|
276
276
|
|
|
277
|
-
result = runner.invoke(app, [str(src), str(dst)])
|
|
277
|
+
result = runner.invoke(app, ["bundle", str(src), str(dst)])
|
|
278
278
|
assert result.exit_code == 0, result.output
|
|
279
279
|
assert not (dst / "tables" / "README.md").exists()
|
|
280
280
|
assert (dst / "tables" / "orders.md").exists()
|
|
@@ -291,7 +291,7 @@ def test_frontmatter_yaml_parseable(tmp_path: Path):
|
|
|
291
291
|
"# True/False\n\n> Yes, no, true, false values\n\nBody."
|
|
292
292
|
)
|
|
293
293
|
|
|
294
|
-
result = runner.invoke(app, [str(src), str(dst), "--default-type", "ref"])
|
|
294
|
+
result = runner.invoke(app, ["bundle", str(src), str(dst), "--default-type", "ref"])
|
|
295
295
|
assert result.exit_code == 0, result.output
|
|
296
296
|
|
|
297
297
|
content = (dst / "data.md").read_text()
|
|
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
|