From cf588fee34e676fe43e4db33bac7c8a52f58d3ba Mon Sep 17 00:00:00 2001 From: Jeremy Fee <jmfee@usgs.gov> Date: Wed, 11 May 2016 12:09:41 -0600 Subject: [PATCH] Remove MagWebFactory --- geomagio/iaga2002/MagWebFactory.py | 24 ------------------------ geomagio/iaga2002/__init__.py | 4 +--- test/iaga2002_test/MagWebFactory_test.py | 13 ------------- 3 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 geomagio/iaga2002/MagWebFactory.py delete mode 100644 test/iaga2002_test/MagWebFactory_test.py diff --git a/geomagio/iaga2002/MagWebFactory.py b/geomagio/iaga2002/MagWebFactory.py deleted file mode 100644 index 6f7f63755..000000000 --- a/geomagio/iaga2002/MagWebFactory.py +++ /dev/null @@ -1,24 +0,0 @@ -""" -Load IAGA2002 format files from http://magweb.cr.usgs.gov -""" - -from IAGA2002Factory import IAGA2002Factory, IAGA_FILE_PATTERN - - -# url pattern for magweb.cr.usgs.gov -MAGWEB_URL_TEMPLATE = 'http://magweb.cr.usgs.gov/data/magnetometer/' + \ - '%(OBS)s/%(interval)s%(type)s/' + IAGA_FILE_PATTERN - - -class MagWebFactory(IAGA2002Factory): - """IAGA2002Factory configured for magweb.cr.usgs.gov""" - - def __init__(self, observatory=None, channels=None, type=None, - interval=None): - """Create a IAGA2002Factory configured to use magweb.cr.usgs.gov""" - IAGA2002Factory.__init__(self, MAGWEB_URL_TEMPLATE, - observatory=observatory, channels=channels, type=type, - interval=interval) - - -MagWebFactory.MAGWEB_URL_TEMPLATE = MAGWEB_URL_TEMPLATE diff --git a/geomagio/iaga2002/__init__.py b/geomagio/iaga2002/__init__.py index ab1e91943..5238db998 100644 --- a/geomagio/iaga2002/__init__.py +++ b/geomagio/iaga2002/__init__.py @@ -8,13 +8,11 @@ from IAGA2002Factory import IAGA2002Factory from StreamIAGA2002Factory import StreamIAGA2002Factory from IAGA2002Parser import IAGA2002Parser from IAGA2002Writer import IAGA2002Writer -from MagWebFactory import MagWebFactory __all__ = [ 'IAGA2002Factory', 'StreamIAGA2002Factory', 'IAGA2002Parser', - 'IAGA2002Writer', - 'MagWebFactory' + 'IAGA2002Writer' ] diff --git a/test/iaga2002_test/MagWebFactory_test.py b/test/iaga2002_test/MagWebFactory_test.py deleted file mode 100644 index e520ee93a..000000000 --- a/test/iaga2002_test/MagWebFactory_test.py +++ /dev/null @@ -1,13 +0,0 @@ -"""Tests for MagWebFactory.""" - -from geomagio.iaga2002 import MagWebFactory -from nose.tools import assert_equals - - -def test_init(): - """iaga2002_test.MagWebFactory_test.test_init() - - Verify MagWebFactory calls parent constructor with MAGWEB_URL_TEMPLATE. - """ - factory = MagWebFactory() - assert_equals(factory.urlTemplate, MagWebFactory.MAGWEB_URL_TEMPLATE) -- GitLab