Commit cfca483b authored by jlaura's avatar jlaura Committed by Jason R Laura
Browse files

Tests and add icu dep.

parent d09c843d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -20,13 +20,13 @@ install:
  # We do this conditionally because it saves us some downloading if the
  # version is the same.
  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then
      if [ "$PYTHON_VERSION" == "2.7" ]; then
      if [ "$PYTHON_VERSION" == 2.7 ]; then
        wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
      else
        wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
      fi
    else
      if ["$PYTHON_VERSION" == "2.7"]; then
      if ["$PYTHON_VERSION" == 2.7]; then
        curl -o miniconda.sh  https://repo.continuum.io/miniconda/Miniconda-latest-MacOSX-x86_64.sh;
      else
        curl -o miniconda.sh  https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh;
+2 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ requirements:
    - pvl
    - protobuf 3.0.0b2
    - gdal >=2
    - icu
    - h5py
    - pandas
    - sqlalchemy
@@ -22,6 +23,7 @@ requirements:
    - pvl
    - protobuf 3.0.0b2
    - gdal >=2
    - icu
    - h5py
    - pandas
    - sqlalchemy
+6 −0
Original line number Diff line number Diff line
AS15-M-0295_SML.png
AS15-M-0296_SML.png
AS15-M-0297_SML.png
AS15-M-0298_SML.png
AS15-M-0299_SML.png
AS15-M-0300_SML.png
 No newline at end of file

plio/io_utils.py

deleted100644 → 0
+0 −35
Original line number Diff line number Diff line
import shutil
import tempfile


def create_dir(basedir=''):
    """
    Create a unique, temporary directory in /tmp where processing will occur

    Parameters
    ----------
    basedir : str
              The PATH to create the temporary directory in.
    """
    return tempfile.mkdtemp(dir=basedir)


def delete_dir(dir):
    """
    Delete a directory

    Parameters
    ----------
    dir : str
          Remove a directory
    """
    shutil.rmtree(dir)


def file_to_list(file):
    with open(file, 'r') as f:
        file_list = f.readlines()
        file_list = map(str.rstrip, file_list)
        file_list = filter(None, file_list)

    return file_list

plio/tests/test_io_utils.py

deleted100644 → 0
+0 −16
Original line number Diff line number Diff line
import os
import unittest

from .. import io_utils

class TestIoUtils(unittest.TestCase):
    
    def setUp(self):
        pass

    def test_create_and_destroy_directory(self):
        path = io_utils.create_dir()
        self.assertTrue(os.path.exists(path))
        io_utils.delete_dir(path)
        self.assertFalse(os.path.exists(path))
Loading