diff options
| -rw-r--r-- | requirements/assumptions/ass-021.md | 4 | ||||
| -rw-r--r-- | requirements/catalogue/req-068.md | 2 | ||||
| -rw-r--r-- | requirements/catalogue/req-069.md | 2 | ||||
| -rw-r--r-- | requirements/catalogue/req-085.md | 2 | ||||
| -rw-r--r-- | requirements/catalogue/req-086.md | 2 | ||||
| -rw-r--r-- | requirements/catalogue/req-087.md | 6 | ||||
| -rw-r--r-- | requirements/catalogue/req-088.md | 36 | ||||
| -rw-r--r-- | requirements/catalogue/req-089.md | 11 | ||||
| -rw-r--r-- | requirements/catalogue/req-090.md | 11 | ||||
| -rw-r--r-- | requirements/data_models/dml-pipe.md | 2 | ||||
| -rw-r--r-- | requirements/tasks/epic-000.md | 1 | ||||
| -rw-r--r-- | requirements/tasks/epic-005.md | 1 | ||||
| -rw-r--r-- | requirements/tasks/task-028.md | 3 | ||||
| -rw-r--r-- | requirements/tasks/task-057.md | 10 | ||||
| -rw-r--r-- | requirements/tasks/task-058.md | 10 |
15 files changed, 95 insertions, 8 deletions
diff --git a/requirements/assumptions/ass-021.md b/requirements/assumptions/ass-021.md new file mode 100644 index 0000000..fffac36 --- /dev/null +++ b/requirements/assumptions/ass-021.md @@ -0,0 +1,4 @@ +# ass-021 + +There is no feasible SMS UI for creating, updating and deleting buckets or pipes +which any user would ever choose to use. diff --git a/requirements/catalogue/req-068.md b/requirements/catalogue/req-068.md index 7e61976..d744c3d 100644 --- a/requirements/catalogue/req-068.md +++ b/requirements/catalogue/req-068.md @@ -3,6 +3,6 @@ Schist must have a desktop interface for creating, updating and deleting buckets. -Sources: req-056, req-000, req-025 +Sources: req-056, req-000, req-025, req-089 Satisfied by: task-030 diff --git a/requirements/catalogue/req-069.md b/requirements/catalogue/req-069.md index 8e9f559..7b56720 100644 --- a/requirements/catalogue/req-069.md +++ b/requirements/catalogue/req-069.md @@ -2,6 +2,6 @@ Schist must have a desktop interface for creating, updating and deleting pipes. -Sources: req-038, req-000, req-025 +Sources: req-038, req-000, req-025, req-089 Satisfied by: task-029 diff --git a/requirements/catalogue/req-085.md b/requirements/catalogue/req-085.md index a5d1940..c8ce9af 100644 --- a/requirements/catalogue/req-085.md +++ b/requirements/catalogue/req-085.md @@ -6,3 +6,5 @@ planned incomings and outgoings, so that my incomings and outgoings are roughly equal in the long run. Sources: req-025, req-000 + +Satisfied by: req-088 diff --git a/requirements/catalogue/req-086.md b/requirements/catalogue/req-086.md index 2d5af8e..40acb29 100644 --- a/requirements/catalogue/req-086.md +++ b/requirements/catalogue/req-086.md @@ -2,6 +2,6 @@ Schist must have a Web interface for creating, updating and deleting buckets. -Source: req-056 +Sources: req-056, req-090 Satisfied by: task-055 diff --git a/requirements/catalogue/req-087.md b/requirements/catalogue/req-087.md index 79c33ea..f3e7748 100644 --- a/requirements/catalogue/req-087.md +++ b/requirements/catalogue/req-087.md @@ -1,7 +1,7 @@ -# req-086 +# req-087 -Schist must have a Web interface for creating, updating and deleting buckets. +Schist must have a Web interface for creating, updating and deleting pipes. -Source: req-038 +Sources: req-038, req-090 Satisfied by: task-056 diff --git a/requirements/catalogue/req-088.md b/requirements/catalogue/req-088.md new file mode 100644 index 0000000..a1791fa --- /dev/null +++ b/requirements/catalogue/req-088.md @@ -0,0 +1,36 @@ +# req-088 + +As a user, when I'm creating, updating and deleting my buckets and pipes, I want +to see the result of the procedure, +`calculate_long_term_expected_monthly_tank_change`, described below, +prominently, so that I see a prominent number which summarises the long-term +difference between my planned incomings and outgoings. + +Source: req-085 + +Satisfied by: ass-009, req-089, req-090, ass-021, dml-pipe + +## calculate_long_term_expected_monthly_tank_change + +Explanation: the least common multiple of a day, a week, a month and a year is +28 years. This procedure works by summing what the tank draw of each pipe over +28 years would be, and then dividing by 28 x 12 to get the long-term monthly +tank draw. + +1. Let `factor` be `12 x 28`, that is, `336`. +2. Let `tank_change_over_28_years` be the sum of + `calculate_tank_draw_for_pipe_over_28_years(pipe)` for each pipe, `pipe`. +3. Return `tank_change_over_28_years / factor`. + +## calculate_tank_draw_for_pipe_over_28_years + +Inputs: + +- `pipe`: a pipe + +1. If `pipe.period` is `day`, let `factor` be `(365 x 3 + 366) x 7`, that is, + `10,227`. +2. If `pipe.period` is `week`, let `factor` be `365 x 3 + 366`, that is, `1461`. +3. If `pipe.period` is `month`, let `factor` be `12 x 28`, that is, `336`. +4. If `pipe.period` is `year`, let `factor` be `28`. +5. Return `pipe.amount x factor`. diff --git a/requirements/catalogue/req-089.md b/requirements/catalogue/req-089.md new file mode 100644 index 0000000..349d4d9 --- /dev/null +++ b/requirements/catalogue/req-089.md @@ -0,0 +1,11 @@ +# req-089 + +As a user, when I'm creating, updating and deleting my buckets and pipes in +Schist's desktop UI, I want to see the result of the procedure, +`calculate_long_term_expected_monthly_tank_change`, as described in req-088, +prominently, so that I see a prominent number which summarises the long-term +difference between my planned incomings and outgoings. + +Source: req-088 + +Satisfied by: req-068, req-069, task-057 diff --git a/requirements/catalogue/req-090.md b/requirements/catalogue/req-090.md new file mode 100644 index 0000000..5b72fca --- /dev/null +++ b/requirements/catalogue/req-090.md @@ -0,0 +1,11 @@ +# req-090 + +As a user, when I'm creating, updating and deleting my buckets and pipes in +Schist's Web UI, I want to see the result of the procedure, +`calculate_long_term_expected_monthly_tank_change`, as described in req-088, +prominently, so that I see a prominent number which summarises the long-term +difference between my planned incomings and outgoings. + +Source: req-088 + +Satisfied by: req-086, req-087, task-058 diff --git a/requirements/data_models/dml-pipe.md b/requirements/data_models/dml-pipe.md index d889b0a..7a6825d 100644 --- a/requirements/data_models/dml-pipe.md +++ b/requirements/data_models/dml-pipe.md @@ -18,4 +18,4 @@ Constraints: - `month` - `year` -Sources: req-017, req-037 +Sources: req-017, req-037, req-088 diff --git a/requirements/tasks/epic-000.md b/requirements/tasks/epic-000.md index 5c66ee0..2ba3f62 100644 --- a/requirements/tasks/epic-000.md +++ b/requirements/tasks/epic-000.md @@ -13,5 +13,6 @@ Status: not ready - [ ] task-001 (inserting transactions) - [ ] task-029 (CRUDing pipes) - [ ] task-030 (CRUDing buckets) +- [ ] task-057 (long-term expected monthly tank change) - [ ] task-013 (config & caches) - [ ] task-051 (test for accurate bucket balances) diff --git a/requirements/tasks/epic-005.md b/requirements/tasks/epic-005.md index fb477a4..4dd54b6 100644 --- a/requirements/tasks/epic-005.md +++ b/requirements/tasks/epic-005.md @@ -15,5 +15,6 @@ Blocked by: epic-006 - [ ] task-054 (inserting transactions) - [ ] task-055 (CRUDing buckets) - [ ] task-055 (CRUDing pipes) +- [ ] task-058 (long-term expected monthly tank change) - [ ] task-017 (hook up REST API) - [ ] task-052 (test for accurate bucket balances) diff --git a/requirements/tasks/task-028.md b/requirements/tasks/task-028.md index 7008eb7..5e97b0e 100644 --- a/requirements/tasks/task-028.md +++ b/requirements/tasks/task-028.md @@ -12,7 +12,8 @@ The designs should include interfaces for: - [ ] Creating buckets - [ ] Updating buckets - [ ] Deleting buckets +- [ ] Viewing the long-term expected monthly tank change -Sources: task-029, task-030 +Sources: task-029, task-030, task-058 Epic: epic-000 diff --git a/requirements/tasks/task-057.md b/requirements/tasks/task-057.md new file mode 100644 index 0000000..46db06c --- /dev/null +++ b/requirements/tasks/task-057.md @@ -0,0 +1,10 @@ +# task-057 + +Schist's desktop UI should display prominently the result of the procedure, +`calculate_long_term_expected_monthly_tank_change`, as described in req-088, in +any view from which the user may be thinking about how to create, update or +delete their buckets or pipes. + +Source: req-089 + +Epic: epic-000 diff --git a/requirements/tasks/task-058.md b/requirements/tasks/task-058.md new file mode 100644 index 0000000..a4fc2fb --- /dev/null +++ b/requirements/tasks/task-058.md @@ -0,0 +1,10 @@ +# task-057 + +Schist's Web UI should display prominently the result of the procedure, +`calculate_long_term_expected_monthly_tank_change`, as described in req-088, in +any view from which the user may be thinking about how to create, update or +delete their buckets or pipes. + +Source: req-088 + +Epic: epic-005 |
