Skip to content
Snippets Groups Projects
Commit 940b45ac authored by Aditya Dange's avatar Aditya Dange
Browse files

Update for documentation generation

parent 7f8ff2b7
Branches
Tags
No related merge requests found
...@@ -31,7 +31,7 @@ htmlcov ...@@ -31,7 +31,7 @@ htmlcov
# Developer tools # Developer tools
*~ *~
.ropeproject .ropeproject
.idea
# Ansible # Ansible
*.retry *.retry
......
...@@ -11,4 +11,3 @@ SKA AlarmHandler ...@@ -11,4 +11,3 @@ SKA AlarmHandler
.. automodule:: SKAAlarmHandler.SKAAlarmHandler .. automodule:: SKAAlarmHandler.SKAAlarmHandler
:members: SKAAlarmHandler :members: SKAAlarmHandler
...@@ -14,7 +14,12 @@ ...@@ -14,7 +14,12 @@
import sys import sys
import os import os
from mock import Mock from mock import Mock as MagicMock
class Mock(MagicMock):
@classmethod
def __getattr__(cls, name):
return MagicMock()
# Mock tango modules # Mock tango modules
MOCK_MODULES = ['PyTango', 'tango', 'tango.server', 'run', 'DeviceMeta', 'command', MOCK_MODULES = ['PyTango', 'tango', 'tango.server', 'run', 'DeviceMeta', 'command',
...@@ -25,7 +30,7 @@ sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) ...@@ -25,7 +30,7 @@ sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
# add these directories to sys.path here. If the directory is relative to the # 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. # documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../../skabase')) sys.path.insert(0, os.path.abspath('../../skabase'))
print ("from conf sys.path: ", sys.path)
# -- General configuration ------------------------------------------------ # -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here. # If your documentation needs a minimal Sphinx version, state it here.
......
...@@ -12,13 +12,6 @@ Contents: ...@@ -12,13 +12,6 @@ Contents:
:maxdepth: 2 :maxdepth: 2
SKA AlarmHandler<SKAAlarmHandler> SKA AlarmHandler<SKAAlarmHandler>
SKA BaseDevice<SKABaseDevice>
SKA Capability<SKACapability>
SKA Logger<SKALogger>
SKA Master<SKAMaster>
SKA ObsDevice<SKAObsDevice>
SKA Subarray<SKASubarray>
SKA TelState<SKATelState>
Indices and tables Indices and tables
================== ==================
......
...@@ -23,12 +23,15 @@ import os ...@@ -23,12 +23,15 @@ import os
import sys import sys
from future.utils import with_metaclass from future.utils import with_metaclass
# SKA specific imports # SKA specific imports\
file_path = os.path.dirname(os.path.abspath(__file__))
# TODO: remove the release.py file
sys.path.insert(0, os.path.abspath(os.path.join(file_path, os.curdir)))
import release # DO NOT import after modifying system path import release # DO NOT import after modifying system path
file_path = os.path.dirname(os.path.abspath(__file__))
basedevice_path = os.path.abspath(os.path.join(file_path, os.pardir)) + "/SKABaseDevice" basedevice_path = os.path.abspath(os.path.join(file_path, os.pardir)) + "/SKABaseDevice"
sys.path.insert(0, basedevice_path) sys.path.insert(0, basedevice_path)
print ("SKAAlarmHandler sys.path: ", sys.path)
from SKABaseDevice import SKABaseDevice from SKABaseDevice import SKABaseDevice
# PROTECTED REGION END # // SKAAlarmHandler.additionnal_import # PROTECTED REGION END # // SKAAlarmHandler.additionnal_import
...@@ -101,6 +104,7 @@ class SKAAlarmHandler(with_metaclass(DeviceMeta, SKABaseDevice)): ...@@ -101,6 +104,7 @@ class SKAAlarmHandler(with_metaclass(DeviceMeta, SKABaseDevice)):
def init_device(self): def init_device(self):
SKABaseDevice.init_device(self) SKABaseDevice.init_device(self)
# TODO: maintain single version file.
self._build_state = '{}, {}, {}'.format(release.name, release.version, self._build_state = '{}, {}, {}'.format(release.name, release.version,
release.description) release.description)
self._version_id = release.version self._version_id = release.version
......
...@@ -33,9 +33,12 @@ from builtins import range ...@@ -33,9 +33,12 @@ from builtins import range
# SKA specific imports # SKA specific imports
file_path = os.path.dirname(os.path.abspath(__file__)) file_path = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, os.path.abspath(os.path.join(file_path, os.curdir)))
import release # DO NOT import after modifying system path
auxiliary_path = os.path.abspath(os.path.join(file_path, os.pardir)) + "/auxiliary" auxiliary_path = os.path.abspath(os.path.join(file_path, os.pardir)) + "/auxiliary"
sys.path.insert(0, auxiliary_path) sys.path.insert(0, auxiliary_path)
import release # DO NOT import after modifying system path
from utils import (get_dp_command, exception_manager, from utils import (get_dp_command, exception_manager,
tango_type_conversion, coerce_value, tango_type_conversion, coerce_value,
get_groups_from_json, get_tango_device_type_id) get_groups_from_json, get_tango_device_type_id)
......
...@@ -20,10 +20,6 @@ file_path = os.path.dirname(os.path.abspath(__file__)) ...@@ -20,10 +20,6 @@ file_path = os.path.dirname(os.path.abspath(__file__))
basedevice_path = os.path.abspath(os.path.join(file_path, os.pardir)) + "/SKABaseDevice" basedevice_path = os.path.abspath(os.path.join(file_path, os.pardir)) + "/SKABaseDevice"
sys.path.insert(0, basedevice_path) sys.path.insert(0, basedevice_path)
# basedevice_path = os.path.abspath("..") + "/SKABaseDevice"
# sys.path.insert(0, basedevice_path)
print(("From SKAMaster sys.path: ", sys.path))
# tango imports # tango imports
from tango import DebugIt from tango import DebugIt
from tango.server import run, DeviceMeta, attribute, command, device_property from tango.server import run, DeviceMeta, attribute, command, device_property
......
...@@ -19,7 +19,6 @@ from future.utils import with_metaclass ...@@ -19,7 +19,6 @@ from future.utils import with_metaclass
file_path = os.path.dirname(os.path.abspath(__file__)) file_path = os.path.dirname(os.path.abspath(__file__))
basedevice_path = os.path.abspath(os.path.join(file_path, os.pardir)) + "/SKABaseDevice" basedevice_path = os.path.abspath(os.path.join(file_path, os.pardir)) + "/SKABaseDevice"
sys.path.insert(0, basedevice_path) sys.path.insert(0, basedevice_path)
print(("From SKAObsDevice sys.path: ", sys.path))
# tango imports # tango imports
from tango.server import run, DeviceMeta, attribute from tango.server import run, DeviceMeta, attribute
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment