Skip to content

Commit

Permalink
Merge pull request #140 from dopplershift/improve-api
Browse files Browse the repository at this point in the history
Improve API
  • Loading branch information
dopplershift authored Jul 22, 2017
2 parents 7ffbe95 + 3ada1e8 commit 7dd6c7a
Show file tree
Hide file tree
Showing 15 changed files with 751 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ install:
build: off

test_script:
- cmd: python setup.py test --addopts "-s --junitxml=tests.xml --flake8 --cov=siphon"
- cmd: python setup.py test --addopts "-s --junitxml=tests.xml --flake8 --cov=siphon --no-print-logs"
#- cmd: cd docs
#- cmd: make html
#- cmd: cd ..
Expand Down
2 changes: 1 addition & 1 deletion .prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ pylint:

pep8:
options:
max-line-length: 90
max-line-length: 95
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ script:
fi;
else
flake8 --version;
python setup.py test --addopts "-s $TEST_OPTS";
python setup.py test --addopts "-s $TEST_OPTS --no-print-logs";
fi

after_script:
Expand Down
2 changes: 1 addition & 1 deletion examples/Basic_Usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

###########################################
cat = TDSCatalog('http://thredds.ucar.edu/thredds/catalog.xml')
print(list(cat.catalog_refs.keys()))
print(list(cat.catalog_refs))
2 changes: 1 addition & 1 deletion examples/Radar_Server_Level_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# First, point to the top-level thredds radar server accessor to find what datasets are
# available.
ds = get_radarserver_datasets('http://thredds.ucar.edu/thredds/')
print(list(ds.keys()))
print(list(ds))

###########################################
# Now create an instance of RadarServer to point to the appropriate
Expand Down
11 changes: 3 additions & 8 deletions examples/ncss/NCSS_Cartopy_Example.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import numpy as np

from siphon.catalog import TDSCatalog
from siphon.ncss import NCSS

###########################################
# First we construct a `TDSCatalog` instance pointing to our dataset of interest, in
Expand All @@ -32,13 +31,9 @@
print(list(best_gfs.datasets))

###########################################
# We pull out this dataset and look at the access urls.
best_ds = list(best_gfs.datasets.values())[0]
print(best_ds.access_urls)

###########################################
# Note the `NetcdfSubset` entry, which we will use with our NCSS class.
ncss = NCSS(best_ds.access_urls['NetcdfSubset'])
# We pull out this dataset and get the NCSS access point
best_ds = best_gfs.datasets[0]
ncss = best_ds.subset()

###########################################
# We can then use the `ncss` object to create a new query object, which
Expand Down
11 changes: 3 additions & 8 deletions examples/ncss/NCSS_Example.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import matplotlib.pyplot as plt

from siphon.catalog import TDSCatalog
from siphon.ncss import NCSS

###########################################
# First we construct a TDSCatalog instance pointing to our dataset of interest, in
Expand All @@ -24,13 +23,9 @@
print(best_gfs.datasets)

###########################################
# We pull out this dataset and look at the access urls.
best_ds = list(best_gfs.datasets.values())[0]
print(best_ds.access_urls)

###########################################
# Note the `NetcdfSubset` entry, which we will use with our NCSS class.
ncss = NCSS(best_ds.access_urls['NetcdfSubset'])
# We pull out this dataset and get the NCSS access point
best_ds = best_gfs.datasets[0]
ncss = best_ds.subset()

###########################################
# We can then use the `ncss` object to create a new query object, which
Expand Down
11 changes: 3 additions & 8 deletions examples/ncss/NCSS_Timeseries_Examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from netCDF4 import num2date

from siphon.catalog import TDSCatalog
from siphon.ncss import NCSS

###########################################
# First we construct a TDSCatalog instance pointing to our dataset of interest, in
Expand All @@ -25,13 +24,9 @@
print(best_gfs.datasets)

###########################################
# We pull out this dataset and look at the access urls.
best_ds = list(best_gfs.datasets.values())[0]
print(best_ds.access_urls)

###########################################
# Note the `NetcdfSubset` entry, which we will use with our NCSS class.
ncss = NCSS(best_ds.access_urls['NetcdfSubset'])
# We pull out this dataset and get the NCSS access point
best_ds = best_gfs.datasets[0]
ncss = best_ds.subset()

###########################################
# We can then use the `ncss` object to create a new query object, which
Expand Down
Loading

0 comments on commit 7dd6c7a

Please sign in to comment.