sdcmodeler 4.4.0__tar.gz → 4.4.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 (23) hide show
  1. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/PKG-INFO +1 -1
  2. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/pyproject.toml +1 -1
  3. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/src/sdcmodeler/__init__.py +1 -1
  4. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/src/sdcmodeler/kits.py +2 -2
  5. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/src/sdcmodeler.egg-info/PKG-INFO +1 -1
  6. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/tests/test_kits.py +10 -3
  7. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/LICENSE +0 -0
  8. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/README.md +0 -0
  9. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/setup.cfg +0 -0
  10. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/src/sdcmodeler/cli.py +0 -0
  11. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/src/sdcmodeler/client.py +0 -0
  12. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/src/sdcmodeler/mcp_server.py +0 -0
  13. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/src/sdcmodeler/pricing.py +0 -0
  14. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/src/sdcmodeler.egg-info/SOURCES.txt +0 -0
  15. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/src/sdcmodeler.egg-info/dependency_links.txt +0 -0
  16. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/src/sdcmodeler.egg-info/entry_points.txt +0 -0
  17. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/src/sdcmodeler.egg-info/requires.txt +0 -0
  18. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/src/sdcmodeler.egg-info/top_level.txt +0 -0
  19. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/tests/test_cli.py +0 -0
  20. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/tests/test_client.py +0 -0
  21. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/tests/test_mcp_server.py +0 -0
  22. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/tests/test_pricing.py +0 -0
  23. {sdcmodeler-4.4.0 → sdcmodeler-4.4.1}/tests/test_registry_launch.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sdcmodeler
3
- Version: 4.4.0
3
+ Version: 4.4.1
4
4
  Summary: The modeler's client for SDCStudio: search the catalog, estimate, assemble and publish SDC4 data models, generate applications; a CLI and an MCP server over one client
5
5
  Author: Axius SDC, Inc.
6
6
  License-Expression: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "sdcmodeler"
7
- version = "4.4.0"
7
+ version = "4.4.1"
8
8
  description = "The modeler's client for SDCStudio: search the catalog, estimate, assemble and publish SDC4 data models, generate applications; a CLI and an MCP server over one client"
9
9
  license = "Apache-2.0"
10
10
  requires-python = ">=3.10"
@@ -17,7 +17,7 @@ servers: sdcvalidator validates, sdcgovernance governs, sdcreader reads,
17
17
  sdcmodeler models. It also names the concept SDCStudio already has: every user
18
18
  is a Modeler, and the Modeler's projects scope every call.
19
19
  """
20
- __version__ = "4.4.0"
20
+ __version__ = "4.4.1"
21
21
 
22
22
  from sdcmodeler.client import ( # noqa: E402
23
23
  AssemblyRefused,
@@ -32,10 +32,10 @@ class KitConflictError(Exception):
32
32
 
33
33
  def models_index(model_files: Iterable[str], generator: str) -> str:
34
34
  cts = sorted(m[len("dm-"):-len(".ts")] for m in model_files)
35
- lines = [f"// Generated by the SDCStudio kit generator {generator}: every model in this kit, by ct_id.",
35
+ lines = [f"// Generated by the SDCStudio kit generator {generator}: every model in this kit, by its root element (dm-<ct_id>).",
36
36
  "// Rewritten when a model kit is added.", ""]
37
37
  lines += [f"import * as dm_{ct} from './dm-{ct}.ts';" for ct in cts]
38
- lines += ["", "export const models = {", *[f" {ct}: dm_{ct}," for ct in cts], "} as const;", ""]
38
+ lines += ["", "export const models = {", *[f' "dm-{ct}": dm_{ct},' for ct in cts], "} as const;", ""]
39
39
  return "\n".join(lines)
40
40
 
41
41
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sdcmodeler
3
- Version: 4.4.0
3
+ Version: 4.4.1
4
4
  Summary: The modeler's client for SDCStudio: search the catalog, estimate, assemble and publish SDC4 data models, generate applications; a CLI and an MCP server over one client
5
5
  Author: Axius SDC, Inc.
6
6
  License-Expression: Apache-2.0
@@ -33,10 +33,10 @@ def test_the_first_kit_writes_the_base_its_files_and_the_index(tmp_path):
33
33
  assert migrations(tmp_path) == ["20261102120000_sdc_base.sql", "20261102120001_sdc_dm_m1.sql"]
34
34
  assert f"{SDC}/models/index.ts" in written
35
35
  assert (tmp_path / SDC / "models" / "index.ts").read_text() == (
36
- "// Generated by the SDCStudio kit generator 4.0.0: every model in this kit, by ct_id.\n"
36
+ "// Generated by the SDCStudio kit generator 4.0.0: every model in this kit, by its root element (dm-<ct_id>).\n"
37
37
  "// Rewritten when a model kit is added.\n\n"
38
38
  "import * as dm_m1 from './dm-m1.ts';\n\n"
39
- "export const models = {\n m1: dm_m1,\n} as const;\n"
39
+ "export const models = {\n \"dm-m1\": dm_m1,\n} as const;\n"
40
40
  )
41
41
 
42
42
 
@@ -46,7 +46,7 @@ def test_a_second_model_adds_its_kit_and_one_migration_after_the_others(tmp_path
46
46
  assert migrations(tmp_path)[-1] == "20261102120002_sdc_dm_m2.sql" and len(migrations(tmp_path)) == 3
47
47
  assert not any(p.endswith("sdc_base.sql") for p in written), "the base is written once"
48
48
  index = (tmp_path / SDC / "models" / "index.ts").read_text()
49
- assert " m1: dm_m1," in index and " m2: dm_m2," in index
49
+ assert ' "dm-m1": dm_m1,' in index and ' "dm-m2": dm_m2,' in index
50
50
 
51
51
 
52
52
  def test_writing_again_writes_nothing(tmp_path):
@@ -60,3 +60,10 @@ def test_a_component_that_differs_is_refused_before_anything_is_written(tmp_path
60
60
  write_kit(tmp_path, kit("m2", text="export const ctId = 'changed';\n"), now=NOW)
61
61
  assert not (tmp_path / SDC / "models" / "dm-m2.ts").exists()
62
62
  assert len(migrations(tmp_path)) == 2
63
+
64
+
65
+ def test_a_cuid_is_never_a_key_on_its_own(tmp_path):
66
+ # A CUID may start with a digit; models are keyed by their root element, dm-<ct_id>, as the XSD names them.
67
+ write_kit(tmp_path, kit("5scaiw897xhuqa1k8sso932e"), now=NOW)
68
+ index = (tmp_path / SDC / "models" / "index.ts").read_text()
69
+ assert ' "dm-5scaiw897xhuqa1k8sso932e": dm_5scaiw897xhuqa1k8sso932e,' in index
File without changes
File without changes
File without changes
File without changes