From 58f7e0086d6718fa064546207475a8e4925a2078 Mon Sep 17 00:00:00 2001 From: Adam Chalmers Date: Tue, 29 Oct 2024 09:39:50 -0500 Subject: [PATCH] Fix CI docs generation after #4329 (#4347) Fix CI --- docs/kcl/std.json | 276 +++++++++++------------------ src/wasm-lib/justfile | 3 + src/wasm-lib/kcl/src/std/assert.rs | 2 +- 3 files changed, 112 insertions(+), 169 deletions(-) diff --git a/docs/kcl/std.json b/docs/kcl/std.json index 058d12394..f26541e27 100644 --- a/docs/kcl/std.json +++ b/docs/kcl/std.json @@ -120863,34 +120863,6 @@ "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", - "oneOf": [ - { - "description": "The path the tag is on.", - "type": "object", - "required": [ - "path" - ], - "properties": { - "path": { - "$ref": "#/components/schemas/Path" - } - }, - "additionalProperties": false - }, - { - "description": "The surface information for the tag.", - "type": "object", - "required": [ - "surface" - ], - "properties": { - "surface": { - "$ref": "#/components/schemas/ExtrudeSurface" - } - }, - "additionalProperties": false - } - ], "required": [ "id", "sketch" @@ -120905,6 +120877,24 @@ "description": "The sketch the tag is on.", "type": "string", "format": "uuid" + }, + "path": { + "description": "The path the tag is on.", + "allOf": [ + { + "$ref": "#/components/schemas/Path" + } + ], + "nullable": true + }, + "surface": { + "description": "The surface information for the tag.", + "allOf": [ + { + "$ref": "#/components/schemas/ExtrudeSurface" + } + ], + "nullable": true } } }, @@ -122193,34 +122183,6 @@ "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", - "oneOf": [ - { - "description": "The path the tag is on.", - "type": "object", - "required": [ - "path" - ], - "properties": { - "path": { - "$ref": "#/components/schemas/Path" - } - }, - "additionalProperties": false - }, - { - "description": "The surface information for the tag.", - "type": "object", - "required": [ - "surface" - ], - "properties": { - "surface": { - "$ref": "#/components/schemas/ExtrudeSurface" - } - }, - "additionalProperties": false - } - ], "required": [ "id", "sketch" @@ -122235,6 +122197,24 @@ "description": "The sketch the tag is on.", "type": "string", "format": "uuid" + }, + "path": { + "description": "The path the tag is on.", + "allOf": [ + { + "$ref": "#/components/schemas/Path" + } + ], + "nullable": true + }, + "surface": { + "description": "The surface information for the tag.", + "allOf": [ + { + "$ref": "#/components/schemas/ExtrudeSurface" + } + ], + "nullable": true } } }, @@ -123571,34 +123551,6 @@ "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", - "oneOf": [ - { - "description": "The path the tag is on.", - "type": "object", - "required": [ - "path" - ], - "properties": { - "path": { - "$ref": "#/components/schemas/Path" - } - }, - "additionalProperties": false - }, - { - "description": "The surface information for the tag.", - "type": "object", - "required": [ - "surface" - ], - "properties": { - "surface": { - "$ref": "#/components/schemas/ExtrudeSurface" - } - }, - "additionalProperties": false - } - ], "required": [ "id", "sketch" @@ -123613,6 +123565,24 @@ "description": "The sketch the tag is on.", "type": "string", "format": "uuid" + }, + "path": { + "description": "The path the tag is on.", + "allOf": [ + { + "$ref": "#/components/schemas/Path" + } + ], + "nullable": true + }, + "surface": { + "description": "The surface information for the tag.", + "allOf": [ + { + "$ref": "#/components/schemas/ExtrudeSurface" + } + ], + "nullable": true } } }, @@ -128381,34 +128351,6 @@ "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", - "oneOf": [ - { - "description": "The path the tag is on.", - "type": "object", - "required": [ - "path" - ], - "properties": { - "path": { - "$ref": "#/components/schemas/Path" - } - }, - "additionalProperties": false - }, - { - "description": "The surface information for the tag.", - "type": "object", - "required": [ - "surface" - ], - "properties": { - "surface": { - "$ref": "#/components/schemas/ExtrudeSurface" - } - }, - "additionalProperties": false - } - ], "required": [ "id", "sketch" @@ -128423,6 +128365,24 @@ "description": "The sketch the tag is on.", "type": "string", "format": "uuid" + }, + "path": { + "description": "The path the tag is on.", + "allOf": [ + { + "$ref": "#/components/schemas/Path" + } + ], + "nullable": true + }, + "surface": { + "description": "The surface information for the tag.", + "allOf": [ + { + "$ref": "#/components/schemas/ExtrudeSurface" + } + ], + "nullable": true } } }, @@ -132612,34 +132572,6 @@ "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", - "oneOf": [ - { - "description": "The path the tag is on.", - "type": "object", - "required": [ - "path" - ], - "properties": { - "path": { - "$ref": "#/components/schemas/Path" - } - }, - "additionalProperties": false - }, - { - "description": "The surface information for the tag.", - "type": "object", - "required": [ - "surface" - ], - "properties": { - "surface": { - "$ref": "#/components/schemas/ExtrudeSurface" - } - }, - "additionalProperties": false - } - ], "required": [ "id", "sketch" @@ -132654,6 +132586,24 @@ "description": "The sketch the tag is on.", "type": "string", "format": "uuid" + }, + "path": { + "description": "The path the tag is on.", + "allOf": [ + { + "$ref": "#/components/schemas/Path" + } + ], + "nullable": true + }, + "surface": { + "description": "The surface information for the tag.", + "allOf": [ + { + "$ref": "#/components/schemas/ExtrudeSurface" + } + ], + "nullable": true } } }, @@ -136448,34 +136398,6 @@ "TagEngineInfo": { "description": "Engine information for a tag.", "type": "object", - "oneOf": [ - { - "description": "The path the tag is on.", - "type": "object", - "required": [ - "path" - ], - "properties": { - "path": { - "$ref": "#/components/schemas/Path" - } - }, - "additionalProperties": false - }, - { - "description": "The surface information for the tag.", - "type": "object", - "required": [ - "surface" - ], - "properties": { - "surface": { - "$ref": "#/components/schemas/ExtrudeSurface" - } - }, - "additionalProperties": false - } - ], "required": [ "id", "sketch" @@ -136490,6 +136412,24 @@ "description": "The sketch the tag is on.", "type": "string", "format": "uuid" + }, + "path": { + "description": "The path the tag is on.", + "allOf": [ + { + "$ref": "#/components/schemas/Path" + } + ], + "nullable": true + }, + "surface": { + "description": "The surface information for the tag.", + "allOf": [ + { + "$ref": "#/components/schemas/ExtrudeSurface" + } + ], + "nullable": true } } }, diff --git a/src/wasm-lib/justfile b/src/wasm-lib/justfile index 181182515..d02337af9 100644 --- a/src/wasm-lib/justfile +++ b/src/wasm-lib/justfile @@ -5,3 +5,6 @@ new-test name: lint: cargo clippy --all --tests --benches -- -D warnings + +redo-kcl-stdlib-docs: + EXPECTORATE=overwrite cargo nextest run -p kcl-lib docs::gen_std_tests::test_generate_stdlib diff --git a/src/wasm-lib/kcl/src/std/assert.rs b/src/wasm-lib/kcl/src/std/assert.rs index c5b0caccf..f4cb15c35 100644 --- a/src/wasm-lib/kcl/src/std/assert.rs +++ b/src/wasm-lib/kcl/src/std/assert.rs @@ -80,7 +80,7 @@ pub async fn assert_gt(_exec_state: &mut ExecState, args: Args) -> Result Result<(), KclError> { if epsilon <= 0.0 { Err(KclError::Type(KclErrorDetails { - message: format!("assertEqual epsilon must be greater than zero"), + message: "assertEqual epsilon must be greater than zero".to_owned(), source_ranges: vec![args.source_range], })) } else if (right - left).abs() < epsilon {