]> Git — Sourcephile - tmp/julm/literate-invoice.git/blob - tests/Tests/Invoice.hs
update(log): invoice #org3sale2
[tmp/julm/literate-invoice.git] / tests / Tests / Invoice.hs
1 {-# LANGUAGE OverloadedLists #-}
2 {-# LANGUAGE OverloadedStrings #-}
3
4 module Tests.Invoice where
5
6 import Data.List qualified as List
7 import Data.Map.Strict qualified as Map
8 import Data.Text.Lazy qualified as Text.Lazy
9 import Data.Time.Clock qualified as Time
10 import Data.Time.LocalTime qualified as Time
11 import Literate.Accounting.Math
12 import Literate.Document qualified as Doc
13 import Literate.Document.HTML qualified as HTML
14 import Literate.Invoice.HTML qualified as HTML
15 import Literate.Invoice.Invoice
16 import Literate.Organization (organization)
17 import Literate.Prelude
18 import Test.Syd
19 import Tests.Organization qualified
20 import Tests.Utils.Tests
21 import Text.Blaze.Renderer.Text qualified as Blaze.Text
22 import Text.Blaze.Renderer.Utf8 qualified as Blaze
23 import Prelude (undefined, (*))
24
25 spec :: HasCallStack => Spec
26 spec =
27 -- aroundAll readDicts do
28 describe "Invoice" do
29 forM_ (invoices & Map.toList) \(invId, inv) -> do
30 let idS = invId & Doc.toInline & HTML.toHtml & Blaze.Text.renderMarkup & Text.Lazy.unpack
31 outPath <- goldenPath idS "html"
32 it idS do
33 goldenByteStringBuilderFile outPath do
34 HTML.htmlIO (invId, inv) <&> Blaze.renderMarkupBuilder
35
36 ngipkgsLog :: [InvoiceLog]
37 ngipkgsLog =
38 [ InvoiceLog
39 { invoiceLogDate = "2025-11-06"
40 , invoiceLogDuration = 0.5
41 , invoiceLogAction = ["organization"]
42 , invoiceLogScope = ["NGIpkgs"]
43 , invoiceLogReferences = ["https://meet.google.com/hii-druc-tjp"]
44 , invoiceLogDescription = "first meeting"
45 }
46 , InvoiceLog
47 { invoiceLogDate = "2025-11-06"
48 , invoiceLogDuration = 4
49 , invoiceLogAction = ["development"]
50 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
51 , invoiceLogReferences = ["https://github.com/ju1m/bonfire-app/commits/nix"]
52 , invoiceLogDescription = "focus on the hardest part first"
53 }
54 , InvoiceLog
55 { invoiceLogDate = "2025-11-07"
56 , invoiceLogDuration = 8
57 , invoiceLogAction = ["development"]
58 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
59 , invoiceLogReferences = ["https://github.com/ju1m/bonfire-app/commits/nix"]
60 , invoiceLogDescription = "continuing to package Bonfire deps"
61 }
62 , InvoiceLog
63 { invoiceLogDate = "2025-11-08"
64 , invoiceLogDuration = 0.1
65 , invoiceLogAction = ["development"]
66 , invoiceLogScope = ["Nixpkgs", "opencv"]
67 , invoiceLogReferences = ["https://github.com/NixOS/nixpkgs/pull/459592"]
68 , invoiceLogDescription = "fix opencv in nixpkgs"
69 }
70 , InvoiceLog
71 { invoiceLogDate = "2025-11-09"
72 , invoiceLogDuration = 8
73 , invoiceLogAction = ["development"]
74 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
75 , invoiceLogReferences = ["https://github.com/ju1m/bonfire-app/commits/nix"]
76 , invoiceLogDescription = "continue to fix deps"
77 }
78 , InvoiceLog
79 { invoiceLogDate = "2025-11-09"
80 , invoiceLogDuration = 4
81 , invoiceLogAction = ["development"]
82 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
83 , invoiceLogReferences = ["https://github.com/ju1m/bonfire-app/commits/nix"]
84 , invoiceLogDescription = "continue to fix deps"
85 }
86 , InvoiceLog
87 { invoiceLogDate = "2025-11-11"
88 , invoiceLogDuration = 6
89 , invoiceLogAction = ["development"]
90 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
91 , invoiceLogReferences = ["https://github.com/ju1m/bonfire-app/commits/nix"]
92 , invoiceLogDescription = "continue to fix deps"
93 }
94 , InvoiceLog
95 { invoiceLogDate = "2025-11-12"
96 , invoiceLogDuration = 4
97 , invoiceLogAction = ["development"]
98 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
99 , invoiceLogReferences = ["https://github.com/ju1m/bonfire-app/commits/nix"]
100 , invoiceLogDescription = "continue to fix deps"
101 }
102 , InvoiceLog
103 { invoiceLogDate = "2025-11-14"
104 , invoiceLogDuration = 5
105 , invoiceLogAction = ["development"]
106 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
107 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1812"]
108 , invoiceLogDescription = "continue to fix deps and move into ngipkgs"
109 }
110 , InvoiceLog
111 { invoiceLogDate = "2025-11-14"
112 , invoiceLogDuration = 1
113 , invoiceLogAction = ["organization"]
114 , invoiceLogScope = ["NGIpkgs"]
115 , invoiceLogReferences = ["https://www.notion.so/nixos-foundation/Nix-NGI-weekly-review-34-2ab59d49e1be80939503c655b009e934"]
116 , invoiceLogDescription = "weekly meeting"
117 }
118 , InvoiceLog
119 { invoiceLogDate = "2025-11-15"
120 , invoiceLogDuration = 6
121 , invoiceLogAction = ["development"]
122 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
123 , invoiceLogReferences = []
124 , invoiceLogDescription = "finish to build Bonfire and start to fix runtime bugs"
125 }
126 , InvoiceLog
127 { invoiceLogDate = "2025-11-16"
128 , invoiceLogDuration = 4
129 , invoiceLogAction = ["development"]
130 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
131 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1812#issuecomment-3537609170"]
132 , invoiceLogDescription = "workaround and contribute upstream"
133 }
134 , InvoiceLog
135 { invoiceLogDate = "2025-11-17"
136 , invoiceLogDuration = 8
137 , invoiceLogAction = ["development"]
138 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
139 , invoiceLogReferences = []
140 , invoiceLogDescription = "add updateScript and fix opencv"
141 }
142 , InvoiceLog
143 { invoiceLogDate = "2025-11-19"
144 , invoiceLogDuration = 8
145 , invoiceLogAction = ["development"]
146 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
147 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1812#issuecomment-3554376221"]
148 , invoiceLogDescription = "continue to fix startup crashes"
149 }
150 , InvoiceLog
151 { invoiceLogDate = "2025-11-21"
152 , invoiceLogDuration = 4
153 , invoiceLogAction = ["development"]
154 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
155 , invoiceLogReferences = []
156 , invoiceLogDescription = "begin to package yarn assets. Upstream likes convoluted code and fake libraries."
157 }
158 , InvoiceLog
159 { invoiceLogDate = "2025-11-21"
160 , invoiceLogDuration = 1
161 , invoiceLogAction = ["organization"]
162 , invoiceLogScope = ["NGIpkgs"]
163 , invoiceLogReferences = []
164 , invoiceLogDescription = "weekly meeting"
165 }
166 , InvoiceLog
167 { invoiceLogDate = "2025-11-21"
168 , invoiceLogDuration = 4
169 , invoiceLogAction = ["development"]
170 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
171 , invoiceLogReferences = []
172 , invoiceLogDescription = "continue to package assets"
173 }
174 , InvoiceLog
175 { invoiceLogDate = "2025-11-23"
176 , invoiceLogDuration = 4
177 , invoiceLogAction = ["development"]
178 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
179 , invoiceLogReferences = []
180 , invoiceLogDescription = "continue to package assets and try to get Bonfire to work"
181 }
182 , InvoiceLog
183 { invoiceLogDate = "2025-11-24"
184 , invoiceLogDuration = 10
185 , invoiceLogAction = ["development"]
186 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
187 , invoiceLogReferences = ["https://github.com/surface-ui/surface/issues/762#issuecomment-3577030748"]
188 , invoiceLogDescription = "continue to solve problems with Bonfire packaging"
189 }
190 , InvoiceLog
191 { invoiceLogDate = "2025-11-27"
192 , invoiceLogDuration = 8
193 , invoiceLogAction = ["development"]
194 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
195 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1812#issuecomment-3584319056"]
196 , invoiceLogDescription = "successfully auto-update and build Bonfire"
197 }
198 , InvoiceLog
199 { invoiceLogDate = "2025-11-28"
200 , invoiceLogDuration = 1
201 , invoiceLogAction = ["organization"]
202 , invoiceLogScope = ["NGIpkgs"]
203 , invoiceLogReferences = ["https://www.notion.so/nixos-foundation/Nix-NGI-weekly-review-36-2b959d49e1be80fa823cd4d83581fda5#2b959d49e1be80fc85eed38c9a9dca86"]
204 , invoiceLogDescription = "weekly meeting"
205 }
206 , InvoiceLog
207 { invoiceLogDate = "2025-11-29"
208 , invoiceLogDuration = 5
209 , invoiceLogAction = ["development"]
210 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
211 , invoiceLogReferences = []
212 , invoiceLogDescription = "begin the service module"
213 }
214 , InvoiceLog
215 { invoiceLogDate = "2025-12-02"
216 , invoiceLogDuration = 4
217 , invoiceLogAction = ["development"]
218 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
219 , invoiceLogReferences = []
220 , invoiceLogDescription = "continue the service module"
221 }
222 , InvoiceLog
223 { invoiceLogDate = "2025-12-03"
224 , invoiceLogDuration = 8
225 , invoiceLogAction = ["development"]
226 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
227 , invoiceLogReferences = []
228 , invoiceLogDescription = "first working service module"
229 }
230 , InvoiceLog
231 { invoiceLogDate = "2025-12-04"
232 , invoiceLogDuration = 5
233 , invoiceLogAction = ["development"]
234 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
235 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1871"]
236 , invoiceLogDescription = "improve service module"
237 }
238 , InvoiceLog
239 { invoiceLogDate = "2025-12-05"
240 , invoiceLogDuration = 1
241 , invoiceLogAction = ["organization"]
242 , invoiceLogScope = ["NGIpkgs"]
243 , invoiceLogReferences = ["https://www.notion.so/nixos-foundation/Nix-NGI-weekly-review-36-2b959d49e1be80fa823cd4d83581fda5"]
244 , invoiceLogDescription = "weekly meeting"
245 }
246 , InvoiceLog
247 { invoiceLogDate = "2025-12-05"
248 , invoiceLogDuration = 0.5
249 , invoiceLogAction = ["documentation"]
250 , invoiceLogScope = ["NGIpkgs", "Manuals"]
251 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1954"]
252 , invoiceLogDescription = "meeting"
253 }
254 , InvoiceLog
255 { invoiceLogDate = "2025-12-06"
256 , invoiceLogDuration = 2
257 , invoiceLogAction = ["documentation"]
258 , invoiceLogScope = ["NGIpkgs", "Manuals"]
259 , invoiceLogReferences = []
260 , invoiceLogDescription = "prepare wednesday meeting"
261 }
262 , InvoiceLog
263 { invoiceLogDate = "2025-12-07"
264 , invoiceLogDuration = 4
265 , invoiceLogAction = ["documentation"]
266 , invoiceLogScope = ["NGIpkgs", "Manuals"]
267 , invoiceLogReferences = []
268 , invoiceLogDescription = "prepare demo for wednesday meeting"
269 }
270 , InvoiceLog
271 { invoiceLogDate = "2025-12-08"
272 , invoiceLogDuration = 4
273 , invoiceLogAction = ["documentation"]
274 , invoiceLogScope = ["NGIpkgs", "Manuals"]
275 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1891"]
276 , invoiceLogDescription = "prepare demo for wednesday meeting"
277 }
278 , InvoiceLog
279 { invoiceLogDate = "2025-12-09"
280 , invoiceLogDuration = 4
281 , invoiceLogAction = ["documentation"]
282 , invoiceLogScope = ["NGIpkgs", "Manuals"]
283 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1891"]
284 , invoiceLogDescription = "continue to document"
285 }
286 , InvoiceLog
287 { invoiceLogDate = "2025-12-10"
288 , invoiceLogDuration = 2
289 , invoiceLogAction = ["review"]
290 , invoiceLogScope = ["NGIpkgs"]
291 , invoiceLogReferences = ["https://www.notion.so/nixos-foundation/Nix-NGI-best-practices-for-NixOS-modules-implementation-2c559d49e1be80a8a499f21abb203d6f"]
292 , invoiceLogDescription = "visio on “best practices”"
293 }
294 , InvoiceLog
295 { invoiceLogDate = "2025-12-12"
296 , invoiceLogDuration = 1
297 , invoiceLogAction = ["organization"]
298 , invoiceLogScope = ["NGIpkgs"]
299 , invoiceLogReferences = []
300 , invoiceLogDescription = "weekly visio meeting"
301 }
302 , InvoiceLog
303 { invoiceLogDate = "2025-12-11"
304 , invoiceLogDuration = 8
305 , invoiceLogAction = ["documentation"]
306 , invoiceLogScope = ["NGIpkgs", "Manuals"]
307 , invoiceLogReferences = []
308 , invoiceLogDescription = "continue to document"
309 }
310 , InvoiceLog
311 { invoiceLogDate = "2025-12-12"
312 , invoiceLogDuration = 4
313 , invoiceLogAction = ["documentation"]
314 , invoiceLogScope = ["NGIpkgs", "Manuals"]
315 , invoiceLogReferences = []
316 , invoiceLogDescription = "continue to document"
317 }
318 , InvoiceLog
319 { invoiceLogDate = "2025-12-13"
320 , invoiceLogDuration = 2
321 , invoiceLogAction = ["documentation"]
322 , invoiceLogScope = ["NGIpkgs", "Manuals"]
323 , invoiceLogReferences = []
324 , invoiceLogDescription =
325 [ "setup sphinx like "
326 , Doc.InlineLink
327 { Doc.inlineLinkTarget = "https://nix.dev"
328 , Doc.inlineLinkText = "nix.dev"
329 }
330 , " for the manuals"
331 ]
332 }
333 , InvoiceLog
334 { invoiceLogDate = "2025-12-13"
335 , invoiceLogDuration = 5
336 , invoiceLogAction = ["development"]
337 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
338 , invoiceLogReferences = ["https://github.com/bonfire-networks/bonfire-app/issues/1670#issuecomment-3650762914"]
339 , invoiceLogDescription = "update to latest; overcoming new bugs introduced by upstream"
340 }
341 , InvoiceLog
342 { invoiceLogDate = "2025-12-15"
343 , invoiceLogDuration = 4
344 , invoiceLogAction = ["development"]
345 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
346 , invoiceLogReferences = []
347 , invoiceLogDescription = "improving the update script and still overcoming upstream bugs"
348 }
349 , InvoiceLog
350 { invoiceLogDate = "2025-12-16"
351 , invoiceLogDuration = 3
352 , invoiceLogAction = ["development"]
353 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
354 , invoiceLogReferences = []
355 , invoiceLogDescription = "overcoming bugs, again"
356 }
357 , InvoiceLog
358 { invoiceLogDate = "2025-12-16"
359 , invoiceLogDuration = 2
360 , invoiceLogAction = ["review"]
361 , invoiceLogScope = ["NGIpkgs"]
362 , invoiceLogReferences = []
363 , invoiceLogDescription = "visio to review PRs"
364 }
365 , InvoiceLog
366 { invoiceLogDate = "2025-12-16"
367 , invoiceLogDuration = 2
368 , invoiceLogAction = ["review"]
369 , invoiceLogScope = ["NGIpkgs"]
370 , invoiceLogReferences = []
371 , invoiceLogDescription = "visio to review PRs"
372 }
373 , InvoiceLog
374 { invoiceLogDate = "2025-12-17"
375 , invoiceLogDuration = 1.5
376 , invoiceLogAction = ["review"]
377 , invoiceLogScope = ["NGIpkgs"]
378 , invoiceLogReferences = []
379 , invoiceLogDescription = "visio to review PRs"
380 }
381 , InvoiceLog
382 { invoiceLogDate = "2025-12-18"
383 , invoiceLogDuration = 1
384 , invoiceLogAction = ["review"]
385 , invoiceLogScope = ["NGIpkgs", "dnsvizor"]
386 , invoiceLogReferences = []
387 , invoiceLogDescription = "review linj’s PR"
388 }
389 , InvoiceLog
390 { invoiceLogDate = "2025-12-19"
391 , invoiceLogDuration = 1.5
392 , invoiceLogAction = ["organization"]
393 , invoiceLogScope = ["NGIpkgs"]
394 , invoiceLogReferences = []
395 , invoiceLogDescription = "weekly meeting"
396 }
397 , InvoiceLog
398 { invoiceLogDate = "2025-12-21"
399 , invoiceLogDuration = 4
400 , invoiceLogAction = ["development"]
401 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
402 , invoiceLogReferences = []
403 , invoiceLogDescription =
404 [ "fix bug using "
405 , "__structuredAttrs" & Doc.InlineCode
406 ]
407 }
408 , InvoiceLog
409 { invoiceLogDate = "2025-12-23"
410 , invoiceLogDuration = 4
411 , invoiceLogAction = ["documentation"]
412 , invoiceLogScope = ["NGIpkgs", "Manuals"]
413 , invoiceLogReferences = []
414 , invoiceLogDescription = "improve building the manuals"
415 }
416 , InvoiceLog
417 { invoiceLogDate = "2025-12-23"
418 , invoiceLogDuration = 2
419 , invoiceLogAction = ["development"]
420 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
421 , invoiceLogReferences = []
422 , invoiceLogDescription = "address reviewers’ concerns"
423 }
424 , InvoiceLog
425 { invoiceLogDate = "2025-12-24"
426 , invoiceLogDuration = 4
427 , invoiceLogAction = ["development"]
428 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
429 , invoiceLogReferences = []
430 , invoiceLogDescription = "update Bonfire and report issues upstream"
431 }
432 , InvoiceLog
433 { invoiceLogDate = "2025-12-24"
434 , invoiceLogDuration = 4
435 , invoiceLogAction = ["documentation"]
436 , invoiceLogScope = ["NGIpkgs", "Manuals"]
437 , invoiceLogReferences = []
438 , invoiceLogDescription = "document"
439 }
440 , InvoiceLog
441 { invoiceLogDate = "2025-12-24"
442 , invoiceLogDuration = 2
443 , invoiceLogAction = ["development"]
444 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
445 , invoiceLogReferences = []
446 , invoiceLogDescription = "update Bonfire to fix bugs"
447 }
448 , InvoiceLog
449 { invoiceLogDate = "2025-12-25"
450 , invoiceLogDuration = 2
451 , invoiceLogAction = ["documentation"]
452 , invoiceLogScope = ["NGIpkgs", "Manuals"]
453 , invoiceLogReferences = []
454 , invoiceLogDescription = "document"
455 }
456 , InvoiceLog
457 { invoiceLogDate = "2025-12-25"
458 , invoiceLogDuration = 6
459 , invoiceLogAction = ["development"]
460 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
461 , invoiceLogReferences = ["https://github.com/bonfire-networks/bonfire-app/issues/1698#issuecomment-3692147409"]
462 , invoiceLogDescription = "update and fix bugs"
463 }
464 , InvoiceLog
465 { invoiceLogDate = "2025-12-26"
466 , invoiceLogDuration = 1
467 , invoiceLogAction = ["development"]
468 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
469 , invoiceLogReferences = []
470 , invoiceLogDescription = "update to fix bugs"
471 }
472 , InvoiceLog
473 { invoiceLogDate = "2025-12-28"
474 , invoiceLogDuration = 6
475 , invoiceLogAction = ["documentation"]
476 , invoiceLogScope = ["NGIpkgs", "Manuals"]
477 , invoiceLogReferences = []
478 , invoiceLogDescription = "document"
479 }
480 , InvoiceLog
481 { invoiceLogDate = "2025-12-29"
482 , invoiceLogDuration = 2
483 , invoiceLogAction = ["development"]
484 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
485 , invoiceLogReferences = []
486 , invoiceLogDescription = "add more tests"
487 }
488 , InvoiceLog
489 { invoiceLogDate = "2025-12-29"
490 , invoiceLogDuration = 0.5
491 , invoiceLogAction = ["review"]
492 , invoiceLogScope = ["NGIpkgs", "Funkwhale"] -- goes into NGI Review
493 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1707#discussion_r2651644145"]
494 , invoiceLogDescription = ""
495 }
496 , InvoiceLog
497 { invoiceLogDate = "2025-12-30"
498 , invoiceLogDuration = 4
499 , invoiceLogAction = ["development"]
500 , invoiceLogScope = ["NGIpkgs", "BEAM"]
501 , invoiceLogReferences = []
502 , invoiceLogDescription = ["improve ", Doc.InlineCode "buildMix", " & ", Doc.InlineCode "mixRelease", " for packaging Elixir software"]
503 }
504 , InvoiceLog
505 { invoiceLogDate = "2026-01-01"
506 , invoiceLogDuration = 4
507 , invoiceLogAction = ["development"]
508 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
509 , invoiceLogReferences = []
510 , invoiceLogDescription = "support other flavours"
511 }
512 , InvoiceLog
513 { invoiceLogDate = "2026-01-03"
514 , invoiceLogDuration = 4
515 , invoiceLogAction = ["development"]
516 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
517 , invoiceLogReferences = []
518 , invoiceLogDescription = "support other flavours, and make update more resilient"
519 }
520 , InvoiceLog
521 { invoiceLogDate = "2026-01-04"
522 , invoiceLogDuration = 2
523 , invoiceLogAction = ["development"]
524 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
525 , invoiceLogReferences = []
526 , invoiceLogDescription = "provide upstream with reproducers"
527 }
528 , InvoiceLog
529 { invoiceLogDate = "2026-01-05"
530 , invoiceLogDuration = 2
531 , invoiceLogAction = ["development"]
532 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
533 , invoiceLogReferences = []
534 , invoiceLogDescription = "update to latest version"
535 }
536 , InvoiceLog
537 { invoiceLogDate = "2026-01-07"
538 , invoiceLogDuration = 5
539 , invoiceLogAction = ["development"]
540 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
541 , invoiceLogReferences = []
542 , invoiceLogDescription = "fix updating"
543 }
544 , InvoiceLog
545 { invoiceLogDate = "2026-01-07"
546 , invoiceLogDuration = 1
547 , invoiceLogAction = ["documentation"]
548 , invoiceLogScope = ["NGIpkgs", "Manuals"] -- goes into NGI Core
549 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/1891"]
550 , invoiceLogDescription = "address reviewer’s comment"
551 }
552 , InvoiceLog
553 { invoiceLogDate = "2026-01-09"
554 , invoiceLogDuration = 2
555 , invoiceLogAction = ["documentation"]
556 , invoiceLogScope = ["NGIpkgs", "Manuals"] -- goes into NGI Core
557 , invoiceLogReferences = []
558 , invoiceLogDescription = "address reviewer’s comments"
559 }
560 , InvoiceLog
561 { invoiceLogDate = "2026-01-09"
562 , invoiceLogDuration = 2
563 , invoiceLogAction = ["development"]
564 , invoiceLogScope = ["NGIpkgs", "Bonfire"]
565 , invoiceLogReferences = ["https://github.com/bonfire-networks/bonfire-app/issues/1730"]
566 , invoiceLogDescription = "answer upstream’s questions"
567 }
568 , InvoiceLog
569 { invoiceLogDate = "2026-01-11"
570 , invoiceLogDuration = 5
571 , invoiceLogAction = ["development"]
572 , invoiceLogScope = ["NGIpkgs", "dnsvizor"]
573 , invoiceLogReferences = []
574 , invoiceLogDescription = ["replace ", Doc.InlineCode "hillingar", " to package MirageOS unikernels"]
575 }
576 , InvoiceLog
577 { invoiceLogDate = "2026-01-09"
578 , invoiceLogDuration = 2
579 , invoiceLogAction = ["organization"]
580 , invoiceLogScope = ["NGIpkgs"]
581 , invoiceLogReferences = []
582 , invoiceLogDescription = "weekly meeting"
583 }
584 , InvoiceLog
585 { invoiceLogDate = "2026-01-12"
586 , invoiceLogDuration = 5
587 , invoiceLogAction = ["development"]
588 , invoiceLogScope = ["NGIpkgs", "dnsvizor"]
589 , invoiceLogReferences = ["https://github.com/ju1m/ngipkgs/commits/dnsvizor/"]
590 , invoiceLogDescription = ["remove the need for ", Doc.InlineCode "--allow-import-from-derivation"]
591 }
592 , InvoiceLog
593 { invoiceLogDate = "2026-01-12"
594 , invoiceLogDuration = 6
595 , invoiceLogAction = ["documentation"]
596 , invoiceLogScope = ["NGIpkgs", "Manuals"] -- goes into NGI Core
597 , invoiceLogReferences = []
598 , invoiceLogDescription = "render options"
599 }
600 , InvoiceLog
601 { invoiceLogDate = "2026-01-13"
602 , invoiceLogDuration = 1
603 , invoiceLogAction = ["documentation"]
604 , invoiceLogScope = ["NGIpkgs", "Manuals"] -- goes into NGI Core
605 , invoiceLogReferences = []
606 , invoiceLogDescription = "update"
607 }
608 , InvoiceLog
609 { invoiceLogDate = "2026-01-16"
610 , invoiceLogDuration = 2
611 , invoiceLogAction = ["organization"]
612 , invoiceLogScope = ["NGIpkgs"]
613 , invoiceLogReferences = []
614 , invoiceLogDescription = "weekly meeting"
615 }
616 , InvoiceLog
617 { invoiceLogDate = "2026-01-19"
618 , invoiceLogDuration = 2
619 , invoiceLogAction = ["documentation"]
620 , invoiceLogScope = ["NGIpkgs", "Manuals"] -- goes into NGI Core
621 , invoiceLogReferences = []
622 , invoiceLogDescription = "split into several PDF"
623 }
624 , InvoiceLog
625 { invoiceLogDate = "2026-01-22"
626 , invoiceLogDuration = 4
627 , invoiceLogAction = ["development"]
628 , invoiceLogScope = ["NGIpkgs", "Manuals"] -- goes into NGI Core
629 , invoiceLogReferences = ["https://github.com/ngi-nix/ngipkgs/pull/2010"]
630 , invoiceLogDescription = "address reviewers’ concerns"
631 }
632 , InvoiceLog
633 { invoiceLogDate = "2026-01-23"
634 , invoiceLogDuration = 1.5
635 , invoiceLogAction = ["organization"]
636 , invoiceLogScope = ["NGIpkgs"]
637 , invoiceLogReferences = []
638 , invoiceLogDescription = "weekly meeting"
639 }
640 , InvoiceLog
641 { invoiceLogDate = "2026-01-25"
642 , invoiceLogDuration = 4
643 , invoiceLogAction = ["development"]
644 , invoiceLogScope = ["NGIpkgs", "Seppo"]
645 , invoiceLogReferences = []
646 , invoiceLogDescription = "begin packaging"
647 }
648 , InvoiceLog
649 { invoiceLogDate = "2026-01-26"
650 , invoiceLogDuration = 5
651 , invoiceLogAction = ["development"]
652 , invoiceLogScope = ["NGIpkgs", "Seppo"]
653 , invoiceLogReferences = []
654 , invoiceLogDescription = "continue packaging"
655 }
656 , InvoiceLog
657 { invoiceLogDate = "2026-01-27"
658 , invoiceLogDuration = 5
659 , invoiceLogAction = ["development"]
660 , invoiceLogScope = ["NGIpkgs", "Seppo"]
661 , invoiceLogReferences = []
662 , invoiceLogDescription = "continue packaging"
663 }
664 ]
665
666 invoiceRateNGIpkgs =
667 [ ["organization"] := 31.25
668 , ["development"] := 31.25
669 , ["documentation"] := 31.25
670 , ["review"] := 31.25
671 ]
672
673 invoices :: Invoices
674 invoices =
675 traceShowId
676 [ InvoiceId
677 { invoiceIdRecipient = Tests.Organization.nixosFoundationNGITeam
678 , invoiceIdType = InvoiceTypeSale
679 , invoiceIdCount = 1
680 }
681 := let invoiceEmittedOn = "2026-01-22"
682 in invoice
683 { invoiceOrders = ["Contract n°2025-24"]
684 , invoiceEmittedOn
685 , invoicePaymentDueBefore = invoiceEmittedOn & Time.addLocalTime (31 * Time.nominalDay)
686 , invoiceIssuer = Tests.Organization.julmInfo
687 , invoiceRecipient = Tests.Organization.nixosFoundationNGITeam
688 , invoiceRates = invoiceRateNGIpkgs
689 , invoiceMentions =
690 [ InvoiceMentionTVANonApplicable
691 , InvoiceMentionIndemnitéForfaitaire
692 , InvoiceMentionIndemnitéTaux (12.15 :: Amount 100 (UnitName "%"))
693 ]
694 , invoiceLogs =
695 ngipkgsLog
696 & List.filter \inv ->
697 and $
698 list
699 [ inv & invoiceLogDate & (>= "2025-11-06")
700 , inv & invoiceLogDate & (<= "2025-12-22")
701 , inv & invoiceLogScope & (/= ["NGIpkgs", "Manuals"])
702 ]
703 }
704 , InvoiceId
705 { invoiceIdRecipient = Tests.Organization.nixosFoundationNGITeam
706 , invoiceIdType = InvoiceTypeSale
707 , invoiceIdCount = 2
708 }
709 := let invoiceEmittedOn = "2026-01-27"
710 in invoice
711 { invoiceOrders = ["contract n°2026-03"]
712 , invoiceEmittedOn
713 , invoicePaymentDueBefore = invoiceEmittedOn & Time.addLocalTime (31 * Time.nominalDay)
714 , invoiceIssuer = Tests.Organization.julmInfo
715 , invoiceRecipient = Tests.Organization.nixosFoundationNGITeam
716 , invoiceRates = invoiceRateNGIpkgs
717 , invoiceMentions =
718 [ InvoiceMentionTVANonApplicable
719 , InvoiceMentionIndemnitéForfaitaire
720 , InvoiceMentionIndemnitéTaux (12.15 :: Amount 100 (UnitName "%"))
721 ]
722 , invoiceLogs =
723 ngipkgsLog
724 & List.filter \inv ->
725 and $
726 [ inv & invoiceLogDate & (>= "2025-12-23")
727 , inv & invoiceLogDate & (<= "2026-12-31")
728 , inv & invoiceLogScope & (/= ["NGIpkgs", "Manuals"])
729 , inv & invoiceLogScope & (/= ["NGIpkgs", "Funkwhale"])
730 , not $
731 and $
732 [ inv & invoiceLogDate & (>= "2026-01-09")
733 , inv & invoiceLogDate & (<= "2026-01-28")
734 , inv & invoiceLogAction & (== ["organization"])
735 , inv & invoiceLogScope & (== ["NGIpkgs"])
736 ]
737 & list
738 ]
739 & list
740 }
741 , InvoiceId
742 { invoiceIdRecipient = Tests.Organization.nixosFoundationNGITeam
743 , invoiceIdType = InvoiceTypeSale
744 , invoiceIdCount = 3
745 }
746 := let invoiceEmittedOn = "2026-01-28"
747 in invoice
748 { invoiceOrders = ["contract n°2026-FixMe"]
749 , invoiceEmittedOn
750 , invoicePaymentDueBefore = invoiceEmittedOn & Time.addLocalTime (31 * Time.nominalDay)
751 , invoiceIssuer = Tests.Organization.julmInfo
752 , invoiceRecipient = Tests.Organization.nixosFoundationNGITeam
753 , invoiceRates = invoiceRateNGIpkgs
754 , invoiceMentions =
755 [ InvoiceMentionTVANonApplicable
756 , InvoiceMentionIndemnitéForfaitaire
757 , InvoiceMentionIndemnitéTaux (12.15 :: Amount 100 (UnitName "%"))
758 ]
759 , invoiceLogs =
760 ngipkgsLog
761 & List.filter \inv ->
762 or $
763 [ and $
764 [ inv & invoiceLogDate & (>= "2026-01-21")
765 , inv & invoiceLogDate & (<= "2026-12-31")
766 , inv & invoiceLogScope & (== ["NGIpkgs", "Manuals"])
767 ]
768 & list
769 , and $
770 [ inv & invoiceLogDate & (>= "2025-12-29")
771 , inv & invoiceLogDate & (<= "2026-12-31")
772 , inv & invoiceLogScope & (== ["NGIpkgs", "Funkwhale"])
773 ]
774 & list
775 , and $
776 [ inv & invoiceLogDate & (>= "2026-01-09")
777 , inv & invoiceLogDate & (<= "2026-01-28")
778 , inv & invoiceLogAction & (== ["organization"])
779 , inv & invoiceLogScope & (== ["NGIpkgs"])
780 ]
781 & list
782 ]
783 & list
784 }
785 ]
786 & Map.fromListWith undefined