structurize 3.3.1__tar.gz → 3.3.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 (89) hide show
  1. {structurize-3.3.1/structurize.egg-info → structurize-3.3.2}/PKG-INFO +1 -1
  2. {structurize-3.3.1 → structurize-3.3.2}/avrotize/_version.py +3 -3
  3. {structurize-3.3.1 → structurize-3.3.2}/avrotize/choice_inference.py +13 -5
  4. {structurize-3.3.1 → structurize-3.3.2/structurize.egg-info}/PKG-INFO +1 -1
  5. {structurize-3.3.1 → structurize-3.3.2}/.gitignore +0 -0
  6. {structurize-3.3.1 → structurize-3.3.2}/LICENSE +0 -0
  7. {structurize-3.3.1 → structurize-3.3.2}/MANIFEST.in +0 -0
  8. {structurize-3.3.1 → structurize-3.3.2}/README.md +0 -0
  9. {structurize-3.3.1 → structurize-3.3.2}/avrotize/__init__.py +0 -0
  10. {structurize-3.3.1 → structurize-3.3.2}/avrotize/__main__.py +0 -0
  11. {structurize-3.3.1 → structurize-3.3.2}/avrotize/asn1toavro.py +0 -0
  12. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotize.py +0 -0
  13. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotocpp.py +0 -0
  14. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotocsharp.py +0 -0
  15. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotocsv.py +0 -0
  16. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotodatapackage.py +0 -0
  17. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotodb.py +0 -0
  18. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotogo.py +0 -0
  19. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotographql.py +0 -0
  20. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotoiceberg.py +0 -0
  21. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotojava.py +0 -0
  22. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotojs.py +0 -0
  23. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotojsons.py +0 -0
  24. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotojstruct.py +0 -0
  25. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotokusto.py +0 -0
  26. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotomd.py +0 -0
  27. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotools.py +0 -0
  28. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotoparquet.py +0 -0
  29. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotoproto.py +0 -0
  30. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotopython.py +0 -0
  31. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotorust.py +0 -0
  32. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotots.py +0 -0
  33. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrotoxsd.py +0 -0
  34. {structurize-3.3.1 → structurize-3.3.2}/avrotize/avrovalidator.py +0 -0
  35. {structurize-3.3.1 → structurize-3.3.2}/avrotize/cddltostructure.py +0 -0
  36. {structurize-3.3.1 → structurize-3.3.2}/avrotize/commands.json +0 -0
  37. {structurize-3.3.1 → structurize-3.3.2}/avrotize/common.py +0 -0
  38. {structurize-3.3.1 → structurize-3.3.2}/avrotize/constants.py +0 -0
  39. {structurize-3.3.1 → structurize-3.3.2}/avrotize/csvtoavro.py +0 -0
  40. {structurize-3.3.1 → structurize-3.3.2}/avrotize/datapackagetoavro.py +0 -0
  41. {structurize-3.3.1 → structurize-3.3.2}/avrotize/dependencies/cpp/vcpkg/vcpkg.json +0 -0
  42. {structurize-3.3.1 → structurize-3.3.2}/avrotize/dependencies/typescript/node22/package.json +0 -0
  43. {structurize-3.3.1 → structurize-3.3.2}/avrotize/dependency_resolver.py +0 -0
  44. {structurize-3.3.1 → structurize-3.3.2}/avrotize/dependency_version.py +0 -0
  45. {structurize-3.3.1 → structurize-3.3.2}/avrotize/jsonstoavro.py +0 -0
  46. {structurize-3.3.1 → structurize-3.3.2}/avrotize/jsonstostructure.py +0 -0
  47. {structurize-3.3.1 → structurize-3.3.2}/avrotize/jsontoschema.py +0 -0
  48. {structurize-3.3.1 → structurize-3.3.2}/avrotize/jstructtoavro.py +0 -0
  49. {structurize-3.3.1 → structurize-3.3.2}/avrotize/kstructtoavro.py +0 -0
  50. {structurize-3.3.1 → structurize-3.3.2}/avrotize/kustotoavro.py +0 -0
  51. {structurize-3.3.1 → structurize-3.3.2}/avrotize/kustotojstruct.py +0 -0
  52. {structurize-3.3.1 → structurize-3.3.2}/avrotize/openapitostructure.py +0 -0
  53. {structurize-3.3.1 → structurize-3.3.2}/avrotize/parquettoavro.py +0 -0
  54. {structurize-3.3.1 → structurize-3.3.2}/avrotize/proto2parser.py +0 -0
  55. {structurize-3.3.1 → structurize-3.3.2}/avrotize/proto3parser.py +0 -0
  56. {structurize-3.3.1 → structurize-3.3.2}/avrotize/prototoavro.py +0 -0
  57. {structurize-3.3.1 → structurize-3.3.2}/avrotize/schema_inference.py +0 -0
  58. {structurize-3.3.1 → structurize-3.3.2}/avrotize/sqltoavro.py +0 -0
  59. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretocddl.py +0 -0
  60. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretocpp.py +0 -0
  61. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretocsharp.py +0 -0
  62. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretocsv.py +0 -0
  63. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretodatapackage.py +0 -0
  64. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretodb.py +0 -0
  65. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretogo.py +0 -0
  66. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretographql.py +0 -0
  67. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretoiceberg.py +0 -0
  68. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretojava.py +0 -0
  69. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretojs.py +0 -0
  70. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretojsons.py +0 -0
  71. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretokusto.py +0 -0
  72. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretomd.py +0 -0
  73. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretoproto.py +0 -0
  74. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretopython.py +0 -0
  75. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretorust.py +0 -0
  76. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretots.py +0 -0
  77. {structurize-3.3.1 → structurize-3.3.2}/avrotize/structuretoxsd.py +0 -0
  78. {structurize-3.3.1 → structurize-3.3.2}/avrotize/validate.py +0 -0
  79. {structurize-3.3.1 → structurize-3.3.2}/avrotize/xmltoschema.py +0 -0
  80. {structurize-3.3.1 → structurize-3.3.2}/avrotize/xsdtoavro.py +0 -0
  81. {structurize-3.3.1 → structurize-3.3.2}/build.ps1 +0 -0
  82. {structurize-3.3.1 → structurize-3.3.2}/build.sh +0 -0
  83. {structurize-3.3.1 → structurize-3.3.2}/pyproject.toml +0 -0
  84. {structurize-3.3.1 → structurize-3.3.2}/setup.cfg +0 -0
  85. {structurize-3.3.1 → structurize-3.3.2}/structurize.egg-info/SOURCES.txt +0 -0
  86. {structurize-3.3.1 → structurize-3.3.2}/structurize.egg-info/dependency_links.txt +0 -0
  87. {structurize-3.3.1 → structurize-3.3.2}/structurize.egg-info/entry_points.txt +0 -0
  88. {structurize-3.3.1 → structurize-3.3.2}/structurize.egg-info/requires.txt +0 -0
  89. {structurize-3.3.1 → structurize-3.3.2}/structurize.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: structurize
