From b91eb15a265991e980eb37276a3320dca4f907a4 Mon Sep 17 00:00:00 2001 From: James R Swift Date: Fri, 7 Jun 2024 20:33:28 +0100 Subject: [PATCH 1/6] Optionally make `either` apply strict mid parse --- src/base-type.typ | 1 + src/types/logical.typ | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/base-type.typ b/src/base-type.typ index 02bfa72..38b2db7 100644 --- a/src/base-type.typ +++ b/src/base-type.typ @@ -111,6 +111,7 @@ } ctx.outcome = display assert(ctx.soft-error, message: display) + return none }, ) } diff --git a/src/types/logical.typ b/src/types/logical.typ index f0553c0..de30287 100644 --- a/src/types/logical.typ +++ b/src/types/logical.typ @@ -5,7 +5,10 @@ /// Valkyrie schema generator for objects that can be any of multiple types. /// /// -> schema -#let either(..args) = { +#let either( + strict: false, + ..args +) = { assert( args.pos().len() > 0, @@ -13,16 +16,18 @@ ) assert-base-type-array(args.pos(), scope: ("arguments",)) - base-type() + ( + base-type( name: "[" + args.pos().map(it => it.name).join(", ", last: " or ") + "]", ..args.named(), + ) + ( + strict: strict, options: args.pos(), handle-descendents: (self, it, ctx: z-ctx(), scope: ()) => { for option in self.options { let ret = (option.validate)( option, it, - ctx: z-ctx(ctx, soft-error: true), + ctx: z-ctx(ctx, strict: self.strict, soft-error: true), scope: scope, ) if ret != none { From 8a1c3b8a8be19ad125a399e722abd275bb11c25f Mon Sep 17 00:00:00 2001 From: James R Swift Date: Fri, 7 Jun 2024 20:54:22 +0100 Subject: [PATCH 2/6] `strict` requires dictionary to match exactly --- src/types/dictionary.typ | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/types/dictionary.typ b/src/types/dictionary.typ index 3870653..8c016c2 100644 --- a/src/types/dictionary.typ +++ b/src/types/dictionary.typ @@ -46,6 +46,17 @@ return none } + // Check `it` if strict + if ( ctx.strict == true ){ + for (key, value) in it{ + if (key not in self.dictionary-schema){ + return (self.fail-validation)( + self, it, ctx: ctx, scope: scope, message: "Unknown key `" + key + "` in dictionary") + } + } + } + + for (key, schema) in self.dictionary-schema { let entry = ( From 7b778b67a7ff230700b93819007b8478b9c70010 Mon Sep 17 00:00:00 2001 From: James R Swift Date: Fri, 7 Jun 2024 20:56:00 +0100 Subject: [PATCH 3/6] Dictionaries no longer store `none` --- src/schemas/author.typ | 2 +- src/types/dictionary.typ | 2 +- tests/contexts/remove-optional-none/ref/1.png | Bin 11298 -> 6910 bytes tests/logical/ref/1.png | Bin 16218 -> 18918 bytes tests/logical/test.typ | 20 ++++++++++++++++-- tests/schemas/author/ref/1.png | Bin 35500 -> 21137 bytes tests/schemas/author/test.typ | 2 ++ 7 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/schemas/author.typ b/src/schemas/author.typ index b83ef3a..d2094e4 100644 --- a/src/schemas/author.typ +++ b/src/schemas/author.typ @@ -32,7 +32,7 @@ ), pre-transform: coerce.dictionary(it => (name: it)), post-transform: (self, it) => { - if (it.at("email", default: none) != none and it.corresponding == none) { + if (it.at("email", default: none) != none and "corresponding" not in it) { it.insert("corresponding", true) } return it diff --git a/src/types/dictionary.typ b/src/types/dictionary.typ index 8c016c2..1d4f02a 100644 --- a/src/types/dictionary.typ +++ b/src/types/dictionary.typ @@ -68,7 +68,7 @@ scope: (..scope, str(key)) ) - it.insert(key, entry) + if ( entry != none ) { it.insert(key, entry) } if ( entry == none and ( diff --git a/tests/contexts/remove-optional-none/ref/1.png b/tests/contexts/remove-optional-none/ref/1.png index 04d2352db7874b6246b77b446b5394d69dfcd78f..9dc1cbe2bd1a5d9c4a0fafc3dd2fd141eeab7df9 100644 GIT binary patch literal 6910 zcmeHsRaBhI^6wzQJrEcqXmA-MxCDm;4IXrW4DK3Shu|KD03m_k&fpLT3=&{Su;2`q z;O-j!bM`rV-}7|uTKDm;+pDTqt?GK{{(WCnbydgeXsHqt&=LRu0Ah7DrI!EzrV;>v z@d6JMt!a_QRt5lQ`_z@>_5J5|e|{q9(V+}m`Es8QBYHFptK@uF$7Jy!US4;`SCETm znu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>!jKm^M-Iw4W$tujd^;#lPj#5eb_=nV{-TnQNSMFCT6Xh6~2|ChA;Y zVz5|D%@A-oa4!N~GWltH9G?$$&h_bFepC{z8yV5sA8NFfueJbToMOV?7#-4?2z~jX zHxX7-QQ^|=A8V==Oi#%+&w)GI*qjD~4fIt%nfN;BPOE(C%hsffFYP4P*$chP_T@ntz+Q7rDFJIB{-nPQCE$eSLinAo{t%$G$u>LJOre^4Hbw!kU`2 zspSXS7NN0#vmeO0rKL|pvbDngwRl|l2|;e%hJFUq6)S2y4aI){I&cXZ6m|Am*~G1o zvZ<`MvfmscqUlyCU61(Zv>?uPJ*^c+$pCMc+p|jc)_u!*@F+-^qm)ixuA^b+F_l-< zwZjJNQepF-P5-BUU4o76?fRUUw6xPN0|}FrH7nbzGn=r_=NFVH-Q7`b&v$fo9>A?6 zuus3pg1Bl6J0?TV5xZhT;RPYZhDk^D0GElP)gwtZ7@CkVR@p<3atQr_eCuQZlvGozsjf~vn%5w7SnKQrek>As1JZwP5U4dMD+tMMhaQT( z+b8n23r1pH;SekwF2bI!DNY6{k6f{$M~-5J;Ub)~W*k_hBSP2~ww(h%i*BxSrX04Z zfau-QqRM=E_P&+LHc5vqfft`Ol+&TK^;9Z#eqD#rPZX{{;yD$m(G(Adyp> Um5{Hi#?BL9YGiI$rtcE=iev?zNF+NchUgfQy*CQAcd@eQ7QrW}W;} znrHHQ8=lGcbyz3wwoxZbr-a~#{QZ5bKu0jN{ETM5)OJC9;!d5(@{FvL*%?ny?6hKj h@JnT~p@)Ll4X($scTYc{30L|y;@ diff --git a/tests/logical/test.typ b/tests/logical/test.typ index 168d900..66f5026 100644 --- a/tests/logical/test.typ +++ b/tests/logical/test.typ @@ -3,11 +3,10 @@ #show: show-rule.with(); -#let schema = z.either(z.email(), z.ip()) - = logical/either == Input types #{ + let schema = z.either(z.email(), z.ip()) let input-types = ( "ip (1.1.1.1)": "1.1.1.1", "email": "test@hello.wor.ld", @@ -20,4 +19,21 @@ truth: value, )([It should validate #name]) } +} + +#{ + let schema = z.either( + strict: true, + z.dictionary(( + seed: z.integer() + )), + z.dictionary(( + dynamic: z.boolean() + )), + ) + + z.parse( + (dynamic: false), + schema + ) } \ No newline at end of file diff --git a/tests/schemas/author/ref/1.png b/tests/schemas/author/ref/1.png index 152a8d1988c3555c53eb7cd0147e319a77237ce5..132d219077df5cb339f969e7e216125346e7ce52 100644 GIT binary patch delta 7218 zcmbtZ2T)W?vtBX+A|g?c6+}cua+I(L2$G{DkqjakB*StLBufw^=L`aplY}MbAS^*7 z=bTwqmh_JIdjD7dtG`~=t9NSaRP}66&(}RY-93GZVz58uU`0}s-Xg??Kp?N*uD^po z)U?a)Gw|u2o$N;G(Gb|vhp~@-H_OjS-(j;ErWhU_C6khpl)TP|`|P{68X}P5LD@2*lN|U-_NE9mdjG!)r%e5ulWG3}+hVqG_aR zYR8mYhm|6Lech#g!|5BK$FBSuj`9$Vk#l}}hfgVM_yse0f`T-I_yqw&M3*6_6w^(< z_qlJWsi})_K{+b$cx5XqD>NFdl=sfWq%B<-2D>6^jfjX?Sux8}YKr%7TR?nivfzEB zcpu$cdU$VrYU)+Vgu3zf1T8HsVq#+al#e_vKzfJqrz4MWr6mA^@qoi$E1n!4mem>utsOl z)?8Da85SENC0is_Etkz&7KvA0%CrJa2eK)2Fw{jsDQcVL8ro#RqcLim)6qSOdeN^m zSC4eXhBkCk2I`NTnm|8r8{9-%R-O0S3o>Uau(SPYyJ|8 zQOXA?U9$@t_JUGzhf`5K%r_PD)Gs+=#jB~PtD{BF7ms~8M+8mv~JQ8)&C zdcmAD;C+4ftZnvAB|Ui;7QJ2aoootH(rl^P7d;)%9voPQI>y&+OM;Wsb|q!rLjAskO{nZQM2ANm-XcD276AXD^p!s`87edY3I3x0fcd>XM`m(amS~j6g<~DzOvRX2mF`ZT zE36m*kxyFl(~z)`2RqiCFQuY;OfwA_LOYIYHk@=-DHM_IbTM+z5ia#JA#<5P#h7KW zX5nJOjBTF4f}02x$7i|wvQZw53`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GZ2F17L`+0^~v5PO(? zkHxO*AyE=9$GHOq5`M3FyNCT`vSY=K_uQuT|FE{P8{khBWF1<08KzBMWQQ1!feu>- zGyqxDjLd@LDspB~k&V1yJ=Gkn7rdlRoe^jryW9=@x{N<&r+9D54;rA?2>`=$CLgvU z44VK#8K9Cb<2h1X4)XWUVRxRA>3!~v0y|a70*(Fmx{oIE`)W&kGo>G3XV~;5JoVc{ zc-`!{VBKsCxR0pxkg+AfZ`NZ3j8&0i0J*_Z0QpTooC6Wm#PV(CLo#@d5nN@Lt6Jit z9XC2$g|E{>w?gakz`eE(`m5UJJ$ZYQkMEXEHrdSuT|LeSkOz`o%579+lK!8SMYA+4 z7E5EI-a_%&%h4C+A<6emvW`{co3;OId$A{g=WYFa3D- jvx@(h1_|K#j>10#GAfs@=BEwXGMi{@fJPDZ9i#pWCgW-= diff --git a/tests/schemas/author/test.typ b/tests/schemas/author/test.typ index f40f459..a1e846c 100644 --- a/tests/schemas/author/test.typ +++ b/tests/schemas/author/test.typ @@ -12,7 +12,9 @@ ( name: "James R Swift", email: "hello@world.com", + // test: true, ), z.schemas.author, + ctx: z.z-ctx(strict: true) ) ] From 7ebcdaa306b67567d67a7e7077e9444515bb3b40 Mon Sep 17 00:00:00 2001 From: James R Swift Date: Fri, 7 Jun 2024 20:56:17 +0100 Subject: [PATCH 4/6] logical now properly returns `none` on failure --- src/types/logical.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/logical.typ b/src/types/logical.typ index de30287..681388d 100644 --- a/src/types/logical.typ +++ b/src/types/logical.typ @@ -42,7 +42,7 @@ ) + ". Got " + type(it) ) - (self.fail-validation)(self, it, ctx: ctx, scope: scope, message: message) + return (self.fail-validation)(self, it, ctx: ctx, scope: scope, message: message) }, ) } From 9de14a90aa71ab85ca03dac25adedb2226317553 Mon Sep 17 00:00:00 2001 From: James R Swift Date: Fri, 7 Jun 2024 20:57:49 +0100 Subject: [PATCH 5/6] Remove dead code --- src/types/dictionary.typ | 11 ----------- tests/types/tuple/test.typ | 6 +++++- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/types/dictionary.typ b/src/types/dictionary.typ index 1d4f02a..9620fea 100644 --- a/src/types/dictionary.typ +++ b/src/types/dictionary.typ @@ -70,17 +70,6 @@ if ( entry != none ) { it.insert(key, entry) } - if ( - entry == none and ( - it.at( - key, - default: none, - ) != none or ctx.remove-optional-none == true - ) - ) { - it.remove(key, default: none) - } - } return it }, diff --git a/tests/types/tuple/test.typ b/tests/types/tuple/test.typ index 82e03d9..4dc809e 100644 --- a/tests/types/tuple/test.typ +++ b/tests/types/tuple/test.typ @@ -2,7 +2,11 @@ #set page(height: 1cm, width: 1cm) #{ - let test-tuple = ("123", "email@address.co.uk", 1.1) + let test-tuple = ( + "123", + "email@address.co.uk", + // 1.1 + ) z.parse( test-tuple, From f365311642db7df2babc72ddb5276f3af9046162 Mon Sep 17 00:00:00 2001 From: James R Swift Date: Fri, 7 Jun 2024 20:58:14 +0100 Subject: [PATCH 6/6] style --- src/types/dictionary.typ | 19 +++++++++++++------ src/types/logical.typ | 10 ++++++++-- tests/logical/test.typ | 6 +++--- tests/schemas/author/test.typ | 2 +- tests/types/string/test.typ | 4 ++-- tests/types/tuple/test.typ | 4 ++-- 6 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/types/dictionary.typ b/src/types/dictionary.typ index 9620fea..3bc9a8a 100644 --- a/src/types/dictionary.typ +++ b/src/types/dictionary.typ @@ -47,15 +47,20 @@ } // Check `it` if strict - if ( ctx.strict == true ){ - for (key, value) in it{ - if (key not in self.dictionary-schema){ + if (ctx.strict == true) { + for (key, value) in it { + if (key not in self.dictionary-schema) { return (self.fail-validation)( - self, it, ctx: ctx, scope: scope, message: "Unknown key `" + key + "` in dictionary") + self, + it, + ctx: ctx, + scope: scope, + message: "Unknown key `" + key + "` in dictionary", + ) } } } - + for (key, schema) in self.dictionary-schema { @@ -68,7 +73,9 @@ scope: (..scope, str(key)) ) - if ( entry != none ) { it.insert(key, entry) } + if (entry != none) { + it.insert(key, entry) + } } return it diff --git a/src/types/logical.typ b/src/types/logical.typ index 681388d..73e72e6 100644 --- a/src/types/logical.typ +++ b/src/types/logical.typ @@ -7,7 +7,7 @@ /// -> schema #let either( strict: false, - ..args + ..args, ) = { assert( @@ -42,7 +42,13 @@ ) + ". Got " + type(it) ) - return (self.fail-validation)(self, it, ctx: ctx, scope: scope, message: message) + return (self.fail-validation)( + self, + it, + ctx: ctx, + scope: scope, + message: message, + ) }, ) } diff --git a/tests/logical/test.typ b/tests/logical/test.typ index 66f5026..08af95a 100644 --- a/tests/logical/test.typ +++ b/tests/logical/test.typ @@ -25,15 +25,15 @@ let schema = z.either( strict: true, z.dictionary(( - seed: z.integer() + seed: z.integer(), )), z.dictionary(( - dynamic: z.boolean() + dynamic: z.boolean(), )), ) z.parse( (dynamic: false), - schema + schema, ) } \ No newline at end of file diff --git a/tests/schemas/author/test.typ b/tests/schemas/author/test.typ index a1e846c..a090d3a 100644 --- a/tests/schemas/author/test.typ +++ b/tests/schemas/author/test.typ @@ -15,6 +15,6 @@ // test: true, ), z.schemas.author, - ctx: z.z-ctx(strict: true) + ctx: z.z-ctx(strict: true), ) ] diff --git a/tests/types/string/test.typ b/tests/types/string/test.typ index 7774c0d..aa7dc89 100644 --- a/tests/types/string/test.typ +++ b/tests/types/string/test.typ @@ -47,9 +47,9 @@ #z.parse("192.168.0.1", z.ip()) == default -#let _ = z.parse(none, z.string(default: "Hello")) +#let _ = z.parse(none, z.string(default: "Hello")) #let _ = z.parse(auto, z.string(default: "Hello")) #let _ = z.parse(auto, z.string(default: "Hello", optional: true)) #let _ = repr(z.parse(auto, z.string(optional: true))) -// #z.parse(auto, z.string()) \ +// #z.parse(auto, z.string()) \ #let _ = z.parse("none", z.string(default: "Hello")) \ No newline at end of file diff --git a/tests/types/tuple/test.typ b/tests/types/tuple/test.typ index 4dc809e..adf98d3 100644 --- a/tests/types/tuple/test.typ +++ b/tests/types/tuple/test.typ @@ -3,8 +3,8 @@ #{ let test-tuple = ( - "123", - "email@address.co.uk", + "123", + "email@address.co.uk", // 1.1 )