Commit graph

72 commits

Author SHA1 Message Date
Phil Elson
adfd4058d9 Add the POST endpoint and the infrastructure to allow the calculator form to be developed. 2020-11-03 16:40:00 +01:00
Philip James Elson
f2644a720d Merge branch 'develop/nginx_proxy' into 'master'
Fix the rewrite of the old URL, and allow the build to be triggered correctly by the CI.

See merge request cara/cara!11
2020-11-03 12:26:01 +00:00
Phil Elson
8ddef2584b Fix the rewrite of the old URL, and allow the build to be triggered correctly by the CI. 2020-11-03 13:22:32 +01:00
Philip James Elson
9ffc0e35c1 Merge branch 'develop/nginx_proxy' into 'master'
Put a reverse-proxy in front of the voila server to give us more flexibility

Closes #10

See merge request cara/cara!10
2020-11-03 11:50:21 +00:00
Phil Elson
ffa2e53994 Prepare the repository for having a separate calculator app. 2020-11-03 12:42:14 +01:00
Phil Elson
d44ae5501f Put an nginx reverse-proxy in front of the voila server to give us more flexibility in how we present the endpoint. 2020-11-03 11:46:53 +01:00
Markus Kongstein Rognlien
cf2ca07768 Merge branch 'covid-calculator' into 'master'
Covid calculator

See merge request cara/cara!8
2020-10-28 09:40:58 +00:00
markus
b7bd89dcc8 remove empty cells 2020-10-27 16:07:17 +01:00
markus
cd50c4110f revert to master-state 2020-10-27 16:06:39 +01:00
Markus Kongstein Rognlien
b48a296132 Merge branch 'pelson/improved_concentration_calculation' into 'master'
Re-work the time interval concept, and fix the concentration calculation for intervals

Closes #14

See merge request cara/cara!9
2020-10-27 15:02:34 +00:00
markus
5fdf55d9ed padding tweaks 2020-10-27 15:16:14 +01:00
Phil Elson
b8b322849b Code review. 2020-10-27 15:06:28 +01:00
Phil Elson
332f2414ad Abstract the presence time as an interval. 2020-10-27 14:47:45 +01:00
Phil Elson
2a20bf834f Improve the concentration calculation scheme by more strictly defining the time interval concept to be closed start and open end 2020-10-27 14:34:45 +01:00
markus
ab8c0702ef add function for getting value 2020-10-27 11:51:49 +01:00
markus
afd6d4db58 fix double lunch-minute 2020-10-27 10:43:07 +01:00
markus
5c907455e3 preliminary notebook complete 2020-10-27 10:22:13 +01:00
Phil Elson
a70f899b52 Extract the concept of an interval for the Ventilation schemes, and correctly handle the time dependence of Ventilation in the concentration calculations. 2020-10-27 06:27:38 +01:00
Philip James Elson
943a65b063 Merge branch 'application_abstraction' into 'master'
Add infection probability calculation to the model

See merge request cara/cara!6
2020-10-26 19:34:19 +00:00
Phil Elson
739864cc28 Add infection probability calculation to the model, and introduce it into the model output in a rudimentary form. 2020-10-26 20:33:17 +01:00
Philip James Elson
55cf9820fa Merge branch 'pelson/improved_concentration_calculation' into 'master'
Simplify (and fix) the concentration calculation.

See merge request cara/cara!7
2020-10-26 19:25:41 +00:00
Phil Elson
9e9f1a28bc Fix a bug in the calculation of the concentration. 2020-10-26 20:21:15 +01:00
Phil Elson
4722a5511c Simplify the concentration calculation. 2020-10-26 20:12:54 +01:00
Philip James Elson
d984866396 Merge branch 'application_abstraction' into 'master'
Fix the broken mask selection widget.

See merge request cara/cara!5
2020-10-26 13:38:35 +00:00
Phil Elson
568f7ca56b Fix the broken mask selection widget. 2020-10-26 14:36:54 +01:00
Philip James Elson
5168020ed5 Merge branch 'application_abstraction' into 'master'
Implement all of the major model parameter widgets

See merge request cara/cara!4
2020-10-26 12:48:29 +00:00
Phil Elson
6463e04e71 Undo the change to the notebook. 2020-10-26 13:45:04 +01:00
Phil Elson
28ae62e040 Fix the Ventilation time units bug. 2020-10-26 13:42:44 +01:00
Phil Elson
a9d07ebb34 Fix the failing test, but without actually implemeting the necessary transactional behaviour. 2020-10-26 13:10:57 +01:00
Phil Elson
9037e68c31 Add names states for the Ventilation schemes, allowing their state to be persisted even if that scheme isn't currently active. 2020-10-26 11:12:16 +01:00
markus
2a7fa5b106 add elements for setting time, date and breaks 2020-10-26 09:57:33 +01:00
Philip James Elson
77a5808118 Merge branch 'application_abstraction' into 'master'
Abstract the model state so that we can mutate it conveniently in applications

See merge request cara/cara!3
2020-10-26 08:18:51 +00:00
Phil Elson
a95181612b Implement most of the model parameters in widgets. 2020-10-26 08:21:31 +01:00
markus
786524a8eb add padding between boxes 2020-10-22 16:24:15 +02:00
markus
3e3c0af9d7 add ventilation menu 2020-10-22 15:41:52 +02:00
markus
5e3b5826cc add mechanical ventilation box 2020-10-22 11:35:21 +02:00
markus
8cdd350157 use style to make enough room for description 2020-10-22 10:49:49 +02:00
markus
bdf9614f6a fix box for providing room dimensions 2020-10-22 10:40:40 +02:00
Phil Elson
f63e1d3760 Abstract the model state so that we can mutate it conveniently.
This rather large change adds a layer between the underlying (immutable) model and the application.
In doing so we can avoid the use of a global state (useful for the purposes of configuring multiple models in the same application later on) and it also unlocks the ability to implement an MVC-like separation of concerns - again, the intention is that when it comes to comparisons, we will just be able to re-use our application views.

I was hoping that ``cara.state`` could have been avoided in lieu of using traitlets, but unfortunately I found a number of limitations which were prohibitive for its use here.
Foremost of which was the lack of first-class dataclass support and the difficulty in needing either to use instances of the model (immutable) or duplicate the model and its structure in a mutable form and use the ``traitlets.Instance`` type.
Instead I opted for doing it myself - the ``cara.state`` module would make a very good standalone project in the future.
2020-10-21 20:59:01 +02:00
markus
ba257465c4 unfinished room parameter input 2020-10-21 16:42:10 +02:00
markus
f308c9d287 use HTML for title 2020-10-21 15:58:06 +02:00
markus
5cf0c4787f use placeholder as prompt 2020-10-21 15:52:21 +02:00
markus
aa229f4fb4 add intro section, but descriptions are cut off 2020-10-21 15:26:05 +02:00
Philip James Elson
69730bfb2a Merge branch 'ventilation' into 'master'
Ventilation

See merge request cara/cara!2
2020-10-21 08:26:35 +00:00
markus
ffd0bc80cd use smaller fixtures 2020-10-21 10:22:28 +02:00
markus
ea47010e3b hard-code correct answers in tests 2020-10-21 10:18:43 +02:00
markus
964aff6217 add default value to cd_b 2020-10-21 10:05:06 +02:00
markus
2e03934db7 add docstring to cd_b 2020-10-21 10:04:36 +02:00
markus
5ee96a1ddf add test for PeriodicHEPA 2020-10-20 16:42:41 +02:00
markus
f4dc698d1c add test for PeriodicWindow 2020-10-20 16:41:31 +02:00