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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: okf-cli
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Open Knowledge Format tooling
5
5
  License: MIT License
6
6
 
@@ -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
  ```
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "okf-cli"
3
- version = "0.1.1"
3
+ version = "0.1.2"
4
4
  description = "Open Knowledge Format tooling"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -14,6 +14,13 @@ app = typer.Typer(
14
14
  no_args_is_help=True,
15
15
  )
16
16
 
17
+
18
+ @app.callback()
19
+ def main() -> None:
20
+ """Convert plain markdown into OKF-conformant knowledge bundles."""
21
+ pass
22
+
23
+
17
24
  RESERVED = frozenset({"index.md", "log.md", "readme.md"})
18
25
 
19
26
 
@@ -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()
@@ -52,7 +52,7 @@ wheels = [
52
52
 
53
53
  [[package]]
54
54
  name = "okf-cli"
55
- version = "0.1.0"
55
+ version = "0.1.1"
56
56
  source = { editable = "." }
57
57
  dependencies = [
58
58
  { name = "typer" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes