mederrata / hcuppy

A Python implementation of the tools from H-CUP (Healthcare Cost and Utilization Project)
Apache License 2.0
1 stars 0 forks source link

Calling download CPT will always prompt for eula. Add accept_eula flag #5

Closed hungrymonkey closed 3 years ago

hungrymonkey commented 3 years ago

for non interactive eula acceptance.

$python3 -m venv venv $source venv/bin/activate $pip install wheel requests $pip install . $python3 -c 'from hcuppy.cpt import CPT; cpt = CPT(); cpt.download_data(accept_eula=True)' $python3 -c 'from hcuppy.sflag import SFlagEngine; sfe = SFlagEngine()'

Affects SFlagEngine

$python3 -m venv venv $source venv/bin/activate $pip install wheel $pip install requests python3

from hcuppy.sflag import SFlagEngine sfe = SFlagEngine() Traceback (most recent call last): File "", line 1, in File "/Users/psuedofinnish/git_repo/hcuppy/hcuppy/sflag.py", line 7, in init self.cpt2flag = utils.read_surgeryflag(fn) File "/Users/psuedofinnish/git_repo/hcuppy/hcuppy/utils.py", line 207, in read_surgeryflag with open(fn, "r") as fp: FileNotFoundError: [Errno 2] No such file or directory: '/Users/psuedofinnish/git_repo/hcuppy/hcuppy/data/cpt2sflag.json'