From dfbfc89945043f404699a1171ea9a7543572dfd3 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 17 Nov 2026 19:14:42 +0100 Subject: [PATCH] Split bundled palettes into video-game and classic theme packs --- Cargo.lock | 2 +- Cargo.toml | 2 +- crates/canvas-pilot/src/theme_packs.rs | 61 +++++++++++++++---------- docs/canvas-pilot/changelog.md | 8 ++++ docs/canvas-pilot/guide/theme-packs.md | 53 ++++++++++++++------- docs/interfaces/theme-packs.md | 34 ++++++++------ docs/theme-packs/classic-themes.zip | Bin 0 -> 30835 bytes docs/theme-packs/extra-themes.zip | Bin 34975 -> 0 bytes docs/theme-packs/video-game-themes.zip | Bin 0 -> 5227 bytes scripts/build-theme-packs.py | 33 ++++++++----- tests/test_theme_packs.py | 49 ++++++++++++-------- 11 files changed, 154 insertions(+), 88 deletions(-) create mode 100644 docs/theme-packs/classic-themes.zip delete mode 100644 docs/theme-packs/extra-themes.zip create mode 100644 docs/theme-packs/video-game-themes.zip diff --git a/Cargo.lock b/Cargo.lock index 4b383ea..9f1f9c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -548,7 +548,7 @@ dependencies = [ [[package]] name = "canvas-pilot" -version = "0.9.44" +version = "0.9.45" dependencies = [ "base64", "craft-dwg", diff --git a/Cargo.toml b/Cargo.toml index dbccdd6..d3d2b3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ default-members = ["crates/canvas-pilot"] resolver = "3" [workspace.package] -version = "0.9.44" +version = "0.9.45" edition = "2024" license = "MIT" repository = "https://proxy.dandaedre.com/gitea/idle-org/canvas-pilot" diff --git a/crates/canvas-pilot/src/theme_packs.rs b/crates/canvas-pilot/src/theme_packs.rs index 6c7f349..727bf06 100644 --- a/crates/canvas-pilot/src/theme_packs.rs +++ b/crates/canvas-pilot/src/theme_packs.rs @@ -470,20 +470,31 @@ mod tests { assert_eq!(Theme::current(&ctx), missing); } #[test] - fn complete_collection_imports_every_theme_and_survives_restart() { - let bytes = include_bytes!("../../../docs/theme-packs/extra-themes.zip"); + fn categorized_collections_coexist_and_survive_restart() { + let collections: [(&str, &[u8]); 2] = [ + ( + "video-game-themes", + include_bytes!("../../../docs/theme-packs/video-game-themes.zip"), + ), + ( + "classic-themes", + include_bytes!("../../../docs/theme-packs/classic-themes.zip"), + ), + ]; let dir = tempfile::tempdir().unwrap(); - let source = dir.path().join("extra-themes.zip"); let packs = dir.path().join("installed"); - std::fs::write(&source, bytes).unwrap(); let ctx = egui::Context::default(); - install(&ctx, &packs, &source).unwrap(); - assert_eq!(installed(&ctx).len(), 1); - assert_eq!(choices(&ctx).len(), 16); - assert_eq!( - std::fs::read(packs.join("extra-themes.zip")).unwrap(), - bytes - ); + for (id, bytes) in collections { + let source = dir.path().join(format!("{id}.zip")); + std::fs::write(&source, bytes).unwrap(); + install(&ctx, &packs, &source).unwrap(); + assert_eq!( + std::fs::read(packs.join(format!("{id}.zip"))).unwrap(), + bytes + ); + } + assert_eq!(installed(&ctx).len(), 2); + assert_eq!(choices(&ctx).len(), 17); let restarted = egui::Context::default(); assert!(load(&restarted, &packs).is_empty()); assert_eq!(choices(&ctx), choices(&restarted)); @@ -498,19 +509,21 @@ mod tests { }); rgb[0] * 0.2126 + rgb[1] * 0.7152 + rgb[2] * 0.0722 }; - for theme in parse(bytes).unwrap().manifest.themes { - let choice = Theme::Pack(format!("extra-themes/{}", theme.id)); - choice.select(&restarted); - assert_eq!(Theme::current(&restarted), choice); - assert_eq!(choice.display_name(&restarted), theme.name); - let p = choice.resolved_palette(&restarted); - for bg in [p.bg, p.panel, p.field, p.purple, p.pattern[0], p.pattern[1]] { - let (fg, bg) = (luminance(p.text), luminance(bg)); - assert!( - (fg.max(bg) + 0.05) / (fg.min(bg) + 0.05) >= 4.5, - "{} contrast", - theme.name - ); + for (id, bytes) in collections { + for theme in parse(bytes).unwrap().manifest.themes { + let choice = Theme::Pack(format!("{id}/{}", theme.id)); + choice.select(&restarted); + assert_eq!(Theme::current(&restarted), choice); + assert_eq!(choice.display_name(&restarted), theme.name); + let p = choice.resolved_palette(&restarted); + for bg in [p.bg, p.panel, p.field, p.purple, p.pattern[0], p.pattern[1]] { + let (fg, bg) = (luminance(p.text), luminance(bg)); + assert!( + (fg.max(bg) + 0.05) / (fg.min(bg) + 0.05) >= 4.5, + "{} contrast", + theme.name + ); + } } } } diff --git a/docs/canvas-pilot/changelog.md b/docs/canvas-pilot/changelog.md index fc64bb8..707c126 100644 --- a/docs/canvas-pilot/changelog.md +++ b/docs/canvas-pilot/changelog.md @@ -4,6 +4,14 @@ ## Unreleased +### v0.9.45 + +- Split bundled themes into video-game-themes (6, including Ravenswatch) and + classic-themes (11). Retired the combined extra-themes download; standalone + palettes are unchanged. New pack IDs coexist with old installations, with + explicit selection/removal instructions. Checked partitioning, notices, + reproducible archives, simultaneous installation, restart and contrast. + ### v0.9.44 - Added a separate, reproducible Lumen Forum showcase kit: polished PIP infodecor, diff --git a/docs/canvas-pilot/guide/theme-packs.md b/docs/canvas-pilot/guide/theme-packs.md index bfe56b1..b88af31 100644 --- a/docs/canvas-pilot/guide/theme-packs.md +++ b/docs/canvas-pilot/guide/theme-packs.md @@ -4,7 +4,7 @@ Theme packs add palettes without rebuilding Canvas Pilot. They change the app, viewport and source-coordinate helper colors; they do not change projects, device transfers, imported pictures, fonts or interface size. -## Install and try the collection +## Install and try the collections Download a ZIP, leave it zipped, then open **Settings → Theme packs → Install theme pack…**. Select a pack, then click one of its themes to try it immediately. It also @@ -12,27 +12,41 @@ appears in **More themes…** and recent themes. The picker stays open while you try alternatives. Selecting **High Contrast** twice returns to your last theme, including an installed one. -Download [extra-themes.zip](../../theme-packs/extra-themes.zip) to install **16 themes in one operation**. It is a single pack: select **extra-themes** in the -manager and scroll its contents to try each palette. Removal or replacement applies -to the whole collection. Individual packs remain available below; installing both -keeps separate copies, so you only need one option for those themes. -**Ravenswatch** is available separately: the collection is at the version-1 limit -of 16 themes. Install its standalone ZIP alongside the collection. +Choose either collection, or install both: + +- [Video-game themes](../../theme-packs/video-game-themes.zip): **6 themes** — + Deep Rock Galactic, Detroit: Become Human, Dispatch, Helldivers, Ravenswatch + and Vivid World. +- [Classic themes](../../theme-packs/classic-themes.zip): **11 themes** — + Catppuccin Mocha, Dracula, GitHub Dark/Light, Gruvbox Dark, Monokai, Nord, + One Dark, Solarized Dark/Light and Tokyo Night. + +Each ZIP is one normal theme pack. Select **video-game-themes** or **classic-themes** +in the manager to try its palettes. Removal or replacement applies to that whole +collection. Individual downloads below remain available; installing both an +individual pack and its collection keeps separate copies. + +### Video-game themes + +| Pack | Palette | Editable manifest | +| --- | --- | --- | +| [Detroit: Become Human](../../theme-packs/detroit-become-human.zip) | Deep blue, pale text and cyan android-inspired accents | [manifest.json](../../theme-packs/detroit-become-human/manifest.json) | +| [Ravenswatch](../../theme-packs/ravenswatch.zip) | Midnight blue, ivory and crimson | [manifest.json](../../theme-packs/ravenswatch/manifest.json) | +| [Vivid World](../../theme-packs/vivid-world.zip) | Midnight navy, violet, pink and cyan crystal accents | [manifest.json](../../theme-packs/vivid-world/manifest.json) | +| [Deep Rock Galactic](../../theme-packs/deep-rock-galactic.zip) | Dark, gold/molten-orange accents | [manifest.json](../../theme-packs/deep-rock-galactic/manifest.json) | +| [Dispatch](../../theme-packs/dispatch.zip) | Dark, yellow/cyan accents | [manifest.json](../../theme-packs/dispatch/manifest.json) | +| [Helldivers](../../theme-packs/helldivers.zip) | Dark | [manifest.json](../../theme-packs/helldivers/manifest.json) | + +### Classic themes | Pack | Palette | Editable manifest | | --- | --- | --- | | [Tokyo Night](../../theme-packs/tokyo-night.zip) | Dark blue with cool cyan accents | [manifest.json](../../theme-packs/tokyo-night/manifest.json) | | [Catppuccin Mocha](../../theme-packs/catppuccin.zip) | Soft charcoal and pastel accents | [manifest.json](../../theme-packs/catppuccin/manifest.json) | -| [Detroit: Become Human](../../theme-packs/detroit-become-human.zip) | Deep blue, pale text and cyan android-inspired accents | [manifest.json](../../theme-packs/detroit-become-human/manifest.json) | -| [Ravenswatch](../../theme-packs/ravenswatch.zip) | Midnight blue, ivory and crimson (standalone) | [manifest.json](../../theme-packs/ravenswatch/manifest.json) | -| [Vivid World](../../theme-packs/vivid-world.zip) | Midnight navy, violet, pink and cyan crystal accents | [manifest.json](../../theme-packs/vivid-world/manifest.json) | -| [Deep Rock Galactic](../../theme-packs/deep-rock-galactic.zip) | Dark, gold/molten-orange accents | [manifest.json](../../theme-packs/deep-rock-galactic/manifest.json) | -| [Dispatch](../../theme-packs/dispatch.zip) | Dark, yellow/cyan accents | [manifest.json](../../theme-packs/dispatch/manifest.json) | | [Dracula](../../theme-packs/dracula.zip) | Dark | [manifest.json](../../theme-packs/dracula/manifest.json) | | [GitHub Dark](../../theme-packs/github-dark.zip) | Dark | [manifest.json](../../theme-packs/github-dark/manifest.json) | | [GitHub Light](../../theme-packs/github-light.zip) | Light | [manifest.json](../../theme-packs/github-light/manifest.json) | | [Gruvbox Dark](../../theme-packs/gruvbox-dark.zip) | Dark | [manifest.json](../../theme-packs/gruvbox-dark/manifest.json) | -| [Helldivers](../../theme-packs/helldivers.zip) | Dark | [manifest.json](../../theme-packs/helldivers/manifest.json) | | [Monokai](../../theme-packs/monokai.zip) | Dark | [manifest.json](../../theme-packs/monokai/manifest.json) | | [Nord](../../theme-packs/nord.zip) | Dark | [manifest.json](../../theme-packs/nord/manifest.json) | | [One Dark](../../theme-packs/one-dark.zip) | Dark | [manifest.json](../../theme-packs/one-dark/manifest.json) | @@ -46,9 +60,14 @@ The Detroit, Vivid World, Ravenswatch, Dispatch, Helldivers and Deep Rock Galact original, unofficial color interpretations; they include no game artwork, fonts or code and are not endorsed by the games' owners. -The current collection replaces Minecraft with Vivid World. Reimport the collection -to update; if Minecraft was selected, choose Vivid World after the update returns -to Midra Dark. A separately installed Minecraft pack remains until you remove it. +### Moving from the old combined pack + +The two collections replace the former `extra-themes.zip` download and have new +pack IDs. Install the desired collections, select a theme from one of them, then +remove **extra-themes** in Settings if you no longer need its duplicate entries. +Existing installations and saved choices are not renamed or deleted automatically. +Removing a pack while its theme is active falls back to Midra Dark. Standalone +packs, including older Minecraft installations, remain user-managed. ## Manage packs @@ -88,4 +107,4 @@ poorly contrasted colors automatically. The [theme-pack contract](../../interfaces/theme-packs.md) lists all palette roles, validation limits, settings compatibility and round-trip behavior. Repository -contributors regenerate the individual ZIPs and the combined collection with `python3 scripts/build-theme-packs.py`. +contributors regenerate the individual ZIPs and both collections with `python3 scripts/build-theme-packs.py`. diff --git a/docs/interfaces/theme-packs.md b/docs/interfaces/theme-packs.md index 3d2b954..5a47d61 100644 --- a/docs/interfaces/theme-packs.md +++ b/docs/interfaces/theme-packs.md @@ -101,20 +101,26 @@ and Unix file metadata so exact rebuilds do not depend on the host or zlib versi Their manifest bytes, pack revisions and version-1 representation are unchanged; the importer continues to accept both stored and DEFLATE-compressed packs. -## Bundled collection +## Bundled collections -`docs/theme-packs/extra-themes.zip` is a normal version-1 pack (`extra-themes`, -revision 4), containing 16 curated themes. One import validates and installs -all entries atomically; it does not unpack nested ZIPs. The build script combines -the explicitly listed collection manifests in sorted path order, prefixes theme IDs with their source -pack ID and preserves all notices. Individual packs and the collection have distinct -saved choices and can coexist. Updates and removal operate on the whole collection. +Two normal version-1 packs partition the 17 distributed themes, with no duplicate +membership and each below the 16-theme limit: -Collection revision 4 replaces `minecraft-overworld` with `vivid-world-default`. -Updating while Minecraft is active uses the existing removed-theme fallback to -Midra Dark; Vivid World can then be selected explicitly. Older standalone Minecraft -installations are not deleted or remapped by this collection update. +| File / pack ID | Revision | Contents | +| --- | --- | --- | +| `video-game-themes.zip` / `video-game-themes` | 1 | 6: Deep Rock Galactic, Detroit: Become Human, Dispatch, Helldivers, Ravenswatch, Vivid World | +| `classic-themes.zip` / `classic-themes` | 1 | 11: Catppuccin, Dracula, GitHub Dark/Light, Gruvbox Dark, Monokai, Nord, One Dark, Solarized Dark/Light, Tokyo Night | -Ravenswatch is a separate version-1 pack, not a seventeenth collection entry. -The build script validates every standalone archive and requires every listed -collection manifest; adding a standalone pack does not change collection contents. +The build script combines explicitly assigned manifests in sorted path order, +prefixes each theme ID with its source pack ID and preserves notices. Missing or +uncategorized sources fail the build. Import installs each collection atomically; +it does not unpack nested archives. Individual packs and collections have distinct +saved choices and can coexist. Updates and removal operate on the chosen pack. + +These replace the distributed `extra-themes.zip` (last revision 4), without +reusing or silently reinterpreting its ID. Old saved `extra-themes/` +choices continue to resolve while the old pack is installed. Users install the +new collections, explicitly select their new choice, and optionally remove the +old pack. Removing an active old pack uses the existing Midra Dark fallback. +No settings/project version or automatic migration changes. Standalone pack IDs, +revisions, palette bytes and installed copies remain unchanged. diff --git a/docs/theme-packs/classic-themes.zip b/docs/theme-packs/classic-themes.zip new file mode 100644 index 0000000000000000000000000000000000000000..e11b1c765b9d4c7f0d70f4db6be825b0d0994872 GIT binary patch literal 30835 zcmeHQT~j1ScGY@qKWv2G_6OuL;aDaD7@Cg;Mh=G&Fq*a)Ab`=VLam4Ds%)s8?y7cG zHw<>{ga3>FqhEc_&Clwh86?ZvjdhQ9rJ=hj^WK{$Pu{$FZ*uX?umAS9Uzk6?>wmq| zo&ERy7hmxI|9}t2Ns$kAJ>B?YT^9fG8>Lq6bXDhNvGQ7V*7$Rt;jb&{D5>i_U7z0S zv94F-n@Zp1jYsX5uhsW>Q7JaZKdy;nI+@JUG%wc2WqO-PBl3Nbj5Rws@=vID%_m0r z&FvJA43kl<*}1%zmZP$&@v-X(eWgipm+-Td7aiTvTiSPnF9%6c=*oP#-`U^VjlaC9 zjH)ko_jd<-oAFnpt<>NufszgdXO4Bm?A{jv5^0g_!jbg{Jxw&AIX-&9d&Wq0e|W)uzQkl5S-U`=t*F z6#TRva`Fhx0^Tv{7DS)CnK{PL<^U!O48XV zS3M6f*14!CJ2as&f_qXCf(pJcWWVnxiwqhGaAQ`5etTB%~NcIQ% zV3@_PMIh-6ll_KeBam1rtpT0_$xS}JoekErr24oRC|~E(x3hsd#zS5h==~EIWi!L{ z-Sdq!!Lr%e+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-ld<299Hq-~a zIjVUwW}ar)5%C<)@C-n5jDaF>E*)ZFOXHVV1Z~k#d#PMtO>w1^=-&_br+G_w~!+DrN|0|%7%s{VKx;uV$UcX z&$=Ks*CospGN)y>IFJy<5X_b7AYF<~LsKZ*BhYLGr-eR~SbK^v+u7C0I#PA*OLoWm zgoneK{kW^*?q28Ec%KoY8g{ErM(7?t08A`$-~X4syRuF@cmYCPVU3DSMY812;t3(v zg8fTzGXn cfAVjQ-xz%H&ENe!Kl~N``4azK`NW_82b^xSwEzGB literal 0 HcmV?d00001 diff --git a/docs/theme-packs/extra-themes.zip b/docs/theme-packs/extra-themes.zip deleted file mode 100644 index bed72a58579cc04ad0527e52a2c593482f02ed53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34975 zcmeHQZF3t(a@NI3s_v@p+x>t!s;(kc@dfV$83Ihc~5S z^l7)>9ql*#N8{*0zt(QHTb+*oY#PmGvLtCKt~G5>Yb`PU(DudXoaHRmB@E3lo7`iZB)v4?XEL8j)#E6NTS*|l_#q-jx1R2I z;(ZzWVu&UqEu!>5wxZO3Hl3H#u_C3@?d*3WBY;1#ApWFiHj}8~l1Mq-DU101&P_Cq z;#n5&Br=WWiE1n+~BgI}SSSQR|@Dw<;_%aI zv`5`QEv>>&ttH{75jVT7rdfH*RZop-4?i`c9e#Az%T!ODA&VcGq`fpiq{Gjs2gMYK z$l|BhOAf-v*Z zn!Vz)~mLfu%McR+#pAJ2i$ZSY!{TC(uz2EC)%nKMI~% zuyp&;g1vHJNm>U73nFqpucq?xU}0PGQM8=$p2#e3t6OH}{LwokxN!JcffiWjei|4V zi8qMHkl4C?N+-Higy)UYAp#anxu7bsZ;IXQYYHMr8b^}OPwJL7dc8s zqd-|YxQvoW9xPWbeHk}G$KSyvjYi3Wh@5iKR6YVOw{kpAG79djRxPh=8#|F!v3y$W z<)9gdTS^})jb^(U$jF0AFJ5JbS}~v!c+0DxQfo<2X)2P|K}9!Ns#&n5TOis&r8b@q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qD);?o`tCwI?a&J#>Iyc>7ZoW> z`pljX@|UoG$#3SsAY2Go5B?1lzNZQk!2LLH-+8Zg0$2qNad{bbE9&>UxLbk3Z17e0 zykif|I}PFe+82RSvoUUehwsXnj_Qv4NtSR5Iac5uEbCncy9D1Amx8M-ukjoQ3`m3! zaY>g4jag+QMEIC%;1{pKH!FDgZSaufx-0O7x%=FPfE*}-40*bYZLESwo^6{zNuPmf{lp-Jh_1zWDAR{*k`? P75@1ef1lx%Cr|zt1={qn diff --git a/docs/theme-packs/video-game-themes.zip b/docs/theme-packs/video-game-themes.zip new file mode 100644 index 0000000000000000000000000000000000000000..d024e6769c34f187c2565bee7f2a6432150d78b6 GIT binary patch literal 5227 zcmdUzPmkj?6u@U$;II-W_QV01&b93%c9J%;H&}^9E0$rGKL>_`<3Fw0)QOU`WrX&? z7l8}kkFUUUn#T5|?GA&q5*>|Z8b90bJ^$YGd%1f4@cqYUyU%CWpT7Fz&%ZxDJ2Sr@ z!NV2RN{YIf{!$nEw?_z#HlnIkp+}b}9GmZo!@r}A;-Z)==t@kQrC5o2)DBi+qde(u z@Dlw5a}hEtnoqY17owb01$zxE<&-swO}LPBoj2`rt)zxM%#Ke%7QF;n^kpY&WpcGx zHXtNvUJIj0JChZ8QPuExzbov^sNPWXY;=xO9EP-C1O_vzwW!)blHoL*yMv2rXZiU& zNP;MGhjMz;O^Z^3L*|Z^v}r_T+_&>Ur`!2J687J#)ER)#&wE>pa*LhTpmP}eJ7|%& zW8pj`fpo{D5_x-G=VT5BW$sw6bnDmy1~uYWvNZMl$8M-G z)J#ibEZk{ym31zXl1YNyv2tCN`A(H&76qVX=YTiu-#0ra><_U=r>P3nOfta=fN;46 zawk-Cc*y(3M;4w|`VxKKilb*n+=|_cpD+k1_I%^;6V7l(tRirJJwFjn!kNd2Na5m4paOp7#0+BF}E(a4Sc;G4Gq?tH~31s&>q?x72bFR!CcpQ{x zy-aVx{ZI+hkoh^QRwWM3G04MMZGRqN5pQr{x_`spv-NdV4yl zytG396_zB-u$LbkSm4ZK>;;sC1t&8X{R-v^fULK(fs%uxAwP!|K@egF`Q5 z9az$k`xZH{BygX4)>>Ew205?@?k5NbmY9Xqt5JGbM9fp_s0> z_6|68{cIFe(35RZ<@|VJ`N0UGAC1s|g(V6TzaVp9!4$`lS5jJ7=1DmB!p4CGlQ6y$ zED@BYk$dPZEF=O(_r5v?OWAKnDxtnYQR3=>obTXse){9(GCB`kP8El&1L@t#u)# zVv6RdZFrE<&~TKMXlMg{8+@%xRSAx=8#L^prs$=Rq7s^kOSEj7vc9~y*lxE|v#IIK z_Kn#T%Iu44{h~mo=|i+?0N&SQBn#ctW0V(*qDDmpI&d>8U|*K6x!_auqG%8W9dkvY zcR*X!ERCel9NM#;V$de;)-ATsfz{J%eXY3|R`}L%^hMjrp(~Zc@+Hj$^jV&L z3)2-$wo3)WU4O81k)#ZsK(D(L;A&JzaL<7*VT!)*J^TdegZB4^pEmm2HPvRTrH#~Qy%E>pPHmZP>Ge)J-uUoI>>y^^Qx(4?dta3ydglbd&KioKa^ybmk q^9S!eet7)dVE5AS?62R=fA9juzA3zV{=tXl;RE=20)IbgSNR8`nO$%I literal 0 HcmV?d00001 diff --git a/scripts/build-theme-packs.py b/scripts/build-theme-packs.py index 4ffa0c7..0f8282c 100644 --- a/scripts/build-theme-packs.py +++ b/scripts/build-theme-packs.py @@ -7,13 +7,17 @@ import json import zipfile ROOT = Path(__file__).resolve().parents[1] -# Curated v1 collection: new standalone packs must not silently replace its entries. -COLLECTION_PACKS = frozenset({ - 'catppuccin', 'deep-rock-galactic', 'detroit-become-human', 'dispatch', - 'dracula', 'github-dark', 'github-light', 'gruvbox-dark', 'helldivers', - 'monokai', 'nord', 'one-dark', 'solarized-dark', 'solarized-light', - 'tokyo-night', 'vivid-world', -}) +# Explicit membership keeps each normal v1 pack below its 16-theme limit. +COLLECTIONS = { + 'video-game-themes': frozenset({ + 'deep-rock-galactic', 'detroit-become-human', 'dispatch', 'helldivers', + 'ravenswatch', 'vivid-world', + }), + 'classic-themes': frozenset({ + 'catppuccin', 'dracula', 'github-dark', 'github-light', 'gruvbox-dark', + 'monokai', 'nord', 'one-dark', 'solarized-dark', 'solarized-light', 'tokyo-night', + }), +} def archive(manifest): @@ -28,10 +32,14 @@ def archive(manifest): return buffer.getvalue() -def collection(sources): +def collection(sources, collection_id): """One normal v1 pack: the existing importer installs every contained theme.""" - sources = [source for source in sources if source.parent.name in COLLECTION_PACKS] - if {source.parent.name for source in sources} != COLLECTION_PACKS: + members = COLLECTIONS[collection_id] + sources = list(sources) + if {source.parent.name for source in sources} - set().union(*COLLECTIONS.values()): + raise ValueError('A theme has no collection assignment') + sources = [source for source in sources if source.parent.name in members] + if {source.parent.name for source in sources} != members: raise ValueError('A required collection manifest is missing') themes = [] notices = [] @@ -42,7 +50,7 @@ def collection(sources): notices.append(manifest['id'] + '\n' + manifest.get('notices', '')) if not 1 <= len(themes) <= 16: raise ValueError('The collection must respect the v1 limit of 16 themes') - manifest = dict(version=1, id='extra-themes', revision=4, + manifest = dict(version=1, id=collection_id, revision=1, themes=themes, notices='\n\n'.join(notices)) return (json.dumps(manifest, indent=2) + '\n').encode() @@ -53,7 +61,8 @@ def main(): args = parser.parse_args() sources = sorted((ROOT / 'docs/theme-packs').glob('*/manifest.json')) outputs = [(source.parent.with_suffix('.zip'), source.read_bytes()) for source in sources] - outputs.append((ROOT / 'docs/theme-packs/extra-themes.zip', collection(sources))) + outputs.extend((ROOT / f'docs/theme-packs/{name}.zip', collection(sources, name)) + for name in COLLECTIONS) for target, manifest in outputs: data = archive(manifest) if args.check: diff --git a/tests/test_theme_packs.py b/tests/test_theme_packs.py index 7a99cca..c2dfd0f 100644 --- a/tests/test_theme_packs.py +++ b/tests/test_theme_packs.py @@ -17,7 +17,7 @@ class ThemePackExamples(unittest.TestCase): def test_rebuild_does_not_depend_on_zlib_or_host_platform(self): sources = sorted((ROOT / 'docs/theme-packs').glob('*/manifest.json')) manifests = [source.read_bytes() for source in sources] - manifests.append(module.collection(sources)) + manifests.extend(module.collection(sources, name) for name in module.COLLECTIONS) for manifest in manifests: expected = module.archive(manifest) with mock.patch.object(zipfile, 'zlib', None), mock.patch('sys.platform', 'win32'): @@ -39,25 +39,36 @@ class ThemePackExamples(unittest.TestCase): self.assertEqual(archive.namelist(), ['manifest.json']) self.assertEqual(archive.read('manifest.json'), source.read_bytes()) - def test_collection_contains_curated_themes_and_notices(self): + def test_collections_partition_every_theme_and_preserve_notices(self): sources = list((ROOT / 'docs/theme-packs').glob('*/manifest.json')) - data = module.collection(sources) - self.assertEqual(data, module.collection(reversed(sources))) - self.assertEqual(module.archive(data), (ROOT / 'docs/theme-packs/extra-themes.zip').read_bytes()) - combined = json.loads(data) - self.assertEqual(combined['id'], 'extra-themes') - self.assertEqual(len(combined['themes']), 16) - self.assertEqual(len({t['id'] for t in combined['themes']}), 16) - self.assertNotIn('ravenswatch-default', {t['id'] for t in combined['themes']}) - for source in sources: - if source.parent.name not in module.COLLECTION_PACKS: - continue - manifest = json.loads(source.read_bytes()) - self.assertIn(manifest['notices'], combined['notices']) - for theme in manifest['themes']: - self.assertIn({**theme, 'id': manifest['id'] + '-' + theme['id']}, combined['themes']) + assigned = set() + for name, members in module.COLLECTIONS.items(): + self.assertFalse(assigned & members) + assigned.update(members) + data = module.collection(sources, name) + self.assertEqual(data, module.collection(reversed(sources), name)) + self.assertEqual(module.archive(data), (ROOT / f'docs/theme-packs/{name}.zip').read_bytes()) + combined = json.loads(data) + self.assertEqual(combined['id'], name) + self.assertEqual(len(combined['themes']), len(members)) + self.assertLessEqual(len(combined['themes']), 16) + self.assertEqual(len({t['id'] for t in combined['themes']}), len(members)) + for source in sources: + if source.parent.name not in members: + continue + manifest = json.loads(source.read_bytes()) + self.assertIn(manifest['notices'], combined['notices']) + for theme in manifest['themes']: + self.assertIn({**theme, 'id': manifest['id'] + '-' + theme['id']}, combined['themes']) + self.assertEqual(assigned, {source.parent.name for source in sources}) + self.assertIn('ravenswatch', module.COLLECTIONS['video-game-themes']) + self.assertEqual(len(module.COLLECTIONS['video-game-themes']), 6) + self.assertEqual(len(module.COLLECTIONS['classic-themes']), 11) + self.assertFalse((ROOT / 'docs/theme-packs/extra-themes.zip').exists()) - def test_missing_collection_manifest_is_rejected(self): + def test_missing_or_uncategorized_collection_manifest_is_rejected(self): sources = list((ROOT / 'docs/theme-packs').glob('*/manifest.json')) with self.assertRaisesRegex(ValueError, 'required collection manifest'): - module.collection(source for source in sources if source.parent.name != 'dispatch') + module.collection((source for source in sources if source.parent.name != 'dispatch'), 'video-game-themes') + with self.assertRaisesRegex(ValueError, 'no collection assignment'): + module.collection(sources + [ROOT / 'docs/theme-packs/unknown/manifest.json'], 'classic-themes')