structurize 2.18.2__py3-none-any.whl → 2.20.0__py3-none-any.whl

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.
avrotize/commands.json CHANGED
@@ -1891,6 +1891,156 @@
1891
1891
  }
1892
1892
  ]
1893
1893
  },
1894
+ {
1895
+ "command": "s2java",
1896
+ "description": "Convert JSON Structure to Java classes",
1897
+ "group": "2_ProgLanguages",
1898
+ "function": {
1899
+ "name": "avrotize.structuretojava.convert_structure_to_java",
1900
+ "args": {
1901
+ "structure_schema_path": "input_file_path",
1902
+ "java_file_path": "output_file_path",
1903
+ "package_name": "args.package",
1904
+ "pascal_properties": "args.pascal_properties",
1905
+ "jackson_annotation": "args.jackson_annotation"
1906
+ }
1907
+ },
1908
+ "extensions": [".struct.json", ".json"],
1909
+ "args": [
1910
+ {
1911
+ "name": "input",
1912
+ "type": "str",
1913
+ "nargs": "?",
1914
+ "help": "Path to the JSON Structure schema file (or read from stdin if omitted)",
1915
+ "required": false
1916
+ },
1917
+ {
1918
+ "name": "--out",
1919
+ "type": "str",
1920
+ "help": "Output path for the Java classes",
1921
+ "required": true
1922
+ },
1923
+ {
1924
+ "name": "--package",
1925
+ "type": "str",
1926
+ "help": "Java package name",
1927
+ "required": false
1928
+ },
1929
+ {
1930
+ "name": "--jackson-annotation",
1931
+ "type": "bool",
1932
+ "help": "Use Jackson annotations for JSON serialization",
1933
+ "default": true,
1934
+ "required": false
1935
+ },
1936
+ {
1937
+ "name": "--pascal-properties",
1938
+ "type": "bool",
1939
+ "help": "Use PascalCase for property names",
1940
+ "default": false,
1941
+ "required": false
1942
+ }
1943
+ ],
1944
+ "suggested_output_file_path": "{input_file_name}-java",
1945
+ "prompts": [
1946
+ {
1947
+ "name": "--package",
1948
+ "message": "Enter the Java package name",
1949
+ "type": "str",
1950
+ "default": "{input_file_name}",
1951
+ "required": false
1952
+ },
1953
+ {
1954
+ "name": "--jackson-annotation",
1955
+ "message": "Use Jackson annotations?",
1956
+ "type": "bool",
1957
+ "default": true
1958
+ }
1959
+ ]
1960
+ },
1961
+ {
1962
+ "command": "s2go",
1963
+ "description": "Convert JSON Structure to Go structs",
1964
+ "group": "2_ProgLanguages",
1965
+ "function": {
1966
+ "name": "avrotize.structuretogo.convert_structure_to_go",
1967
+ "args": {
1968
+ "structure_schema_path": "input_file_path",
1969
+ "go_file_path": "output_file_path",
1970
+ "package_name": "args.package",
1971
+ "json_annotation": "args.json_annotation",
1972
+ "avro_annotation": "args.avro_annotation",
1973
+ "package_site": "args.package_site",
1974
+ "package_username": "args.package_username"
1975
+ }
1976
+ },
1977
+ "extensions": [".struct.json", ".json"],
1978
+ "args": [
1979
+ {
1980
+ "name": "input",
1981
+ "type": "str",
1982
+ "nargs": "?",
1983
+ "help": "Path to the JSON Structure schema file (or read from stdin if omitted)",
1984
+ "required": false
1985
+ },
1986
+ {
1987
+ "name": "--out",
1988
+ "type": "str",
1989
+ "help": "Output path for the Go structs",
1990
+ "required": true
1991
+ },
1992
+ {
1993
+ "name": "--package",
1994
+ "type": "str",
1995
+ "help": "Go package name",
1996
+ "required": false
1997
+ },
1998
+ {
1999
+ "name": "--json-annotation",
2000
+ "type": "bool",
2001
+ "help": "Add JSON struct tags for encoding/json",
2002
+ "default": false,
2003
+ "required": false
2004
+ },
2005
+ {
2006
+ "name": "--avro-annotation",
2007
+ "type": "bool",
2008
+ "help": "Add Avro struct tags",
2009
+ "default": false,
2010
+ "required": false
2011
+ },
2012
+ {
2013
+ "name": "--package-site",
2014
+ "type": "str",
2015
+ "help": "Package site for Go module (e.g., github.com)",
2016
+ "default": "github.com",
2017
+ "required": false
2018
+ },
2019
+ {
2020
+ "name": "--package-username",
2021
+ "type": "str",
2022
+ "help": "Username/organization for Go module",
2023
+ "default": "username",
2024
+ "required": false
2025
+ }
2026
+ ],
2027
+ "suggested_output_file_path": "{input_file_name}-go",
2028
+ "prompts": [
2029
+ {
2030
+ "name": "--package",
2031
+ "message": "Enter the Go package name",
2032
+ "type": "str",
2033
+ "default": "{input_file_name}",
2034
+ "required": false
2035
+ },
2036
+ {
2037
+ "name": "--json-annotation",
2038
+ "message": "Add JSON struct tags?",
2039
+ "type": "bool",
2040
+ "default": false
2041
+ }
2042
+ ]
2043
+ },
1894
2044
  {
1895
2045
  "command": "struct2gql",
1896
2046
  "description": "Convert JSON Structure schema to GraphQL schema",
@@ -3076,6 +3226,36 @@
3076
3226
  "suggested_output_file_path": "{input_file_name}.xsd",
3077
3227
  "prompts": []
3078
3228
  },
3229
+ {
3230
+ "command": "s2cddl",
3231
+ "description": "Convert JSON Structure to CDDL schema",
3232
+ "group": "1_Schemas",
3233
+ "function": {
3234
+ "name": "avrotize.structuretocddl.convert_structure_to_cddl_files",
3235
+ "args": {
3236
+ "structure_schema_path": "input_file_path",
3237
+ "cddl_file_path": "output_file_path"
3238
+ }
3239
+ },
3240
+ "extensions": [".struct.json", ".json"],
3241
+ "args": [
3242
+ {
3243
+ "name": "input",
3244
+ "type": "str",
3245
+ "nargs": "?",
3246
+ "help": "Path to the JSON Structure file (or read from stdin if omitted)",
3247
+ "required": false
3248
+ },
3249
+ {
3250
+ "name": "--out",
3251
+ "type": "str",
3252
+ "help": "Path to the CDDL schema file",
3253
+ "required": false
3254
+ }
3255
+ ],
3256
+ "suggested_output_file_path": "{input_file_name}.cddl",
3257
+ "prompts": []
3258
+ },
3079
3259
  {
3080
3260
  "command": "struct2md",
3081
3261
  "description": "Convert JSON Structure schema to Markdown documentation",
@@ -3107,5 +3287,51 @@
3107
3287
  ],
3108
3288
  "suggested_output_file_path": "{input_file_name}.md",
3109
3289
  "prompts": []
3290
+ },
3291
+ {
3292
+ "command": "cddl2s",
3293
+ "description": "Convert CDDL schema to JSON Structure",
3294
+ "group": "1_Schemas",
3295
+ "function": {
3296
+ "name": "avrotize.cddltostructure.convert_cddl_to_structure_files",
3297
+ "args": {
3298
+ "cddl_file_path": "input_file_path",
3299
+ "structure_schema_path": "output_file_path",
3300
+ "namespace": "args.namespace"
3301
+ }
3302
+ },
3303
+ "extensions": [
3304
+ ".cddl"
3305
+ ],
3306
+ "args": [
3307
+ {
3308
+ "name": "input",
3309
+ "type": "str",
3310
+ "nargs": "?",
3311
+ "help": "Path to the CDDL schema file (or read from stdin if omitted)",
3312
+ "required": false
3313
+ },
3314
+ {
3315
+ "name": "--out",
3316
+ "type": "str",
3317
+ "help": "Path to the JSON Structure file",
3318
+ "required": false
3319
+ },
3320
+ {
3321
+ "name": "--namespace",
3322
+ "type": "str",
3323
+ "help": "Namespace for the JSON Structure schema",
3324
+ "required": false
3325
+ }
3326
+ ],
3327
+ "suggested_output_file_path": "{input_file_name}.struct.json",
3328
+ "prompts": [
3329
+ {
3330
+ "name": "--namespace",
3331
+ "message": "Enter the namespace for the JSON Structure schema",
3332
+ "type": "str",
3333
+ "required": false
3334
+ }
3335
+ ]
3110
3336
  }
3111
3337
  ]
avrotize/constants.py CHANGED
@@ -1,5 +1,72 @@
1
- """Constants for the avrotize package."""
1
+ """Constants for the avrotize package.
2
2
 
3
- AVRO_VERSION = '1.12.0'
4
- JACKSON_VERSION = '2.18.2'
5
- JDK_VERSION = '21'
3
+ These constants are now derived from central dependency files in avrotize/dependencies/
4
+ which are monitored by Dependabot. This ensures versions stay up-to-date.
5
+ """
6
+
7
+ from avrotize.dependency_version import get_dependency_version
8
+
9
+ # Java/JVM dependencies
10
+ try:
11
+ AVRO_VERSION = get_dependency_version('java', 'jdk21', 'org.apache.avro:avro')
12
+ except ValueError:
13
+ AVRO_VERSION = '1.12.0' # Fallback
14
+
15
+ try:
16
+ JACKSON_VERSION = get_dependency_version('java', 'jdk21', 'com.fasterxml.jackson.core:jackson-core')
17
+ except ValueError:
18
+ JACKSON_VERSION = '2.18.2' # Fallback
19
+
20
+ JDK_VERSION = '21'
21
+
22
+ # C# dependencies
23
+ try:
24
+ CSHARP_AVRO_VERSION = get_dependency_version('cs', 'net90', 'Apache.Avro')
25
+ except ValueError:
26
+ CSHARP_AVRO_VERSION = '1.12.0'
27
+
28
+ try:
29
+ NEWTONSOFT_JSON_VERSION = get_dependency_version('cs', 'net90', 'Newtonsoft.Json')
30
+ except ValueError:
31
+ NEWTONSOFT_JSON_VERSION = '13.0.3'
32
+
33
+ try:
34
+ SYSTEM_TEXT_JSON_VERSION = get_dependency_version('cs', 'net90', 'System.Text.Json')
35
+ except ValueError:
36
+ SYSTEM_TEXT_JSON_VERSION = '9.0.3'
37
+
38
+ try:
39
+ SYSTEM_MEMORY_DATA_VERSION = get_dependency_version('cs', 'net90', 'System.Memory.Data')
40
+ except ValueError:
41
+ SYSTEM_MEMORY_DATA_VERSION = '9.0.3'
42
+
43
+ try:
44
+ NUNIT_VERSION = get_dependency_version('cs', 'net90', 'NUnit')
45
+ except ValueError:
46
+ NUNIT_VERSION = '4.3.2'
47
+
48
+ try:
49
+ NUNIT_ADAPTER_VERSION = get_dependency_version('cs', 'net90', 'NUnit3TestAdapter')
50
+ except ValueError:
51
+ NUNIT_ADAPTER_VERSION = '5.0.0'
52
+
53
+ try:
54
+ MSTEST_SDK_VERSION = get_dependency_version('cs', 'net90', 'Microsoft.NET.Test.Sdk')
55
+ except ValueError:
56
+ MSTEST_SDK_VERSION = '17.13.0'
57
+
58
+ # Java test dependencies
59
+ try:
60
+ JUNIT_VERSION = get_dependency_version('java', 'jdk21', 'org.junit.jupiter:junit-jupiter-api')
61
+ except ValueError:
62
+ JUNIT_VERSION = '5.11.4'
63
+
64
+ try:
65
+ MAVEN_SUREFIRE_VERSION = get_dependency_version('java', 'jdk21', 'org.apache.maven.plugins:maven-surefire-plugin')
66
+ except ValueError:
67
+ MAVEN_SUREFIRE_VERSION = '3.5.2'
68
+
69
+ try:
70
+ MAVEN_COMPILER_VERSION = get_dependency_version('java', 'jdk21', 'org.apache.maven.plugins:maven-compiler-plugin')
71
+ except ValueError:
72
+ MAVEN_COMPILER_VERSION = '3.13.0'
@@ -0,0 +1,19 @@
1
+ {
2
+ "$comment": "Central dependency versions for Avrotize C++ code generation templates. This file is monitored by Dependabot.",
3
+ "name": "avrotize-dependencies",
4
+ "version": "1.0.0",
5
+ "dependencies": [
6
+ {
7
+ "name": "avro-cpp",
8
+ "version>=": "1.11.1"
9
+ },
10
+ {
11
+ "name": "nlohmann-json",
12
+ "version>=": "3.11.3"
13
+ },
14
+ {
15
+ "name": "gtest",
16
+ "version>=": "1.15.2"
17
+ }
18
+ ]
19
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "avrotize-dependencies",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "description": "Central dependency versions for Avrotize TypeScript code generation templates",
6
+ "dependencies": {
7
+ "avsc": "^5.7.7",
8
+ "kafkajs": "^2.2.4"
9
+ },
10
+ "devDependencies": {
11
+ "@types/node": "^24.10.1",
12
+ "typescript": "^5.7.2",
13
+ "jest": "^30.2.0",
14
+ "@types/jest": "^30.0.0"
15
+ }
16
+ }