zdx 0.2.3.dev19__tar.gz → 0.11.0.dev1__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,21 +1,26 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: zdx
3
- Version: 0.2.3.dev19
3
+ Version: 0.11.0.dev1
4
4
  Summary: Z Doc Builder Experience by Swarmauri
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
7
7
  Keywords: mkdocs,documentation,swarmauri,docs,doc builder,zdx,doc,builder,experience
8
8
  Author: Jacob Stewart
9
9
  Author-email: jacob@swarmauri.com
10
- Requires-Python: >=3.12,<3.13
10
+ Requires-Python: >=3.10,<3.15
11
11
  Classifier: License :: OSI Approved :: Apache Software License
12
12
  Classifier: Natural Language :: English
13
- Classifier: Programming Language :: Python :: 3.10
14
- Classifier: Programming Language :: Python :: 3.11
15
- Classifier: Programming Language :: Python :: 3.12
16
13
  Classifier: Development Status :: 3 - Alpha
17
14
  Classifier: Intended Audience :: Developers
18
15
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
19
24
  Requires-Dist: griffe-typingdoc
20
25
  Requires-Dist: mkdocs
21
26
  Requires-Dist: mkdocs-autorefs
@@ -27,23 +32,21 @@ Requires-Dist: pyyaml (>=6.0)
27
32
  Requires-Dist: ruff (>=0.5)
28
33
  Description-Content-Type: text/markdown
29
34
 
