Skip to content

Commit

Permalink
Merge pull request #48 from renegelinas/rm11419
Browse files Browse the repository at this point in the history
Issue #11419 - Added driver/parser/support for the new Neil Brown CTD…
  • Loading branch information
renegelinas authored Apr 16, 2018
2 parents 69daf1b + fdedb2e commit d9ce999
Show file tree
Hide file tree
Showing 27 changed files with 491,229 additions and 123 deletions.
7 changes: 7 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Version 0.6.0

* Issue #11419 - Added driver/parser support for the new Neil Brown CTD attached to the AUVs.
* Added ctdav_n_auv_driver.py driver and deprecated ctdav_n_auv_recovered(telemetered)_driver(s).py drivers.
* Added ctdav_nbosi_auv_driver.py driver and ctdav_nbosi_auv.py parser for the new Neil Brown CTD.
* Added unit tests for the new Neil Brown CTD parser.

# Version 0.5.13

* Issue #13170 - Corrected engineering platform configurations to reflect last deployment
Expand Down
1 change: 1 addition & 0 deletions conda_env_linux64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ dependencies:
- vine
- pip:
- modestimage==0.1
- Deprecated==1.2.0
2 changes: 0 additions & 2 deletions mi/dataset/driver/auv_eng/auv/auv_eng_auv_recovered_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,3 @@ def _build_parser(self, stream_handle):
is_telemetered=False)

return parser


Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,3 @@ def _build_parser(self, stream_handle):
is_telemetered=True)

return parser


48 changes: 48 additions & 0 deletions mi/dataset/driver/ctdav_n/auv/ctdav_n_auv_driver.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env python

"""
@package mi.dataset.driver.ctdav_n.auv
@file mi/dataset/driver/ctdav_n/auv/ctdav_n_auv_driver.py
@author Rene Gelinas
@brief Driver for the ctdav_n_auv instrument
Release notes:
Initial Release
"""

from mi.dataset.dataset_driver import SimpleDatasetDriver
from mi.dataset.parser.ctdav_n_auv import CtdavNAuvParser
from mi.core.versioning import version


@version("15.7.0")
def parse(unused, source_file_path, particle_data_handler):
"""
This is the method called by uFrame
:param unused
:param source_file_path This is the full path and filename of the file to be parsed
:param particle_data_handler Java Object to consume the output of the parser
:return particle_data_handler
"""

with open(source_file_path, 'rU') as stream_handle:

# Create an instance of the concrete driver class defined below.
driver = CtdavNAuvDriver(unused, stream_handle, particle_data_handler)
driver.processFileStream()

return particle_data_handler


class CtdavNAuvDriver(SimpleDatasetDriver):
"""
Create a concrete _build_parser method for the adcpa_n_auv driver.
"""

def _build_parser(self, stream_handle):

parser = CtdavNAuvParser(stream_handle,
self._exception_callback)

return parser
14 changes: 6 additions & 8 deletions mi/dataset/driver/ctdav_n/auv/ctdav_n_auv_recovered_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
from mi.dataset.dataset_driver import SimpleDatasetDriver
from mi.dataset.parser.ctdav_n_auv import CtdavNAuvParser
from mi.core.versioning import version
from deprecated import deprecated


@version("15.6.1")
def parse(unused, source_file_path, particle_data_handler):
"""
This is the method called by Uframe
This is the method called by uFrame
:param unused
:param source_file_path This is the full path and filename of the file to be parsed
:param particle_data_handler Java Object to consume the output of the parser
Expand All @@ -28,25 +29,22 @@ def parse(unused, source_file_path, particle_data_handler):

with open(source_file_path, 'rU') as stream_handle:

# create and instance of the concrete driver class defined below
# Create an instance of the concrete driver class defined below.
driver = CtdavNAuvRecoveredDriver(unused, stream_handle, particle_data_handler)
driver.processFileStream()

return particle_data_handler


@deprecated
class CtdavNAuvRecoveredDriver(SimpleDatasetDriver):
"""
Derived adcpa_n_auv driver class
All this needs to do is create a concrete _build_parser method
Create a concrete _build_parser method for the adcpa_n_auv driver.
"""

def _build_parser(self, stream_handle):

parser = CtdavNAuvParser(stream_handle,
self._exception_callback,
is_telemetered=False)
self._exception_callback)

return parser


12 changes: 6 additions & 6 deletions mi/dataset/driver/ctdav_n/auv/ctdav_n_auv_telemetered_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
from mi.dataset.dataset_driver import SimpleDatasetDriver
from mi.dataset.parser.ctdav_n_auv import CtdavNAuvParser
from mi.core.versioning import version
from deprecated import deprecated


@version("15.6.1")
def parse(unused, source_file_path, particle_data_handler):
"""
This is the method called by Uframe
This is the method called by uFrame
:param unused
:param source_file_path This is the full path and filename of the file to be parsed
:param particle_data_handler Java Object to consume the output of the parser
Expand All @@ -28,23 +29,22 @@ def parse(unused, source_file_path, particle_data_handler):

with open(source_file_path, 'rU') as stream_handle:

# create and instance of the concrete driver class defined below
# Create an instance of the concrete driver class defined below.
driver = CtdavNAuvTelemeteredDriver(unused, stream_handle, particle_data_handler)
driver.processFileStream()

return particle_data_handler


@deprecated
class CtdavNAuvTelemeteredDriver(SimpleDatasetDriver):
"""
Derived adcpa_n_auv driver class
All this needs to do is create a concrete _build_parser method
Create a concrete _build_parser method for the adcpa_n_auv driver.
"""

def _build_parser(self, stream_handle):

parser = CtdavNAuvParser(stream_handle,
self._exception_callback,
is_telemetered=True)
self._exception_callback)

return parser
2 changes: 1 addition & 1 deletion mi/dataset/driver/ctdav_n/auv/resource/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import os

RESOURCE_PATH = os.path.dirname(__file__)
RESOURCE_PATH = os.path.dirname(__file__)
Loading

0 comments on commit d9ce999

Please sign in to comment.