ImperialCollegeLondon / ReCoDE_IDMS

7 stars 4 forks source link

Code organisation #6

Open dalonsoa opened 2 years ago

dalonsoa commented 2 years ago

This is an umbrella issue to start refactoring the code into something more reusable, sustainable and testable. The idea would be to have the code for Model 1 split in different files depending on its functionality. A possible structure could be the following (feel free to use other names):

The last 3 files only contain functions, not declaration of parameters. Those are declared in the Rmd file and provided as inputs to the functions. Use input arguments with default values for those cases where the user is not likely to change the value you set.

The Rmd file should be heavily documented with high level explanations of what is going on and what each input represents. In the others, each function should be appropriately documented, but that documentation would be more technical and using appropriate formatting.

Issues:

bnc19 commented 2 years ago

This is really helpful, thanks. I will work towards this!