3
- Version: 3.3.1
3
+ Version: 3.3.2
4
4
  Summary: Tools to convert from and to JSON Structure from various other schema languages.
5
5
  Author-email: Clemens Vasters <clemensv@microsoft.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '3.3.1'
32
- __version_tuple__ = version_tuple = (3, 3, 1)
31
+ __version__ = version = '3.3.2'
32
+ __version_tuple__ = version_tuple = (3, 3, 2)
33
33
 
34
- __commit_id__ = commit_id = 'g670e64099'
34
+ __commit_id__ = commit_id = 'gdcb1a6825'
@@ -214,11 +214,19 @@ def _detect_discriminators(
214
214
  if len(values) < 2:
215
215
  continue
216
216
 
217
- # Skip boolean-like string values - these are flags, not discriminators
218
- # A field with only "true"/"false" (or similar) values is not a type discriminator
219
- normalized_values = {v.lower() if isinstance(v, str) else str(v).lower() for v in values}
220
- boolean_values = {'true', 'false', 'yes', 'no', '0', '1'}
221
- if normalized_values <= boolean_values:
217
+ # Discriminators must be identifier-like strings (type names, enum values)
218
+ # Valid: "PlayerTracking", "ball_data", "goal-event", "Event.Type"
219
+ # Invalid: "1", "2024/2025", "true", "2024-01-15T10:30:00Z", UUIDs
220
+ import re
221
+ def is_valid_discriminator(s: str) -> bool:
222
+ """Check if a string looks like a type name or identifier."""
223
+ if not s or not isinstance(s, str):
224
+ return False
225
+ # Must start with a letter, contain only alphanumeric, underscore, hyphen, dot
226
+ # This matches typical identifiers: PascalCase, camelCase, snake_case, kebab-case
227
+ return bool(re.match(r'^[A-Za-z][A-Za-z0-9_\-\.]*$', s))
228
+
229
+ if not all(is_valid_discriminator(v) for v in values):
222
230
  continue
223
231
 
224
232
  # Single cluster with multiple values - check if values create distinct groups
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: structurize
3
- Version: 3.3.1
3
+ Version: 3.3.2
4
4
  Summary: Tools to convert from and to JSON Structure from various other schema languages.
5
5
  Author-email: Clemens Vasters <clemensv@microsoft.com>
6
6
  Classifier: Programming Language :: Python :: 3
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes