From 1ccb0890f837b9bae1d59985741ad4313868d9cc Mon Sep 17 00:00:00 2001 From: jklenzing Date: Wed, 26 Feb 2020 18:50:10 -0500 Subject: [PATCH 1/3] STY: import DataFrame from pandas --- pysatCDF/_cdf.py | 69 ++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/pysatCDF/_cdf.py b/pysatCDF/_cdf.py index 018c636..4be9ced 100644 --- a/pysatCDF/_cdf.py +++ b/pysatCDF/_cdf.py @@ -1,9 +1,12 @@ from __future__ import print_function from __future__ import absolute_import -import sys import copy - import numpy as np +import string +import sys + +import pandas +import pysat from . import fortran_cdf @@ -29,7 +32,7 @@ class CDF(object): Note when opening a CDF file with this module all data is automatically loaded from disk unless specific variables are excluded upon instantiation. - + """ def __init__(self, fname): @@ -185,10 +188,10 @@ def _read_all_z_variable_info(self): def load_all_variables(self): """Loads all variables from CDF. - + Note this routine is called automatically upon instantiation. - + """ self.data = {} @@ -286,7 +289,7 @@ def _call_multi_fortran_z(self, names, data_types, rec_nums, epoch16 : bool Flag indicating type is epoch16. Translates things to datetime standard. - + """ # isolate input type code variables from total supplied types @@ -308,7 +311,7 @@ def _call_multi_fortran_z(self, names, data_types, rec_nums, if epoch: # account for difference in seconds between # CDF epoch and python's epoch, leap year in there - # (datetime(1971,1,2) - + # (datetime(1971,1,2) - # datetime(1,1,1)).total_seconds()*1000 data -= 62167219200000 data = data.astype(' Date: Wed, 26 Feb 2020 18:53:00 -0500 Subject: [PATCH 3/3] TST: update Travis environment --- .travis.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 420be9b..699b0c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,10 @@ language: python -python: - - "2.7" - - "3.5" - - "3.6" +jobs: + include: + - python: 2.7 + - python: 3.6 + - python: 3.7 + - python: 3.8 sudo: false @@ -41,7 +43,7 @@ install: - "python setup.py develop" - pip install netCDF4 # command to run tests -script: +script: #- nosetests - nosetests --with-coverage --cover-package=pysatCDF #coverage run --source=pysat setup.py test