Skip to content

Commit

Permalink
working
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffckerr committed Mar 20, 2020
1 parent e4d154c commit 258e51a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
39 changes: 39 additions & 0 deletions covasim/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#%% Check imports -- note, must be manually updated to match requirements.txt unfortunately!

_min_sciris_version = '0.16.0'
_min_scirisweb_version = '0.16.0'

# Check Sciris
try:
import sciris as _sc
except ImportError:
raise ImportError('Sciris not found; please install via "pip install sciris"')
if _sc.compareversions(_sc.__version__, _min_sciris_version) < 0:
raise ImportError(f'Sciris {_sc.__version__} is incompatible; please upgrade via "pip install sciris=={_min_sciris_version}"')

# Check ScirisWeb
try:
import scirisweb as _sw
except ImportError:
raise ImportError('Scirisweb not found; please install via "pip install scirisweb"')
if _sc.compareversions(_sw.__version__, _min_scirisweb_version) < 0:
raise ImportError(f'Scirisweb {_sw.__version__} is incompatible; please upgrade via "pip install scirisweb=={_min_scirisweb_version}"')

try:
import covid_healthsystems as _hsys
except ImportError as E:
print(f'Warning: covid_healthsystems is not available. Hospital capacity analyses will not be available. (Error: {str(E)})\n')
_hsys = None

try:
import parestlib as _pel
except ImportError as E:
print(f'Warning: parestlib is not available. Automated calibration will not be available. (Error: {str(E)})\n')
_pel = None



#%% Imports from here
from .cova_base.version import __version__, __versiondate__
from .cova_base import *
from .cova_generic import *
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
sciris>=0.16.0
scirisweb>=0.16.0
matplotlib>=2.2.2
numpy>=1.10.1
scipy>=1.2.0
sciris>=0.15.8
scirisweb>=0.15.0
pandas
numba
gunicorn
plotly_express
covid_healthsystems
plotly_express

0 comments on commit 258e51a

Please sign in to comment.