Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
added dockerfile. able to unit test on docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
tylertucker202 committed Mar 7, 2019
1 parent 0f15981 commit 2779c2e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM continuumio/miniconda3
WORKDIR /usr/src/argo-database

# copies everything from host dir to container work dir
COPY . .
#need to install netcdf libraries
RUN apt-get update && apt-get --assume-yes install libhdf5-serial-dev netcdf-bin libnetcdf-dev
# install python libraries
RUN pip install -r requirements.txt
#--net=host seems to work. use network_mode: "host" in docker-compose.

# run test scripts
WORKDIR /usr/src/argo-database/test
CMD [ "python", "./unitTest.py" ]
2 changes: 1 addition & 1 deletion createCovarDB.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#!/usr/bin/env python3
"""
Created on Mon Nov 19 15:08:59 2018
Expand Down
6 changes: 1 addition & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
certifi==2018.10.15
cftime==1.0.2.1
netCDF4==1.4.1
numpy==1.15.4
pandas==0.23.4
pymongo==3.7.2
python-dateutil==2.7.5
pytz==2018.7
scipy==1.1.0
six==1.11.0
netCDF4==1.4.2
3 changes: 2 additions & 1 deletion test/argoDatabaseTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ def test_dump_threshold(self):
def test_delete_list_of_files(self):
profiles = ['6901762_46.nc', '6901762_8.nc']
dummyDir = 'dummyTmp'
os.mkdir('dummyTmp')
if not os.path.exists(dummyDir):
os.mkdir(dummyDir)
files = []
# create files
for profile in profiles:
Expand Down

0 comments on commit 2779c2e

Please sign in to comment.