Commit graph

1398 commits

Author SHA1 Message Date
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
markus
d959e8ee00 add new fixtures 2020-10-20 16:31:40 +02:00
markus
0a3785c2d1 correct type hint on q_air_mech 2020-10-20 16:31:20 +02:00
markus
aa3a58caae update notebook with ventilation changes 2020-10-20 16:23:21 +02:00
markus
8e524fea1b add colons to dataclass attribute docstrings 2020-10-20 16:19:04 +02:00
markus
da026e6265 tidy up long expression 2020-10-20 16:14:08 +02:00
markus
5fbda6afe3 move window parameters to Ventilation 2020-10-20 16:10:52 +02:00
markus
496f2d2a81 add type hint for room 2020-10-20 15:43:48 +02:00
markus
5273455a11 update correct concentrations to reflect QairNat 2020-10-20 14:57:08 +02:00
markus
d37927d78b update baseline_model fixture 2020-10-20 14:45:01 +02:00
markus
aff4cf84ed use new air_exchange function 2020-10-20 14:44:44 +02:00
markus
7dcdc0de84 replace ventilation scheme classes 2020-10-20 14:44:29 +02:00
markus
032bc6d0ad add window parameters as Room attributes 2020-10-20 14:43:45 +02:00
markus
35dff3d9ac add time as argument to infectious_virus_removal_rate 2020-10-20 14:41:11 +02:00
markus
549cc7cbc2 import ipywidgets 2020-10-20 11:47:07 +02:00
markus
715aaf7d2e create covid-calculator.ipynb 2020-10-20 11:27:51 +02:00
Philip James Elson
48014f8e15 Merge branch 'trigger_after_test' into 'master'
Trigger an openshift deployment if the tests pass.

See merge request cara/cara!1
2020-10-20 08:27:11 +00:00
Phil Elson
f684f73d82 Trigger an openshift deployment if the tests pass. 2020-10-20 10:26:29 +02:00
Phil Elson
8eb256795c Fix the move from a package name of CARA to cara. 2020-10-20 09:55:39 +02:00
Phil Elson
ca5633a988 Bring over the prototyped voila app, and handle installation dependencies correctly. 2020-10-20 09:51:34 +02:00
Phil Elson
65751d669c Add the models and tests from the original prototype. 2020-10-20 09:11:28 +02:00
Phil Elson
0df60c940f Add basic CI configuration to ensure that the tests pass before publishing. 2020-10-19 13:57:39 +02:00
Phil Elson
4e21c0efb0 Added an initial project structure. 2020-10-19 13:49:40 +02:00