Skip to content
Snippets Groups Projects
Commit 839e1b4c authored by Drew Devereux's avatar Drew Devereux
Browse files

Merge branch 'mccs-396' into 'master'

[SP-1501] State models, commands and component managers

See merge request ska-telescope/ska-tango-base!48
parents 7127b688 8db102c5
No related branches found
No related tags found
No related merge requests found
Showing
with 288 additions and 609 deletions
FROM nexus.engageska-portugal.pt/ska-tango-images/pytango-builder:9.3.3.3 AS buildenv
RUN apt-get update && apt-get install gnupg2 -y
{
"name": "ska_tango_base vscode development container",
"context": "..",
"dockerFile": "Dockerfile",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/bin/python3",
"files.exclude": {
".coverage*": true,
"**/*.egg*": true,
"**/__pycache__": true
},
"files.watcherExclude": {
".coverage*": true,
"**/*.egg*": true,
"**/__pycache__": true
}
},
"extensions": [
"ms-python.python",
"lextudio.restructuredtext",
"davidanson.vscode-markdownlint",
"alexkrechik.cucumberautocomplete",
],
"postCreateCommand": "python3 -m pip install -e /workspaces/ska-tango-base --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple",
"remoteUser": "tango",
"remoteEnv": {
"PATH": "/home/tango/.local/bin:${containerEnv:PATH}",
}
}
.devcontainer/
.pytest_cache/
build/
htmlcov/
**/__pycache__/
......@@ -21,7 +21,7 @@ __pycache__
pip-log.txt
# Unit test / coverage reports
.coverage
.coverage*
.tox
.cache
nosetests.xml
......
# GitLab CI in conjunction with GitLab Runner can use Docker Engine to test and build any application.
# Docker, when used with GitLab CI, runs each job in a separate and isolated container using the predefined image that is set up in .gitlab-ci.yml.
# In this case we use the latest python docker image to build and test this project.
image: nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:9.3.3.1
image: nexus.engageska-portugal.pt/ska-tango-images/pytango-builder:9.3.3.3
include:
- project: 'ska-telescope/templates-repository'
......@@ -64,7 +64,7 @@ unit tests:
- k8srunner
script:
- echo $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA)
- python3 -m pip install -U $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA)
- python3 -m pip install --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple -U $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA)
- make test
- scripts/validate-metadata.sh
artifacts:
......@@ -77,7 +77,7 @@ linting:
- k8srunner
script:
- echo $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA)
- python3 -m pip install -U $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA)
- python3 -m pip install --extra-index-url https://nexus.engageska-portugal.pt/repository/pypi/simple -U $(ls -d ./dist/*.whl | grep $CI_COMMIT_SHORT_SHA)
- make lint
artifacts:
paths:
......
release=0.10.1
tag=ska_tango_base-0.10.1
release=0.11.0
tag=ska_tango_base-0.11.0
# Use SKA python image as base image
FROM nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:9.3.3.1 AS buildenv
FROM nexus.engageska-portugal.pt/ska-docker/ska-python-runtime:9.3.3.1 AS runtime
FROM nexus.engageska-portugal.pt/ska-tango-images/pytango-builder:9.3.3.3 AS buildenv
FROM nexus.engageska-portugal.pt/ska-tango-images/pytango-runtime:9.3.3.3 AS runtime
ARG IMAGE_VERSION=0.0.1
......
......@@ -17,7 +17,7 @@ SHELL = /bin/bash
#
DOCKER_REGISTRY_USER:=ska-telescope
PROJECT = ska_tango_base
IMAGE_FOR_DIAGRAMS = nexus.engageska-portugal.pt/ska-docker/ska-python-buildenv:9.3.3.1
IMAGE_FOR_DIAGRAMS = nexus.engageska-portugal.pt/ska-tango-images/pytango-builder:9.3.3.3
#
# include makefile to pick up the standard Make targets, e.g., 'make build'
# build, 'make push' docker push procedure, etc. The other Make targets
......@@ -44,16 +44,17 @@ test-in-docker: build ## Build the docker image and run tests inside it.
lint-in-docker: build ## Build the docker image and run lint inside it.
@docker run --rm $(IMAGE):$(VERSION) make lint
generate-diagrams-in-docker: ## Build the docker image and generate state machine diagrams inside it.
@docker run --rm -v $(PWD):/diagrams $(IMAGE_FOR_DIAGRAMS) bash -c "cd /diagrams && make generate-diagrams-in-docker-internals"
generate-diagrams-in-docker: ## Generate state machine diagrams using a container.
@docker run --rm -v $(PWD):/project $(IMAGE_FOR_DIAGRAMS) bash -c "cd /project && make generate-diagrams-in-docker-internals"
generate-diagrams-in-docker-internals: ## Generate state machine diagrams (within a container!)
test -f /.dockerenv # ensure running in docker container
apt-get update
apt-get install --yes graphviz graphviz-dev gsfonts pkg-config
python3 -m pip install pygraphviz
cd /diagrams/docs/source && python3 draw_state_machines.py
ls -lo /diagrams/docs/source/images/
cd /project && python3 -m pip install .
cd /project/docs/source && python3 scripts/draw_state_machines.py
ls -lo /project/docs/source/api/*/*.png
docs-in-docker: ## Generate docs inside a container
@docker build -t ska_tango_base_docs_builder . -f docs/Dockerfile
......
This diff is collapsed.
.. SKA Tango Base 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 Control Model
============================================
.. toctree::
:maxdepth: 2
.. automodule:: ska_tango_base.control_model
:members:
:undoc-members:
.. SKA Tango Base 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.
CSP Sub-element Master
============================================
This module implements a general Master device for a CSP Sub-element.
.. toctree::
:maxdepth: 2
.. automodule:: ska_tango_base.csp_subelement_master
Tango Device Class
------------------
.. autoclass:: ska_tango_base.CspSubElementMaster
:members:
:undoc-members:
.. SKA Tango Base 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.
.. |br| raw:: html
<br />
CSP Sub-element ObsDevice
============================================
.. toctree::
:maxdepth: 2
.. automodule:: ska_tango_base.csp_subelement_obsdevice
Tango Device Class
------------------
.. autoclass:: ska_tango_base.CspSubElementObsDevice
:members:
:undoc-members:
Instance attributes
-------------------
Here it is reported the list of the *instance attributes*. |br|
* ``scan_id``: the identification number of the scan. |br|
The scan ID is passed as argument of the *Scan* command. |br|
The attribute value is reported via TANGO attribute *scanID*.
* ``_sdp_addresses``: a python dictionary with the SDP destination addresses for the output
products. |br|
Depending on the sub-element (CBF, PSS, PST) this attribute can specify more than one destination address,
as for example in CBF sub-element. |br|
The SDP destination addresses are specified at configuration.
An SDP address specifies the MAC address, IP address and port of the endpoint. |br|
Below an example of how SDP addresses are specified in a Mid CBF configuration::
{
...
"outputHost": [[0, "192.168.0.1"], [8184, "192.168.0.2"]],
"outputMac": [[0, "06-00-00-00-00-01"]],
"outputPort": [[0, 9000, 1], [8184, 9000, 1]]
...
}
The value of this attribute is reported via the TANGO *sdpDestionationAddresses* attribute.
.. note:: Not all the Sub-element observing devices are connected to the SDP (for example Mid VCCs).
* ``_sdp_links_active``: a python list of boolean. Each list element reports the network connectivity of the
corresponding link to SDP.
* ``_sdp_links_capacity``: this attribute records the capacity in GB/s of the SDP link.
* ``_config_id``: it stores the unique identificator associated to a JSON scan configuration. |br|
The value of this attribute is reported via the TANGO attriute *configID*.
* ``_last_scan_configuration``: this attribute stores the last configuration successully programmed. |br|
The value is reported via the TANGO attribute *lastScanConfiguration*.
* ``_health_failure_msg``:
The value is reported via the TANGO attribute *healthFailureMesssage*.
.. SKA Tango Base 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.
CSP Sub-element Subarray
============================================
This module implements a generic Subarray device for a CSP Sub-element.
The scope of this module is to provide a uniform access to a CSP Sub-element
subarray from the CSP.LMC side.
.. toctree::
:maxdepth: 2
.. automodule:: ska_tango_base.csp_subelement_subarray
Tango Device Class
------------------
.. autoclass:: ska_tango_base.CspSubElementSubarray
:members:
:undoc-members:
.. SKA Tango Base 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.
Alarm Handler
============================================
.. toctree::
:maxdepth: 2
.. automodule:: ska_tango_base.alarm_handler_device
Tango Device Class
------------------
.. autoclass:: ska_tango_base.SKAAlarmHandler
:members:
:undoc-members:
.. SKA Tango Base 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.
Base Device
============================================
.. toctree::
:maxdepth: 2
.. automodule:: ska_tango_base.base_device
Tango Device Class
------------------
.. autoclass:: ska_tango_base.SKABaseDevice
:members:
:undoc-members:
Device State Model
------------------
.. autoclass:: ska_tango_base.DeviceStateModel
:members:
:undoc-members:
.. SKA Tango Base 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.
Capability
============================================
.. toctree::
:maxdepth: 2
.. automodule:: ska_tango_base.capability_device
Tango Device Class
------------------
.. autoclass:: ska_tango_base.SKACapability
:members:
:undoc-members:
.. SKA Tango Base 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.
Logger
============================================
.. toctree::
:maxdepth: 2
.. automodule:: ska_tango_base.logger_device
Tango Device Class
------------------
.. autoclass:: ska_tango_base.SKALogger
:members:
:undoc-members:
.. SKA Tango Base 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.
Master
============================================
.. toctree::
:maxdepth: 2
.. automodule:: ska_tango_base.master_device
Tango Device Class
------------------
.. autoclass:: ska_tango_base.SKAMaster
:members:
:undoc-members:
.. SKA Tango Base 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.
Observation Device
============================================
.. toctree::
:maxdepth: 2
.. automodule:: ska_tango_base.obs_device
Tango Device Class
------------------
.. autoclass:: ska_tango_base.SKAObsDevice
:members:
:undoc-members:
Device State Model
------------------
.. autoclass:: ska_tango_base.ObsDeviceStateModel
:members:
:undoc-members:
\ No newline at end of file
.. SKA Tango Base 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.
Subarray
============================================
.. toctree::
:maxdepth: 2
.. automodule:: ska_tango_base.subarray_device
Device Class
------------
.. autoclass:: ska_tango_base.SKASubarray
:members:
:undoc-members:
Device State Model
------------------
.. autoclass:: ska_tango_base.SKASubarrayStateModel
:members:
:undoc-members:
Resource Manager
----------------
.. autoclass:: ska_tango_base.SKASubarrayResourceManager
:members:
:undoc-members:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment