lutaml-model 0.8.173 → 0.8.174

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a8e957736963670cb6a9f7b12b7ead8c90dc7885fdd1391db380d6863ecee28c
4
- data.tar.gz: 3530f1314b9f1d153ae304c076b3781f62e1f6a34e90754c977e8f4fe6f7693d
3
+ metadata.gz: d5c88e0fabb05c803bd90e90e239491b158506fbc28a400a5c622947c6b6660f
4
+ data.tar.gz: 6963e7357fb635c514dcb65844ca6fba6a72e4db19a254b744dcc43ac38ddade
5
5
  SHA512:
6
- metadata.gz: 266147e6d75bf31c0161bcd25882f4979f6f525cb2bba5926b32c68f4a8db39be3a9e12969b6a7dac6ebbad7efd29db06c7eb14dd8207280a0af3a3c0469e5c5
7
- data.tar.gz: d47a234b59fbce06a92feabb3fd72cf71853550c9f97873b82d122e05e9652638aa7b2822c2a4050efa201625246f0bacae66facb4ed85485dd843947e8aa36e
6
+ metadata.gz: aac56768d97444e04fe6e92ff1c9e4802daf1dc2d974028a972245db3b83b9c77d81993e13733393d2c0b6024329eb31cb4f36b5af1362c88c6faec41c734488
7
+ data.tar.gz: b999e90b67a01d971f782e906863e35c3d17ed6da0fb1f37f2c757d473d27d1b30f7385903dd94d4f0bea8dfc88a3209be24f5b2a45c17a70362c9047912f05e
@@ -1,30 +1,30 @@
1
1
  {
2
2
  "complex1-46KB": {
3
- "avg_time": 0.03734036433333188,
4
- "min_time": 0.0371666289999979,
5
- "max_time": 0.03745624500000133,
3
+ "avg_time": 0.05412612500000099,
4
+ "min_time": 0.0533452209999723,
5
+ "max_time": 0.05472530600002301,
6
6
  "allocations": 51133,
7
- "ips": 26.780670672443065
7
+ "ips": 18.475366562819374
8
8
  },
9
9
  "complex4-50KB": {
10
- "avg_time": 0.052592221666666696,
11
- "min_time": 0.05142729300000326,
12
- "max_time": 0.053059656000002065,
10
+ "avg_time": 0.07426971533332487,
11
+ "min_time": 0.07386825400004682,
12
+ "max_time": 0.07480207200001132,
13
13
  "allocations": 71910,
14
- "ips": 19.01421861084463
14
+ "ips": 13.464438304522481
15
15
  },
16
16
  "size1000-245KB": {
17
- "avg_time": 0.30391380833333415,
18
- "min_time": 0.2985424360000053,
19
- "max_time": 0.30682469100000276,
17
+ "avg_time": 0.4342841280000016,
18
+ "min_time": 0.4245886159999941,
19
+ "max_time": 0.443060408000008,
20
20
  "allocations": 406451,
21
- "ips": 3.2904065974626433
21
+ "ips": 2.302639989642901
22
22
  },
23
23
  "complex3-567KB": {
24
- "avg_time": 0.4150900423333326,
25
- "min_time": 0.41338928599999747,
26
- "max_time": 0.41597578200000385,
24
+ "avg_time": 0.6035884146666604,
25
+ "min_time": 0.5935764820000031,
26
+ "max_time": 0.6103887489999806,
27
27
  "allocations": 587536,
28
- "ips": 2.4091158496087535
28
+ "ips": 1.6567581081758556
29
29
  }
30
30
  }
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "metrology-4KB": {
3
- "avg_time": 0.010063263333345654,
4
- "min_time": 0.009257001000008813,
5
- "max_time": 0.011522572000018272,
3
+ "avg_time": 0.00901943666666701,
4
+ "min_time": 0.008446076000012681,
5
+ "max_time": 0.009944491999988259,
6
6
  "allocations": 7544,
7
- "ips": 99.37134375549903
7
+ "ips": 110.87166936885141
8
8
  },
9
9
  "bmj-49KB": {
10
- "avg_time": 0.09440573666664893,
11
- "min_time": 0.09292815799997811,
12
- "max_time": 0.09535357799998678,
10
+ "avg_time": 0.08010254133333206,
11
+ "min_time": 0.07855880500000012,
12
+ "max_time": 0.08229944900000419,
13
13
  "allocations": 72378,
14
- "ips": 10.592576630497009
14
+ "ips": 12.483998426949816
15
15
  },