30
- ![Swarmauri Logo](https://github.com/swarmauri/swarmauri-sdk/blob/3d4d1cfa949399d7019ae9d8f296afba773dfb7f/assets/swarmauri.brand.theme.svg)
31
-
35
+ ![Swarmauri Logo](https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri_sdk_brand.png)
32
36
 
33
37
  <p align="center">
38
+ <a href="https://pepy.tech/project/zdx/">
39
+ <img src="https://static.pepy.tech/badge/zdx/month" alt="PyPI - Downloads"/></a>
40
+ <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/plugins/zdx/">
41
+ <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/plugins/zdx.svg"/></a>
34
42
  <a href="https://pypi.org/project/zdx/">
35
- <img src="https://img.shields.io/pypi/dm/zdx" alt="PyPI - Downloads"/></a>
36
- <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/zdx/">
37
- <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/zdx.svg"/></a>
38
- <a href="https://pypi.org/project/zdx/">
39
- <img src="https://img.shields.io/pypi/pyversions/zdx" alt="PyPI - Python Version"/></a>
43
+ <img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="PyPI - Python Version"/></a>
40
44
  <a href="https://pypi.org/project/zdx/">
41
45
  <img src="https://img.shields.io/pypi/l/zdx" alt="PyPI - License"/></a>
42
46
  <a href="https://pypi.org/project/zdx/">
43
47
  <img src="https://img.shields.io/pypi/v/zdx?label=zdx&color=green" alt="PyPI - zdx"/></a>
44
- </p>
45
-
46
- ---
48
+ <a href="https://discord.gg/N4UpBuQv8T">
49
+ <img src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white" alt="Discord"/></a></p>
47
50
 
48
51
  # ZDX
49
52
 
@@ -102,9 +105,9 @@ zdx generate --on-error warn
102
105
 
103
106
  Valid values are:
104
107
 
105
- * `fail` – stop immediately if a package installation or API build fails
106
- * `warn` – print a warning but keep going
107
- * `ignore` – suppress warnings and continue
108
+ * `fail` ? stop immediately if a package installation or API build fails
109
+ * `warn` ? print a warning but keep going
110
+ * `ignore` ? suppress warnings and continue
108
111
 
109
112
  You can also define the `ZDX_FAILURE_MODE` environment variable to set the
110
113
  default for every invocation. For example, the provided Docker assets default to
@@ -144,7 +147,7 @@ Every field controls a different part of the generation process:
144
147
 
145
148
  | Field | Description |
146
149
  | --- | --- |
147
- | `name` | Label used for the top‑level navigation item and the folder under `docs/api/`. |
150
+ | `name` | Label used for the top-level navigation item and the folder under `docs/api/`. |
148
151
  | `search_path` | Directory containing the source package(s). The generator scans this path for modules. |
149
152
  | `package` | Root import name when documenting a single package. Omit when using `discover`. |
150
153
  | `discover` | When `true`, automatically finds all packages under `search_path` and builds docs for each. Generates separate folders and nav entries per package. |
@@ -157,3 +160,5 @@ per public class. Pages land in
157
160
  one does not exist. The navigation section for the target is appended to
158
161
  `mkdocs.yml`, ensuring the new pages appear in the rendered site.
159
162
 
163
+
164
+
@@ -1,20 +1,18 @@
1
- ![Swarmauri Logo](https://github.com/swarmauri/swarmauri-sdk/blob/3d4d1cfa949399d7019ae9d8f296afba773dfb7f/assets/swarmauri.brand.theme.svg)
2
-
1
+ ![Swarmauri Logo](https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri_sdk_brand.png)
3
2
 
4
3
  <p align="center">
4
+ <a href="https://pepy.tech/project/zdx/">
5
+ <img src="https://static.pepy.tech/badge/zdx/month" alt="PyPI - Downloads"/></a>
6
+ <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/plugins/zdx/">
7
+ <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/plugins/zdx.svg"/></a>
5
8
  <a href="https://pypi.org/project/zdx/">
6
- <img src="https://img.shields.io/pypi/dm/zdx" alt="PyPI - Downloads"/></a>
7
- <a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/zdx/">
8
- <img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/zdx.svg"/></a>
9
- <a href="https://pypi.org/project/zdx/">
10
- <img src="https://img.shields.io/pypi/pyversions/zdx" alt="PyPI - Python Version"/></a>
9
+ <img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="PyPI - Python Version"/></a>
11
10
  <a href="https://pypi.org/project/zdx/">
12
11
  <img src="https://img.shields.io/pypi/l/zdx" alt="PyPI - License"/></a>
13
12
  <a href="https://pypi.org/project/zdx/">
14
13
  <img src="https://img.shields.io/pypi/v/zdx?label=zdx&color=green" alt="PyPI - zdx"/></a>
15
- </p>
16
-
17
- ---
14
+ <a href="https://discord.gg/N4UpBuQv8T">
15
+ <img src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white" alt="Discord"/></a></p>
18
16
 
19
17
  # ZDX
20
18
 
@@ -73,9 +71,9 @@ zdx generate --on-error warn
73
71
 
74
72
  Valid values are:
75
73
 
76
- * `fail` – stop immediately if a package installation or API build fails
77
- * `warn` – print a warning but keep going
78
- * `ignore` – suppress warnings and continue
74
+ * `fail` ? stop immediately if a package installation or API build fails
75
+ * `warn` ? print a warning but keep going
76
+ * `ignore` ? suppress warnings and continue
79
77
 
80
78
  You can also define the `ZDX_FAILURE_MODE` environment variable to set the
81
79
  default for every invocation. For example, the provided Docker assets default to
@@ -115,7 +113,7 @@ Every field controls a different part of the generation process:
115
113
 
116
114
  | Field | Description |
117
115
  | --- | --- |
118
- | `name` | Label used for the top‑level navigation item and the folder under `docs/api/`. |
116
+ | `name` | Label used for the top-level navigation item and the folder under `docs/api/`. |
119
117
  | `search_path` | Directory containing the source package(s). The generator scans this path for modules. |
120
118
  | `package` | Root import name when documenting a single package. Omit when using `discover`. |
121
119
  | `discover` | When `true`, automatically finds all packages under `search_path` and builds docs for each. Generates separate folders and nav entries per package. |
@@ -127,3 +125,5 @@ per public class. Pages land in
127
125
  `docs/api/<name>/<module path>/<Class>.md` and a simple `index.md` is created if
128
126
  one does not exist. The navigation section for the target is appended to
129
127
  `mkdocs.yml`, ensuring the new pages appear in the rendered site.
128
+
129
+
@@ -1,10 +1,10 @@
1
1
  [project]
2
2
  name = "zdx"
3
- version = "0.2.3.dev19"
3
+ version = "0.11.0.dev1"
4
4
  description = "Z Doc Builder Experience by Swarmauri"
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
7
- requires-python = ">=3.12,<3.13"
7
+ requires-python = ">=3.10,<3.15"
8
8
  authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
9
9
  keywords = [
10
10
  "mkdocs",
@@ -31,12 +31,17 @@ dependencies = [
31
31
  classifiers = [
32
32
  "License :: OSI Approved :: Apache Software License",
33
33
  "Natural Language :: English",
34
- "Programming Language :: Python :: 3.10",
35
- "Programming Language :: Python :: 3.11",
36
- "Programming Language :: Python :: 3.12",
37
34
  "Development Status :: 3 - Alpha",
38
35
  "Intended Audience :: Developers",
39
36
  "Topic :: Software Development :: Libraries :: Application Frameworks",
37
+ "Programming Language :: Python",
38
+ "Programming Language :: Python :: 3",
39
+ "Programming Language :: Python :: 3 :: Only",
40
+ "Programming Language :: Python :: 3.10",
41
+ "Programming Language :: Python :: 3.11",
42
+ "Programming Language :: Python :: 3.12",
43
+ "Programming Language :: Python :: 3.13",
44
+ "Programming Language :: Python :: 3.14",
40
45
  ]
41
46
 
42
47
  [project.scripts]
@@ -63,7 +68,7 @@ dev = [
63
68
  "pytest-xdist>=3.6.1",
64
69
  "pytest-json-report>=1.5.0",
65
70
  "python-dotenv",
66
- "requests>=2.32.3",
71
+ "httpx>=0.27",
67
72
  "flake8>=7.0",
68
73
  "pytest-timeout>=2.3.1",
69
74
  "ruff>=0.9.9",
@@ -292,7 +292,9 @@ def _load_workspace_members(spec: WorkspaceSpec) -> list[Path]:
292
292
 
293
293
  workspace_cfg = data.get("tool", {}).get("uv", {}).get("workspace", {})
294
294
  members = (
295
- workspace_cfg.get("members", []) if isinstance(workspace_cfg, dict) else []
295
+ workspace_cfg.get("members", [])
296
+ if isinstance(workspace_cfg, dict)
297
+ else []
296
298
  )
297
299
 
298
300
  resolved: list[Path] = []
@@ -350,7 +352,9 @@ def install_manifest_packages(
350
352
 
351
353
  if desired_members:
352
354
  cmd = ["uv", "pip", "install"]
353
- if not (os.environ.get("VIRTUAL_ENV") or sys.prefix != sys.base_prefix):
355
+ if not (
356
+ os.environ.get("VIRTUAL_ENV") or sys.prefix != sys.base_prefix
357
+ ):
354
358
  cmd.append("--system")
355
359
  for member in desired_members:
356
360
  cmd.extend(["--editable", str(member)])
@@ -360,7 +364,9 @@ def install_manifest_packages(
360
364
  description="uv pip install (workspace members)",
361
365
  )
362
366
  if workspace_result.returncode == 0:
363
- installed_members = {member.resolve() for member in desired_members}
367
+ installed_members = {
368
+ member.resolve() for member in desired_members
369
+ }
364
370
  else:
365
371
  cmd = [
366
372
  "uv",
@@ -369,13 +375,17 @@ def install_manifest_packages(
369
375
  "--directory",
370
376
  str(workspace_spec.root),
371
377
  ]
372
- if not (os.environ.get("VIRTUAL_ENV") or sys.prefix != sys.base_prefix):
378
+ if not (
379
+ os.environ.get("VIRTUAL_ENV") or sys.prefix != sys.base_prefix
380
+ ):
373
381
  cmd.append("--system")
374
382
  cmd.append(".")
375
383
  workspace_result = _run_command(
376
384
  cmd,
377
385
  failure_mode=failure_mode,
378
- description=f"uv pip install --directory {workspace_spec.root}",
386
+ description=(
387
+ f"uv pip install --directory {workspace_spec.root}"
388
+ ),
379
389
  )
380
390
  if workspace_result.returncode == 0:
381
391
  installed_members = {workspace_spec.root.resolve()}
@@ -394,7 +404,8 @@ def install_manifest_packages(
394
404
  if not pkg_path.is_dir():
395
405
  return
396
406
  if not (
397
- (pkg_path / "pyproject.toml").is_file() or (pkg_path / "setup.py").is_file()
407
+ (pkg_path / "pyproject.toml").is_file()
408
+ or (pkg_path / "setup.py").is_file()
398
409
  ):
399
410
  print(f"Skipping {pkg_path}: no pyproject.toml or setup.py found")
400
411
  return
@@ -406,7 +417,9 @@ def install_manifest_packages(
406
417
  "--directory",
407
418
  str(pkg_path),
408
419
  ]
409
- if not (os.environ.get("VIRTUAL_ENV") or sys.prefix != sys.base_prefix):
420
+ if not (
421
+ os.environ.get("VIRTUAL_ENV") or sys.prefix != sys.base_prefix
422
+ ):
410
423
  cmd.append("--system")
411
424
  cmd.append(".")
412
425
  result = _run_command(
@@ -523,7 +536,9 @@ def main() -> None:
523
536
 
524
537
  def generate_cmd(args: argparse.Namespace) -> None:
525
538
  failure_mode = FailureMode.from_value(args.on_error)
526
- failed = install_manifest_packages(args.manifest, failure_mode=failure_mode)
539
+ failed = install_manifest_packages(
540
+ args.manifest, failure_mode=failure_mode
541
+ )
527
542
  if failed:
528
543
  print(
529
544
  "WARNING: Skipping API generation for packages that failed to "
@@ -547,7 +562,9 @@ def main() -> None:
547
562
 
548
563
  gen.set_defaults(func=generate_cmd)
549
564
 
550
- readmes = sub.add_parser("readmes", help="Generate documentation from README files")
565
+ readmes = sub.add_parser(
566
+ "readmes", help="Generate documentation from README files"
567
+ )
551
568
  readmes.add_argument("--docs-dir", default=".")
552
569
  _add_failure_mode_argument(readmes)
553
570
 
@@ -575,7 +592,9 @@ def main() -> None:
575
592
 
576
593
  def serve_cmd(args: argparse.Namespace) -> None:
577
594
  failure_mode = FailureMode.from_value(args.on_error)
578
- failed = install_manifest_packages(args.manifest, failure_mode=failure_mode)
595
+ failed = install_manifest_packages(
596
+ args.manifest, failure_mode=failure_mode
597
+ )
579
598
  if failed:
580
599
  print(
581
600
  "WARNING: Skipping API generation for packages that failed to "
@@ -103,10 +103,13 @@ def iter_python_files(root_pkg_dir: str, package_name: str):
103
103
 
104
104
  def is_valid_package_path(package_root: str, module_file: str) -> bool:
105
105
  """Return True if every directory from package root to the module file
106
- contains an __init__.py, ensuring it's importable as a regular package path.
106
+ contains an __init__.py, ensuring it's importable as a regular package
107
+ path.
107
108
  """
108
- # e.g., package_root=/repo/pkgs/base, module_file=/repo/pkgs/base/swarmauri_base/foo/bar.py
109
- # We need to check /repo/pkgs/base/swarmauri_base[/foo]... all dirs to bar.py have __init__.py
109
+ # e.g., package_root=/repo/pkgs/base,
110
+ # module_file=/repo/pkgs/base/swarmauri_base/foo/bar.py
111
+ # We need to check /repo/pkgs/base/swarmauri_base[/foo]... all dirs to
112
+ # bar.py have __init__.py
110
113
  rel = os.path.relpath(module_file, package_root)
111
114
  parts = rel.split(os.sep)
112
115
  # drop filename
@@ -121,9 +124,13 @@ def is_valid_package_path(package_root: str, module_file: str) -> bool:
121
124
  return True
122
125
 
123
126
 
124
- def module_allowed(module: str, includes: List[str], excludes: List[str]) -> bool:
127
+ def module_allowed(
128
+ module: str, includes: List[str], excludes: List[str]
129
+ ) -> bool:
125
130
  inc_ok = (
126
- any(fnmatch.fnmatch(module, patt) for patt in includes) if includes else True
131
+ any(fnmatch.fnmatch(module, patt) for patt in includes)
132
+ if includes
133
+ else True
127
134
  )
128
135
  exc_ok = (
129
136
  not any(fnmatch.fnmatch(module, patt) for patt in excludes)
@@ -167,7 +174,8 @@ def write_class_page(out_path: str, module: str, cls: str) -> None:
167
174
  def build_nav_structure(
168
175
  top_label: str, api_rel_dir: str, module_classes: Dict[str, List[str]]
169
176
  ):
170
- # Organize classes by category inferred from module path after the package name
177
+ # Organize classes by category inferred from module path after the package
178
+ # name
171
179
  # e.g., swarmauri_standard.agents.foo -> category "Agents"
172
180
  by_category: Dict[str, List[Dict[str, str]]] = {}
173
181
  for module, classes in module_classes.items():
@@ -300,7 +308,9 @@ def process_target(
300
308
  if not packages:
301
309
  return module_classes
302
310
 
303
- top_dir = os.path.join(docs_root, "docs", api_output_dir, target.name.lower())
311
+ top_dir = os.path.join(
312
+ docs_root, "docs", api_output_dir, target.name.lower()
313
+ )
304
314
  ensure_home_page(top_dir)
305
315
 
306
316
  for package_name, package_root in packages:
@@ -313,7 +323,11 @@ def process_target(
313
323
  continue
314
324
  if not is_valid_package_path(package_root, fpath):
315
325
  print(
316
- f"Skipping non-package module (missing __init__.py in path): {module}"
326
+ (
327
+ f"Skipping non-package module (missing __init__.py in "
328
+ f"path): "
329
+ f"{module}"
330
+ )
317
331
  )
318
332
  continue
319
333
  ckey = os.path.relpath(fpath, docs_root)
@@ -359,7 +373,11 @@ def process_target(
359
373
  for module, classes, ckey, mtime, size, h in results:
360
374
  module_classes.setdefault(module, []).extend(classes)
361
375
  prev = cache["files"].get(ckey)
362
- dirty = prev is None or prev.get("mtime") != mtime or prev.get("hash") != h
376
+ dirty = (
377
+ prev is None
378
+ or prev.get("mtime") != mtime
379
+ or prev.get("hash") != h
380
+ )
363
381
 
364
382
  mod_dir = os.path.join(
365
383
  docs_root,
@@ -378,7 +396,11 @@ def process_target(
378
396
  continue
379
397
  for cls in classes:
380
398
  out_path = os.path.join(mod_dir, f"{cls}.md")
381
- if (not changed_only) or dirty or (not os.path.exists(out_path)):
399
+ if (
400
+ (not changed_only)
401
+ or dirty
402
+ or (not os.path.exists(out_path))
403
+ ):
382
404
  write_class_page(out_path, module, cls)
383
405
  cache["files"][ckey] = {
384
406
  "mtime": mtime,
@@ -403,10 +425,14 @@ def main():
403
425
  help="Path to api manifest YAML (relative to docs/)",
404
426
  )
405
427
  parser.add_argument(
406
- "--docs-dir", default=".", help="Docs working directory (default: current)"
428
+ "--docs-dir",
429
+ default=".",
430
+ help="Docs working directory (default: current)",
407
431
  )
408
432
  parser.add_argument(
409
- "--api-output-dir", default="api", help="Relative output dir under docs/docs/"
433
+ "--api-output-dir",
434
+ default="api",
435
+ help="Relative output dir under docs/docs/",
410
436
  )
411
437
  parser.add_argument(
412
438
  "--mkdocs-yml",
@@ -38,7 +38,9 @@ def main() -> None:
38
38
  out.write(src.read_bytes())
39
39
 
40
40
  def write_text(src: Path, dest: Path) -> None:
41
- with mkdocs_gen_files.open(dest.as_posix(), "w", encoding="utf-8") as out:
41
+ with mkdocs_gen_files.open(
42
+ dest.as_posix(), "w", encoding="utf-8"
43
+ ) as out:
42
44
  out.write(src.read_text(encoding="utf-8"))
43
45
 
44
46
  for base in ROOTS:
@@ -52,7 +54,9 @@ def main() -> None:
52
54
  out_md = Path(*doc_dir_parts) / "index.md"
53
55
 
54
56
  write_text(readme, out_md)
55
- mkdocs_gen_files.set_edit_path(out_md.as_posix(), readme.as_posix())
57
+ mkdocs_gen_files.set_edit_path(
58
+ out_md.as_posix(), readme.as_posix()
59
+ )
56
60
 
57
61
  nav[doc_dir_parts] = out_md.as_posix()
58
62
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes