Commit graph

6 commits

Author SHA1 Message Date
Phil Elson
c8f39dc26b Track down the issue with the expert app and typing.
The visitor pattern in the StateBuilder means that it is easy to miss type changes in the dataclass definition.
2021-01-06 16:21:33 +01:00
Phil Elson
f968075116 Add the README as a user-guide in the calculator application. 2020-11-11 10:11:34 +01:00
Phil Elson
331b8e733f Fix to use the updated PiecewiseConstant scheme for temperatures, and turn on testing, even if trivial, for the report generation. 2020-11-05 23:22:17 +01: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
Phil Elson
ca5633a988 Bring over the prototyped voila app, and handle installation dependencies correctly. 2020-10-20 09:51:34 +02:00
Phil Elson
4e21c0efb0 Added an initial project structure. 2020-10-19 13:49:40 +02:00