16
16
  "pnas-152KB": {
17
- "avg_time": 0.4268490719999913,
18
- "min_time": 0.4227435029999924,
19
- "max_time": 0.43070350499999677,
17
+ "avg_time": 0.37417935833332194,
18
+ "min_time": 0.3672698569999966,
19
+ "max_time": 0.37714925399998833,
20
20
  "allocations": 259437,
21
- "ips": 2.342748445755132
21
+ "ips": 2.6725151394086044
22
22
  }
23
23
  }
@@ -1,30 +1,30 @@
1
1
  {
2
2
  "feature-doc-23KB": {
3
- "avg_time": 0.05483059733333562,
4
- "min_time": 0.05375416399999722,
5
- "max_time": 0.0561208400000055,
3
+ "avg_time": 0.06622223333332992,
4
+ "min_time": 0.06541184899998598,
5
+ "max_time": 0.06742671500001052,
6
6
  "allocations": 32998,
7
- "ips": 18.237992081695328
7
+ "ips": 15.100668607271146
8
8
  },
9
9
  "tbx-nisosts-101KB": {
10
- "avg_time": 0.15503678066666757,
11
- "min_time": 0.15244913000000793,
12
- "max_time": 0.15633518299998173,
10
+ "avg_time": 0.18845745966666527,
11
+ "min_time": 0.1869356610000068,
12
+ "max_time": 0.18972858899999778,
13
13
  "allocations": 134786,
14
- "ips": 6.450082333365923
14
+ "ips": 5.306237289671383
15
15
  },
16
16
  "iso-13849-1MB": {
17
- "avg_time": 5.312145330333332,
18
- "min_time": 5.289715321000017,
19
- "max_time": 5.352490981999978,
17
+ "avg_time": 7.070507873666647,
18
+ "min_time": 7.02138297999997,
19
+ "max_time": 7.105545188000008,
20
20
  "allocations": 1733464,
21
- "ips": 0.18824786179885084
21
+ "ips": 0.1414325558881553
22
22
  },
23
23
  "din-iso-1.1MB": {
24
- "avg_time": 0.6096079980000013,
25
- "min_time": 0.5997889989999976,
26
- "max_time": 0.6157538460000183,
24
+ "avg_time": 0.7734601796666615,
25
+ "min_time": 0.7701626870000098,
26
+ "max_time": 0.7775508419999824,
27
27
  "allocations": 883501,
28
- "ips": 1.6403984253500523
28
+ "ips": 1.292891381209787
29
29
  }
30
30
  }
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "800-expressions": {
3
- "avg_time": 0.27309784533332504,
4
- "min_time": 0.2719493029999853,
5
- "max_time": 0.2746361779999802,
3
+ "avg_time": 0.3305013003333386,
4
+ "min_time": 0.32859900500000094,
5
+ "max_time": 0.331687751000004,
6
6
  "allocations": 134002,
7
- "ips": 3.661691284233556
7
+ "ips": 3.0257067036995475
8
8
  }
9
9
  }
@@ -1,30 +1,30 @@
1
1
  {
2
2
  "ea251": {
3
- "avg_time": 0.24634261099998866,
4
- "min_time": 0.24230798000002096,
5
- "max_time": 0.25200138399998195,
6
- "allocations": 183151,
7
- "ips": 4.059387029879479
3
+ "avg_time": 0.17868011099999612,
4
+ "min_time": 0.17459571999998502,
5
+ "max_time": 0.18370481700000596,
6
+ "allocations": 183152,
7
+ "ips": 5.596593792131804
8
8
  },
9
9
  "medium": {
10
- "avg_time": 0.6121852393333332,
11
- "min_time": 0.6060158389999799,
12
- "max_time": 0.623339054000013,
10
+ "avg_time": 0.44010202266666926,
11
+ "min_time": 0.43002588400000263,
12
+ "max_time": 0.4478196080000032,
13
13
  "allocations": 474403,
14
- "ips": 1.633492504799683
14
+ "ips": 2.272200418304813
15
15
  },
16
16
  "citygml": {
17
- "avg_time": 0.6913046006666642,
18
- "min_time": 0.6854582240000013,
19
- "max_time": 0.7006513389999895,
17
+ "avg_time": 0.5005277433333314,
18
+ "min_time": 0.49570570700001326,
19
+ "max_time": 0.5039381569999932,
20
20
  "allocations": 586804,
21
- "ips": 1.4465403514393558
21
+ "ips": 1.9978912524216268
22
22
  },
23
23
  "large": {
24
- "avg_time": 5.741814371333343,
25
- "min_time": 5.667766696000001,
26
- "max_time": 5.879655317000015,
24
+ "avg_time": 4.091806745666673,
25
+ "min_time": 4.049281349000012,
26
+ "max_time": 4.164525467999994,
27
27
  "allocations": 4531263,
28
- "ips": 0.17416097688434737
28
+ "ips": 0.24439081856908937
29
29
  }
30
30
  }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lutaml
4
4
  module Model
5
- VERSION = "0.8.173"
5
+ VERSION = "0.8.174"
6
6
  end
7
7
  end
@@ -90,17 +90,16 @@ module Lutaml
90
90
  end
91
91
  private_class_method :syntax_error
92
92
 
93
- def to_yaml(_options = {})
94
- attributes_to_serialize = @attributes
95
-
96
- # Generation must match the standard (Psych) adapter's output
97
- # byte-for-byte: document separator, quoting of digit-leading
98
- # strings, flow styles. The neutral Yeptris::YAML.dump is
99
- # deliberately headerless, so parity goes through the
100
- # Psych-compatible face of the same engine.
101
- require "yeptris/psych"
102
- Yeptris::Psych.dump(attributes_to_serialize)
103
- end
93
+ # Dump rides the inherited standard (Psych) adapter — this class
94
+ # does not override #to_yaml. The native Yeptris::Psych.dump
95
+ # does not fold long plain scalars at Psych's 80-column
96
+ # boundary, so an override here changes every stored fixture's
97
+ # byte format the moment the native lane is selected (the
98
+ # 0.8.171 default-flip broke relaton's SAE round-trip spec
99
+ # exactly this way: parse parity landed in yeptris 0.6.57+,
100
+ # dump folding did not — yeptris#863's remaining scope). Parse
101
+ # keeps the native lane, where the parity is real; generation
102
+ # returns here when the engine folds at parity.
104
103
  end
105
104
  end
106
105
  end
@@ -55,6 +55,33 @@ RSpec.describe Lutaml::Yaml::Adapter::YeptrisAdapter do
55
55
  it "serializes a hash to YAML that parses back identically" do
56
56
  expect(described_class.parse(document.to_yaml)).to eq(attributes)
57
57
  end
58
+
59
+ # Dump parity with the standard adapter is the contract: a stored
60
+ # fixture generated under one adapter must round-trip byte-exactly
61
+ # under the other, or a host whose bundle flips the default engine
62
+ # rewrites every stored YAML (relaton's SAE suite caught the
63
+ # 0.8.171 default flip this way — the native emitter does not fold
64
+ # long plain scalars at Psych's 80-column boundary, so generation
65
+ # rides the standard adapter until the engine folds at parity).
66
+ describe "byte parity with the standard adapter" do
67
+ let(:long_scalar) do
68
+ "Taxonomy and Definitions for Terms Related to Driving Automation " \
69
+ "Systems for On-Road Motor Vehicles for On-Road Motor Vehicles"
70
+ end
71
+ let(:wrapped_attributes) do
72
+ { "title" => long_scalar, "roles" => %w[admin dev] }
73
+ end
74
+
75
+ it "folds long plain scalars exactly like the standard adapter" do
76
+ standard = Lutaml::Yaml::Adapter::StandardAdapter.new(wrapped_attributes).to_yaml
77
+ expect(described_class.new(wrapped_attributes).to_yaml).to eq(standard)
78
+ end
79
+
80
+ it "parses the standard adapter's folded dump back identically" do
81
+ standard = Lutaml::Yaml::Adapter::StandardAdapter.new(wrapped_attributes).to_yaml
82
+ expect(described_class.parse(standard)).to eq(wrapped_attributes)
83
+ end
84
+ end
58
85
  end
59
86
 
60
87
  describe "round trip through a model" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.173
4
+ version: 0.8.174
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-11-10 00:00:00.000000000 Z
11
+ date: 2026-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64