[hdf-compass] 34/295: prototype for OpENDAP server plugin

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun May 8 10:35:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/master
in repository hdf-compass.

commit eca7ec295a99d7ebf09cdc94794388461b1fa0ba
Author: Matt Comerford <matthew.comerford at colorado.edu>
Date:   Tue Aug 5 10:47:32 2014 -0600

    prototype for OpENDAP server plugin
---
 opendap_model/Outline.py          | 246 --------------------------------------
 opendap_model/datasetFunction.txt |  34 ------
 opendap_model/server_test.py      |   7 --
 opendap_model/testscript.py       |  28 -----
 4 files changed, 315 deletions(-)

diff --git a/opendap_model/Outline.py b/opendap_model/Outline.py
deleted file mode 100644
index d341df2..0000000
--- a/opendap_model/Outline.py
+++ /dev/null
@@ -1,246 +0,0 @@
-"""
-HDF Compass plugin for accessing an OpENDAP server. 
-"""
-import numpy as np
-import pydap as dap
-
-import compass_model
-
-class Server(compass_model.Store):
-
-	"""
-		Represents the remote OpENDAP derver to be accessed
-	"""
-
-	# Methods related to the plugin system
-	def __getitem__(self, key):
-        # Open an object in the store, using the last registered class which reports it can open the key.
-		pass
-
-	def gethandlers(self, key=None):
-        # Retrieve all registered Node subclasses, optionally filtering by those which report they can handle "key"
-		pass
-
-	def __contains__(self, key):
-        # True if "key" exists in the store. False otherwise.
-		pass
-
-	# Other methods & properties
-	@staticmethod
-	def canhandle(url):
-        # Return True if this class can make sense of "url". False otherwise.
-		pass
-
-	def __init__(self, url):
-        #Create a new store instance from the data at "url". False otherwise.
-		pass
-
-	def close(self):
-        # Discontinue access to the data store
-        self._valid = False
-		#pass
-
-	def getparent(self, key):
-        # Return the object which contains "key", or None if no object exists
-		pass
-
-	@property
-	def url(self):
-        # The "URL" used to open the store
-        return self._url
-		#pass
-
-	@property
-	def displayname(self):
-        # A short name used for the store
-		pass
-
-	@property
-	def root(self):
-        # A node instance representing the starting point in the file
-        # For hierarchiacal formats, this would be the root container.
-		pass
-
-	@property
-	def valid(self):
-        return self._valid
-		#pass
-
-class Structure(compass_model.Container):
-
-	"""
-		Represents Structure/StructureType Object in OpENDAP/Pydap
-	"""
-
-	# Unique to the Container class
-	@property
-	def __len__(self):
-        # Get the number of ojects directly attached to the Container
-		pass
-
-	def __getitem__(self, index):
-        # Retrieve the node at index.
-        # Returns a NODE INSTANCE, not a key
-		pass
-
-    def __iter__(self):
-        pass
-
-	# General Node class implementations
-
-	classkind = "Structure"
-
-	@staticmethod
-	def canhandle(store, key):
-        # Determine whether this class can usefully represent the object.
-        # Keys are not technically required to be strings
-		pass
-
-	def __init__(self, store, key):
-        # Create a new instance representing the object pointed to by "key" in "store"
-		pass
-
-	@property
-	def key(self):
-        # Unique key which identifies this object in the store
-        # Keys may be any hashable object, although strings are the most common
-		pass
-
-	@property
-	def store(self):
-        # The data store to which the object belongs
-		pass
-
-	@property
-	def displayname(self):
-        # A short name for display purposes 
-		pass
-
-	@property
-	def description(self):
-        # Descriptive string
-		pass
-
-class Array(compass_model.Array):
-
-	"""
-		Represents Array/BaseType Object in OpENDAP/Pydap
-	"""
-
-	# Implementations unique to Array class
-
-	@property
-	def shape(self):
-        # Shape of the array, as a Python tuple
-        return self.shape
-		#pass
-
-	@property
-	def dtype(self):
-        # NumPy data type object representing the type of the array
-		return self.type
-        #pass
-
-	def __getitem__(self, indices):
-        # Retrieve data from the array, using the standard array-slicing syntax.
-        # "indices" are slicing arguments
-		pass
-
-    # General Node class implementations
-
-    classkind = "Array"
-
-    @staticmethod
-    def canhandle(store, key):
-        # Determine whether this class can usefully represent the object
-        # Keys are not technically required to be strings.
-        pass
-
-    def __init__(self, store, key):
-        # Create a new instance representing the object pointed to by "key" in "store"
-        pass
-
-    @property
-    def key(self):
-        # Unique key which identifies this object in the store.
-        # Keys may be any hashable object
-        self._key
-        #pass
-
-    @property
-    def store(self):
-        # The data store to which the object belongs
-        return self._store
-        #pass
-
-    @property
-    def displayname(self):
-        #  A short name for display purposes
-        return self.name
-        #pass
-
-    @property
-    def description(self):
-        # A descriptive string
-        return self.id
-        #pass
-
-class Grid(compass_model.Array):
-
-    """
-        Represents Grid/GridType Object in OpENDAP/Pydap
-    """
-
-    # Implementations unique to Array class
-
-    @property
-    def shape(self):
-        # Shape of the array, as a Python tuple
-        return self.shape
-        #pass
-
-    @property
-    def dtype(self):
-        # NumPy data type object representing the type of the array
-        return self.type
-        #pass
-
-    def __getitem__(self, indices):
-        # Retrieve data from the array, using the standard array-slicing syntax
-        # "Indices" are slicing arguments
-        pass
-
-    # General Node class implementations
-
-    classkind = "Grid"
-
-    @staticmethod
-    def canhandle(store, key):
-        # Determine whether this class can usefully represent the object
-        pass
-
-    def __init__(self, store, key):
-        # Create a new instance representing the object pointed to by "key" in "store"
-        pass
-
-    @property
-    def key(self):
-        # Unique key which identifies this object in the store
-        # Keys may be any hashable object, although strings are the most common
-        pass
-
-    @property
-    def store(self):
-        # The data store to which the object belongs
-        pass
-
-    @property
-    def displayname(self):
-        # A short name for display purposes
-        pass
-
-    @property
-    def description(self):
-        # Descriptive string
-        pass
-
diff --git a/opendap_model/datasetFunction.txt b/opendap_model/datasetFunction.txt
deleted file mode 100644
index 3939cb4..0000000
--- a/opendap_model/datasetFunction.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-PyDap Dataset Methods
-
-dataset.
-
-*attributes
-
-clear()
-copy()
-data
-fromkeys(keys, d=None)
-
-*functions
-
-get(key, d=None)
-has_key(key)
-
-*id
-
-items()
-iteritems()
-iterkeys()
-itervalues()
-
-keys()
-name
-pop(key, d=None)
-popitem()
-setdefault(key, d=None)
-update(odict)
-values()
-viewitems() -> a set-like object providing a view on the dataset's items
-viewkeys() -> a set-like object providing a view on the dataset's keys
-viewvalues -> an object providing view on the dataset's values
-walk()
\ No newline at end of file
diff --git a/opendap_model/server_test.py b/opendap_model/server_test.py
deleted file mode 100644
index 4fa9699..0000000
--- a/opendap_model/server_test.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from pydap.client import open_url
-from pydap.model import *
-from pydap.proxy import ArrayProxy
-
-dataset = open_url('http://test.opendap.org/dap/data/nc/coads_climatology.nc')
-
-print dataset.values()
diff --git a/opendap_model/testscript.py b/opendap_model/testscript.py
deleted file mode 100644
index 39ddde4..0000000
--- a/opendap_model/testscript.py
+++ /dev/null
@@ -1,28 +0,0 @@
-from pydap.model import *
-from pydap.client import open_url
-from pydap.proxy import ArrayProxy
-# url - http://test.opendap.org/dap/data/nc/coads_climatology.nc
-
-
-
-a = BaseType(name='a', data=1, shape=(), dimensions=(), type=Int32, attributes={'long_name':'variable a'})
-a.history = 'Created by me'
-a.attributes['history'] = 'Created by me'
-
-b = a 
-
-c = BaseType(name='long & complicated')
-
-s = StructureType(name='s')
-s['a'] = a
-s[c.name] = c
-
-dataset = DatasetType(name='example')
-dataset['s'] = s
-
-print 'a, b, c, s, dataset are variables'
-
-if type(dataset) == DatasetType:
-	print "heck yea"
-	
-test_dataset = open_url('http://test.opendap.org/dap/data/nc/coads_climatology.nc')
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/hdf-compass.git



More information about the debian-science-commits mailing list