Bug 882 - add support for showing the nearest budgeting parent that is included in the MoU
Summary: add support for showing the nearest budgeting parent that is included in the MoU
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: Other Linux
: --- enhancement
Assignee: Jacob Lifshay
URL:
Depends on:
Blocks:
 
Reported: 2022-07-05 05:28 BST by Jacob Lifshay
Modified: 2023-09-20 12:15 BST (History)
3 users (show)

See Also:
NLnet milestone: NLnet.2021.02A.052.CryptoRouter
total budget (EUR) for completion of task and all subtasks: 1400
budget (EUR) for this task, excluding subtasks' budget: 1400
parent task for budget allocation: 775
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:
lkcl = { amount = 450, submitted = 2023-03-25, paid = 2023-04-26 } [jacob] amount = 950 submitted = 2023-06-05 paid = 2023-06-21


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Lifshay 2022-07-05 05:28:46 BST
see:
https://libre-soc.org/irclog/%23libre-soc.2022-07-05.log.html#t2022-07-05T04:47:20

I added the cf_is_in_nlnet_mou2 field to bugzilla already.
Comment 1 Jacob Lifshay 2022-07-05 09:04:55 BST
I added support in the code:
https://git.libre-soc.org/?p=utils.git;a=commit;h=1e8321a9cb1030d4e1fa47e1a9ec349ac6d0768d

All we need now is to go through all the milestones' subtasks and to set the cf_is_in_nlnet_mou2 flag as appropriate. I already set it to the correct values for all the tasks in the cryptorouter MoU and for all the milestones themselves.
Comment 2 Jacob Lifshay 2022-07-05 09:12:35 BST
parent trees:
#190 -> #775 -> #589
#60 -> #77 -> #48 -> #191

Selected output generated by budget-sync:
* [Bug #190](https://bugs.libre-soc.org/show_bug.cgi?id=190):
  Setup Gitlab CI Runner for Kazan on a computer
    * €1400 which is the total amount
    * the closest parent task which is in the MoU is
      [Bug #775](https://bugs.libre-soc.org/show_bug.cgi?id=775)

* [Bug #60](https://bugs.libre-soc.org/show_bug.cgi?id=60):
  N\-stage 64\-bit multiplier pipeline needed \(signed/unsigned\)
    * paid on 2019-06-04
    * €2500 which is the total amount
    * the closest parent task which is in the MoU is
      [Bug #48](https://bugs.libre-soc.org/show_bug.cgi?id=48)
Comment 3 Jacob Lifshay 2022-07-06 04:44:09 BST
Luke and I finished getting it to work without a new bugzilla field.

My post-luke-changes commit:
https://git.libre-soc.org/?p=utils.git;a=commitdiff;h=589c66b129006099e7279bc08b7cc79e8caf5a81

I also added a .gitlab-ci.yml file to utils.git:
https://git.libre-soc.org/?p=utils.git;a=blob;f=.gitlab-ci.yml;h=6d392ffc9184eb2f51e75f04dfbee2e3ec00d352;hb=2d48cb8c10a91fc858fe847d4b665cf79633c4b0

Luke, what do you think is an appropriate budget for this? I'd like to include it in the RFPs I'm submitting shortly.
Comment 4 Luke Kenneth Casson Leighton 2022-07-06 08:55:29 BST
actually i'm reopening this one, there's one more thing needed:
a "sum" of the amounts per MoU milestone.

in the new HTTP forms they now have this:
Task: SimpleV € 8 000
Milestone: http://bugs.libre-riscv.org/show_bug.cgi?id=213 <= € 8 000 "entrybox"

so if there are two sub-sub-tasks submitted for an RFP's MoU milestone
we need the total amount to be entered *under the sub-task* to be
auto-calculated.
Comment 5 Jacob Lifshay 2022-07-06 09:24:34 BST
assuming luke meant to comment here rather than:
https://bugs.libre-soc.org/show_bug.cgi?id=775#c2

comment contents:

so as an example:

## Payment not yet submitted


### NLNet.2019.10.032.Formal

* [Bug #418](https://bugs.libre-soc.org/show_bug.cgi?id=418):
  SPR pipeline formal correctness proof needed
    * this task is part of MoU milestone
      [Bug #195](https://bugs.libre-soc.org/show_bug.cgi?id=195)
    * &euro;350 out of total of &euro;400
* [Bug #835](https://bugs.libre-soc.org/show_bug.cgi?id=835):
  add support for smtlib2 floating\-point to yosys and nmigen
    * this task is part of MoU milestone
      [Bug #196](https://bugs.libre-soc.org/show_bug.cgi?id=196)
    * &euro;800 out of total of &euro;2600
* [Bug #838](https://bugs.libre-soc.org/show_bug.cgi?id=838):
  sync or at least statically check fields\.text, power\_decoder, trans/svp64, CSVs between each other
    * this task is part of MoU milestone
      [Bug #577](https://bugs.libre-soc.org/show_bug.cgi?id=577)
    * &euro;300 out of total of &euro;1500
* [Bug #867](https://bugs.libre-soc.org/show_bug.cgi?id=867):
  add svindex instruction to binutils \(and openpower\-isa infrastructure\)
    * this task is part of MoU milestone
      [Bug #577](https://bugs.libre-soc.org/show_bug.cgi?id=577)
    * &euro;500 out of total of &euro;1200

vvvvvvv

Total amounts per MoU Milestone:

* [Bug #418](...)
  EUR 350 (195)
* [Bug #577](...)
  EUR 800 (867,838)
* [Bug #835](...)
  EUR 800 (196)

^^^^^^^

no need for the full URL for the sub-tasks, just the bug-numbers
a compact table that aids and assists in putting in the correct
total amount for each MoU Milestone

this is for audit purposes so the EU is happy that there's a paper
trail to the signed MoU
Comment 6 Jacob Lifshay 2022-07-07 08:41:05 BST
I added calculating subtotals for MoU Milestones for subsets of bugs:
https://git.libre-soc.org/?p=utils.git;a=commit;h=1677f851d34271d1c01c3070cf491116c26b85bd

This should be sufficient for sending emails.

if/when we need to add support for programmaticly submitting HTML forms, enough will need to be (re-)written that we will probably want to customize the logic for that specifically. HTML form stuff should be a completely separate task, therefore I'm considering this task completed.

demo output:
$ budget-sync -c budget-sync-config.toml --subset-person=jacob --subset=44,60,63
bugs loaded 100 101
bugs loaded 100 201
bugs loaded 100 301
bugs loaded 100 401
bugs loaded 100 501
bugs loaded 99 601
bugs loaded 100 701
bugs loaded 100 801
bugs loaded 85 901
bugs loaded 0 1001
ERROR:root:Budget assigned to task including subtasks (cf_total_budget field) doesn't match calculated value: bug #48, calculated value 15525
ERROR:root:Total budget assigned to payees (cf_payees_list) doesn't match expected value: bug #882, calculated total 1400, expected value 1200
ERROR:root:Budget assigned to task excluding subtasks (cf_budget field) doesn't match calculated value: bug #775, calculated value 1400
<!-- autogenerated by budget-sync -->

# Jacob R. Lifshay (programmerjake)



# Status Tracking


## Paid by NLNet


### NLnet.2019.02.012

* [Bug #44](https://bugs.libre-soc.org/show_bug.cgi?id=44):
  IEEE754 FPU inverse \(reciprocal\) sqrt
    * paid on 2019-08-16
    * &euro;900 out of total of &euro;1500
    * this task is part of MoU Milestone
      [Bug #48](https://bugs.libre-soc.org/show_bug.cgi?id=48)
* [Bug #60](https://bugs.libre-soc.org/show_bug.cgi?id=60):
  N\-stage 64\-bit multiplier pipeline needed \(signed/unsigned\)
    * paid on 2019-06-04
    * &euro;2500 which is the total amount
    * this task is part of MoU Milestone
      [Bug #48](https://bugs.libre-soc.org/show_bug.cgi?id=48)
* [Bug #63](https://bugs.libre-soc.org/show_bug.cgi?id=63):
  queue \(FIFO\) library routine needed
    * paid on 2019-11-19
    * &euro;400 out of total of &euro;800
    * this task is part of MoU Milestone
      [Bug #62](https://bugs.libre-soc.org/show_bug.cgi?id=62)

#### MoU Milestone subtotals for paid payments

* [Bug #48](https://bugs.libre-soc.org/show_bug.cgi?id=48):
  Complete IEEE754 floating point pipeline
    * subtotal &euro;3400 out of total including subtasks of &euro;15525 (budget is fixed from amount appearing in bug report, which is &euro;15000)
* [Bug #62](https://bugs.libre-soc.org/show_bug.cgi?id=62):
  nmigen\-based general\-purpose util / data handling / io\-control library needed
    * subtotal &euro;400 out of total including subtasks of &euro;4550
Comment 7 Luke Kenneth Casson Leighton 2022-07-07 09:24:40 BST
nope, totally good. bonus points at some point for grouping by date,
which roughly corresponds to a given RFP, actually both are useful
(total and total-by-date)