InstituteforDiseaseModeling / covasim

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

Apply aggregates pattern to requirements.py #328

Closed seran2 closed 2 years ago

seran2 commented 3 years ago

What is the current problem?

Currently in the requirements.py file, there are some independent functions for checking that the correct version of libraries are installed and displaying warning messages. These entities do not have any consistency holding them together.

What is the solution?

This problem can be solved by applying aggregate patterns. We can treat the cluster domains as one single unit. This can be done by putting the functions into a class: check_dependencies. Inside the check_dependencies aggregate the following functions will exist: check_sciris() and check_synthpops().

Note: This change is for a school lab project.