Skip to content

Commit

Permalink
Merge pull request #53 from hydroshare/develop
Browse files Browse the repository at this point in the history
hs_restclient 1.2.6 patch
  • Loading branch information
Castronova authored May 3, 2017
2 parents 85bc470 + 48044d3 commit 9829d9d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
11 changes: 7 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ RUN chown -R jovyan:users /home/jovyan/.jupyter

ENV NOTEBOOK_HOME=/home/jovyan/work/notebooks

USER jovyan

RUN pip install wget
RUN pip3 install wget
RUN pip install ulmo

# patch hs_restclient v1.2.6
ADD docker/hs_restclient.patch /home/jovyan/libs/hs_restclient/hs_restclient/hs_restclient.patch
RUN cd /home/jovyan/libs/hs_restclient/hs_restclient && patch < hs_restclient.patch

###################################################
## End - JupyterHub Development Image Additions ###
###################################################
#USER root
#RUN conda clean --all -y
#RUN apt-get clean && \
# rm -rf /var/lib/apt/lists/*
USER jovyan
CMD ["sh", "/srv/singleuser/singleuser.sh"]

Expand Down
1 change: 1 addition & 0 deletions docker/docker-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ RUN chown jovyan:users /home/jovyan/.ecohydro.cfg
# operations b/c anaconda has a #
# tendency to mess up gdal paths #
####################################
USER jovyan

# TAUDEM v5.3.7 - build and install taudem (must happen before rhesyss b/c of gdal conflicts)
RUN git clone https://github.com/dtarb/TauDEM.git /home/jovyan/libs/TauDEM
Expand Down
20 changes: 20 additions & 0 deletions docker/hs_restclient.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- __init__.py 2017-05-01 12:08:28.661529357 -0400
+++ __init__.mod.py 2017-05-01 12:08:25.498436426 -0400
@@ -789,7 +789,7 @@
raise HydroShareHTTPException((bag_url, 'GET', r.status_code))
elif r.headers['content-type'] == 'application/json':
# this is the case of bag being generated by hydroshare and not ready for download
- content = json.loads(r.content)
+ content = json.loads(r.content.decode('utf-8'))
if content['bag_status'] == "Not ready":
if wait_for_bag_creation:
# will wait until the bag is ready for download
@@ -815,7 +815,7 @@
task_status_url = "{url_base}/taskstatus/{task_id}/"
task_status_url = task_status_url.format(url_base=self.url_base, task_id=task_id)
r = self._request('GET', task_status_url)
- response_data = json.loads(r.content)
+ response_data = json.loads(r.content.decode('utf-8'))
return response_data['status']

def getResourceTypes(self):
2 changes: 1 addition & 1 deletion notebooks/help/rhessys.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
"outputs": [],
"source": [
"# compress the simulation data\n",
"!tar -zcf $DATA/mysim.tar.gz $DATA/mysim"
"!tar -zcf $DATA/mysim.tar.gz $DATA/myRHESSysSimulation"
]
},
{
Expand Down

0 comments on commit 9829d9d

Please sign in to comment.