InstituteforDiseaseModeling / covasim

COVID-19 Agent-based Simulator (Covasim): a model for exploring coronavirus dynamics and interventions
https://covasim.org
MIT License
255 stars 224 forks source link

Appling Aggregate patterns to Misc.py #339

Closed haoye123650 closed 3 years ago

haoye123650 commented 3 years ago

Introduction

This project "Covasim" is what I choose for our school project. I am learning and trying to apply aggregate pattern to the project.

The changes that I have made

I have made several changes to 9 files, but the major change that I have made is which I created a new class "manage_data" in the misc.py.

The reason why I made those changes

I noticed there are four function ("load_data", "load", "save", "savefig") which they are all designed to manage the data. So, I grouped them into one aggregate class ("manage_data"). For other files that called function from the misc.py, I added the class name in the call.