BDI-pathogens / OpenABM-Covid19

OpenABM-Covid19: an agent-based model for modelling the spread of SARS-CoV-2 (coronavirus) and control interventions for the Covid-19 epidemic
GNU General Public License v3.0
114 stars 76 forks source link

Why install python dataclasses? #99

Closed RossBoylan closed 2 years ago

RossBoylan commented 4 years ago

I'm running Python 3.7, which you say is required. The python package dataclasses says it is a backport of dataclasses from 3.7 for 3.6. So why is it being installed by make install?

al626 commented 4 years ago

Previously, 3.6 was the minimum viable python version, which needed a backport of dataclasses.

Given we're now on 3.7, this should be dropped.

p-robot commented 4 years ago

Python 3.7 was originally listed as a requirement due to the use of the capture_output argument of subprocess.run which is used in some of the tests to call the C interface [1]. However, many of the calls to the C interface can now be replaced with calls to the Python interface and this requirement could perhaps be dropped.

al626 commented 4 years ago

Removed the above referenced commit fix - sounds like a discussion needs to be had to see which path to go down

RossBoylan commented 4 years ago

If the 3.6 is sufficient to run the application, though not the test suite, it might be good to continue to support it. I don't know if python has a way to express dependencies conditional on the python version. I'm also fuzzy on what happens if dataclasses is installed in a 3.7 environment, but I'd guess the installed package hides the system one. I guess either one should function OK.