diff --git a/docs/source/SKAAlarmHandler.rst b/docs/source/SKAAlarmHandler.rst new file mode 100644 index 0000000000000000000000000000000000000000..adbd902eb284fa7664ce339a5b41bc0104797358 --- /dev/null +++ b/docs/source/SKAAlarmHandler.rst @@ -0,0 +1,14 @@ +.. LMC Base Classes documentation master file, created by + sphinx-quickstart on Fri Jan 11 10:03:42 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +SKA AlarmHandler +============================================ + +.. toctree:: + :maxdepth: 2 + + +.. automodule:: SKAAlarmHandler.SKAAlarmHandler + :members: diff --git a/docs/source/SKABaseDevice.rst b/docs/source/SKABaseDevice.rst new file mode 100644 index 0000000000000000000000000000000000000000..24258b9dad924ba6b08971dbd4c5da07c18f6a51 --- /dev/null +++ b/docs/source/SKABaseDevice.rst @@ -0,0 +1,14 @@ +.. LMC Base Classes documentation master file, created by + sphinx-quickstart on Fri Jan 11 10:03:42 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +SKA BaseDevice +============================================ + +.. toctree:: + :maxdepth: 2 + + +.. automodule:: SKABaseDevice.SKABaseDevice + :members: diff --git a/docs/source/SKACapability.rst b/docs/source/SKACapability.rst new file mode 100644 index 0000000000000000000000000000000000000000..664fbb724034221e60edf57a637ed5ae94da7b9e --- /dev/null +++ b/docs/source/SKACapability.rst @@ -0,0 +1,14 @@ +.. LMC Base Classes documentation master file, created by + sphinx-quickstart on Fri Jan 11 10:03:42 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +SKA Capability +============================================ + +.. toctree:: + :maxdepth: 2 + +.. automodule:: SKACapability.SKACapability + :members: SKACapability + diff --git a/docs/source/SKALogger.rst b/docs/source/SKALogger.rst new file mode 100644 index 0000000000000000000000000000000000000000..0a403da01a0cd04e6b2df8f42da686db1d64d8d7 --- /dev/null +++ b/docs/source/SKALogger.rst @@ -0,0 +1,14 @@ +.. LMC Base Classes documentation master file, created by + sphinx-quickstart on Fri Jan 11 10:03:42 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +SKA Logger +============================================ + +.. toctree:: + :maxdepth: 2 + +.. automodule:: SKALogger.SKALogger + :members: SKALogger + diff --git a/docs/source/SKAMaster.rst b/docs/source/SKAMaster.rst new file mode 100644 index 0000000000000000000000000000000000000000..23c1951fbebe2d5ba4ca1dbfbdcc4dcb19c1bec2 --- /dev/null +++ b/docs/source/SKAMaster.rst @@ -0,0 +1,14 @@ +.. LMC Base Classes documentation master file, created by + sphinx-quickstart on Fri Jan 11 10:03:42 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +SKA Master +============================================ + +.. toctree:: + :maxdepth: 2 + +.. automodule:: SKAMaster.SKAMaster + :members: SKAMaster + diff --git a/docs/source/SKAObsDevice.rst b/docs/source/SKAObsDevice.rst new file mode 100644 index 0000000000000000000000000000000000000000..f679938cfbc090902561201e1b954508ef1ba959 --- /dev/null +++ b/docs/source/SKAObsDevice.rst @@ -0,0 +1,14 @@ +.. LMC Base Classes documentation master file, created by + sphinx-quickstart on Fri Jan 11 10:03:42 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +SKA ObsDevice +============================================ + +.. toctree:: + :maxdepth: 2 + +.. automodule:: SKAObsDevice.SKAObsDevice + :members: + diff --git a/docs/source/SKASubarray.rst b/docs/source/SKASubarray.rst new file mode 100644 index 0000000000000000000000000000000000000000..ada9fef9a11ebb4df72f57d5da6a1868501b616f --- /dev/null +++ b/docs/source/SKASubarray.rst @@ -0,0 +1,14 @@ +.. LMC Base Classes documentation master file, created by + sphinx-quickstart on Fri Jan 11 10:03:42 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +SKA Subarray +============================================ + +.. toctree:: + :maxdepth: 2 + +.. automodule:: SKASubarray.SKASubarray + :members: SKASubarray + diff --git a/docs/source/SKATelState.rst b/docs/source/SKATelState.rst new file mode 100644 index 0000000000000000000000000000000000000000..7843a841a3d43aa12f7ff365b6fa03081e80688c --- /dev/null +++ b/docs/source/SKATelState.rst @@ -0,0 +1,14 @@ +.. LMC Base Classes documentation master file, created by + sphinx-quickstart on Fri Jan 11 10:03:42 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +SKA TelState +============================================ + +.. toctree:: + :maxdepth: 2 + +.. automodule:: SKATelState.SKATelState + :members: SKATelState + diff --git a/docs/source/conf.py b/docs/source/conf.py index 947fcd2ef55105377d08078e4026fca08ecd8474..c8731acbee85bb90cd9f318941f9d48862c43eb0 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,20 +12,25 @@ # All configuration values have a default; values that are commented out # serve to show the default. -import sys -import os -from mock import Mock as MagicMock - -class Mock(MagicMock): - @classmethod - def __getattr__(cls, name): - return MagicMock() +# import sys +# import os +# from mock import Mock as MagicMock +# +# class Mock(MagicMock): +# @classmethod +# def __getattr__(cls, name): +# return MagicMock() +# +# # Mock tango modules +# MOCK_MODULES = ['PyTango', 'tango', 'tango.server', 'run', 'DeviceMeta', 'command', +# 'future', 'future.utils', 'logging', 'logging.handlers'] +# sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) -# Mock tango modules -MOCK_MODULES = ['PyTango', 'tango', 'tango.server', 'run', 'DeviceMeta', 'command', - 'future', 'future.utils', 'logging', 'logging.handlers'] -sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) +autodoc_mock_imports = ['PyTango', 'tango', 'tango.server', 'run', 'DeviceMeta', 'command', + 'future', 'future.utils', 'logging', 'logging.handlers'] +import sys +import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. diff --git a/docs/source/index.rst b/docs/source/index.rst index bbdc4ab84aff49684940c4f561f038e512cd938b..6f78ae67640815672cf788a475816f8e0164e55d 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -10,10 +10,14 @@ Welcome to LMC Base Classes documentation! :caption: Table of Contents :maxdepth: 2 -.. automodule:: SKABaseDevice.SKABaseDeviceModule - -.. autoclass:: SKABaseDevice - :members: + SKA Alarm Handler<SKAAlarmHandler> + SKA Base Device<SKABaseDevice> + SKA Capability<SKACapability> + SKA Logger<SKALogger> + SKA Master<SKAMaster> + SKA ObsDevice<SKAObsDevice> + SKA Subarray<SKASubarray> + SKA TelState<SKATelState> Indices and tables ================== diff --git a/skabase/SKABaseDevice/SKABaseDevice.py b/skabase/SKABaseDevice/SKABaseDevice.py index afcc611329bd0d775de7bcfde49070c0a1180e5a..bc96951858732ae207ee23acdc120a508ae71074 100644 --- a/skabase/SKABaseDevice/SKABaseDevice.py +++ b/skabase/SKABaseDevice/SKABaseDevice.py @@ -5,7 +5,7 @@ # # -"""skabasedevice.py: A generic base device for SKA. It exposes the generic attributes, +"""A generic base device for SKA. It exposes the generic attributes, properties and commands of an SKA device. """ from __future__ import print_function @@ -642,6 +642,11 @@ class SKABaseDevice(with_metaclass(DeviceMeta, Device)): @DebugIt() def ToJson(self, argin): # PROTECTED REGION ID(SKABaseDevice.ToJson) ENABLED START # + """ + ToJson method. Not used. To be deleted. + :param argin: + :return: + """ # TBD - see how to use fandango's export_device_to_dict with exception_manager(self): diff --git a/skabase/SKABaseDevice/__init__.py b/skabase/SKABaseDevice/__init__.py index 7c57fad3510c1b4318dc8d211145f3147d0560d8..863849e2ad8b752717dd89ec24247de0698fa851 100644 --- a/skabase/SKABaseDevice/__init__.py +++ b/skabase/SKABaseDevice/__init__.py @@ -6,14 +6,13 @@ # """SKABASE - -__init__.py: A generic base device for SKA. It exposes the generic attributes, properties and commands of an SKA device. +A generic base device for SKA. It exposes the generic attributes, properties and commands of an SKA device. """ -# __all__ = ["SKABaseDevice", "main"] -# -# from skabase import release -# from .SKABaseDevice import SKABaseDevice, main -# -# __version__ = release.version -# __version_info__ = release.version_info -# __author__ = release.author \ No newline at end of file +__all__ = ["SKABaseDevice", "main"] + +from skabase import release +from .SKABaseDevice import SKABaseDevice, main + +__version__ = release.version +__version_info__ = release.version_info +__author__ = release.author diff --git a/skabase/__init__.py b/skabase/__init__.py index f97c38d4785247eb4e7991626a79927de2c9f624..0876b3881709c20edeec9862d2b5fcf518eb7f5d 100644 --- a/skabase/__init__.py +++ b/skabase/__init__.py @@ -1,13 +1,10 @@ -# __all__ = ["auxiliary", -# "SKAAlarmHandler", -# "SKABaseDevice", -# "SKACapability", -# "SKALogger", -# "SKAMaster", -# "SKAObsDevice", -# "SKASubarray", -# "SKATelState" -# ] - -# from pkgutil import extend_path -# __path__ = extend_path(__path__, __name__) \ No newline at end of file +__all__ = ["auxiliary", + "SKAAlarmHandler", + "SKABaseDevice", + "SKACapability", + "SKALogger", + "SKAMaster", + "SKAObsDevice", + "SKASubarray", + "SKATelState" + ] diff --git a/skabase/release.py b/skabase/release.py index 970272e85a589402f30c751967cc1ecd7ca976a3..36f5b7b6cdd6fbba0642154268f87e99f923bbe7 100644 --- a/skabase/release.py +++ b/skabase/release.py @@ -7,7 +7,7 @@ """Release information for lmc-base-classes Python Package""" -name = """lmc-base-classes""" +name = """lmcbaseclasses""" version = "1.0.0" version_info = version.split(".") description = """A set of generic base devices for SKA Telescope."""