COVID Airborne Risk Assessment tool
Find a file
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
app Abstract the model state so that we can mutate it conveniently. 2020-10-21 20:59:01 +02:00
cara Abstract the model state so that we can mutate it conveniently. 2020-10-21 20:59:01 +02:00
.gitlab-ci.yml Trigger an openshift deployment if the tests pass. 2020-10-20 10:26:29 +02:00
app.sh Bring over the prototyped voila app, and handle installation dependencies correctly. 2020-10-20 09:51:34 +02:00
README.md Added an initial project structure. 2020-10-19 13:49:40 +02:00
requirements.txt Bring over the prototyped voila app, and handle installation dependencies correctly. 2020-10-20 09:51:34 +02:00
setup.py Abstract the model state so that we can mutate it conveniently. 2020-10-21 20:59:01 +02:00

CARA - COVID Airborne Risk Assessment

Credits

Development guide

Setting up the application

The https://cern.ch/cara application is running on CERN's OpenShift platform. In order to set it up for the first time, we followed the documentation at https://cern.service-now.com/service-portal?id=kb_article&n=KB0004498. In particular we:

  • Added the OpenShift application deploy key to the GitLab repository
  • Created a Python 3.6 (the highest possible at the time of writing) application in OpenShift
  • Configured a generic webhook on OpenShift, and call that from the CI of the GitLab repository