yannickoswald / covpol

COVPOL: An agent-based model of the international COVID-19 policy response
3 stars 1 forks source link

Comments on Yannick's code #1

Closed nickmalleson closed 1 year ago

nickmalleson commented 2 years ago

Hi Yannick,

Here are some comments on your code. It's all minor stuff, very impressive how much the code has come on.

I'm not sure if using a github issue is the best way to do this, but at least it makes it easy to reference the source directly.

First general comment: now that you're using gitub you don't need to save different file version (model1.py, model2.py, etc.). Every time you commits, github saves the old and new versions of the files, so you can go back to old file versions if you need to. You can also 'tag' the code to label it and make it easy to find a old version )

You should add a .gitignore file to your repository so that it contains the things you need to run the code (mainly source and documentation), but no temporary files that are created when you run it. Here's an example of one I have used: https://github.com/Urban-Analytics/dust/blob/main/.gitignore You should ignore things that are specific to your local installation, like temporary python compiled files (e.g. __pycache__ directory https://github.com/eeyouol/Covid_policy_response_abm/tree/master/__pycache__ ) and possibily your spyder project stuff (https://github.com/eeyouol/Covid_policy_response_abm/tree/master/.spyproject/config) (although maybe google 'sypder project files github' to see what should and shouldn't be included in a repository). These don't need to be in the repo because when someone runs the code they will be created automatically.

Some specific comments:

yannickoswald commented 1 year ago

old comments and worked through this a while ago