New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow loading from local file/caching #293

Merged
merged 3 commits into from Feb 9, 2016

Conversation

Projects
None yet
2 participants
@adam-carbone

adam-carbone commented Feb 5, 2016

I have added the ability to load data zip files from a local file/directory

  • If the path passed in points to a local zip file it will load the resources from inside.
  • If the path points to a local directory it will look inside for zip files in that directory and load the resources

Also used a temporary file in the ~/.hapi-fhir-cli/cache as a temporary file for the downloaded example file, this allowed for usage of a FileInputStream instead of a ByteArrayInputStream, thus allowing us to handle bigger files because they are not loaded completely into memory.

Also provided for automatic caching of that local temp file for up to 12 hours using the -c option.

Adam Carbone added some commits Feb 4, 2016

Adam Carbone
Adding the ability to use a local file/directory of files, plus impro…
…ving the downloading/caching of the remote files. Switched to download the file and use a FileInputStream vs the ByteArrayInputStream, to the whole file doesn't need to be loaded into memmory.
Adam Carbone
@adam-carbone

This comment has been minimized.

adam-carbone commented Feb 8, 2016

Hmmmm that coverage change is talking about a class that I didn't touch... @jamesagnew What can I do to fix the change?

@adam-carbone

This comment has been minimized.

adam-carbone commented Feb 8, 2016

The coverage change is indicating a drop in coverage in classes that I didn't even touch, I only changed one class. @jamesagnew hat can I do to help to help resolve that?

@jamesagnew

This comment has been minimized.

Owner

jamesagnew commented Feb 9, 2016

The coveralls check is probably nothing. Coveralls often seems to get it wrong for pull requests, I've never figured out why.

This looks great, thanks for the contribution. Merging it now!

jamesagnew added a commit that referenced this pull request Feb 9, 2016

Merge pull request #293 from adam-carbone/master
Allow loading from local file/caching

@jamesagnew jamesagnew merged commit 5163d7f into jamesagnew:master Feb 9, 2016

1 of 2 checks passed

coverage/coveralls Coverage decreased (-0.003%) to 84.622%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

jamesagnew added a commit that referenced this pull request Feb 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment