Skip to content
Snippets Groups Projects
Commit 5dd23b69 authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

L2SS-869: merge branch 'master' into L2SS-869

parents 44d9e148 7cec2435
No related branches found
No related tags found
1 merge request!426Resolve L2SS-869 "Improve querying in stats writer"
......@@ -527,7 +527,8 @@ xenon:
shellcheck:
stage: static-analysis
script:
# TODO(Corne): Ignore shell files in submodules
# TODO(Corne): L2SS-962: Ignore shell files in submodules
- shellcheck --version
- shellcheck **/*.sh
sphinx-documentation:
stage: documentation
......
......@@ -203,6 +203,7 @@ class statistics_data:
# get SST specific stuff
if self.marker == "S":
self.data_id_signal_input_index = file[group_key].attrs["data_id_signal_input_index"]
# check if the dataset is empty or not. if empty, set to None, if not get the value
attribute_names = ["rcu_attenuator_dB", "rcu_band_select", "rcu_dth_on"]
for a in attribute_names:
if file[group_key].attrs[a].shape is None:
......
......@@ -338,10 +338,10 @@ class SstHdf5Writer(HDF5Writer):
attribute_names = ["rcu_attenuator_dB", "rcu_band_select", "rcu_dth_on"]
attribute_types = {"rcu_attenuator_dB": numpy.int64, "rcu_band_select" : numpy.int64, "rcu_dth_on" : bool}
for a in attribute_names:
if self.current_matrix.parameters[a] is None:
self.device_attributes[a] = h5py.Empty("f")
else:
try:
self.device_attributes[a] = self.current_matrix.parameters[a].astype(attribute_types[a])
except AttributeError:
self.device_attributes[a] = h5py.Empty("f")
for k,v in self.device_attributes.items():
current_group.attrs[k] = v
......
......@@ -24,7 +24,11 @@ deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/../docker-compose/lofar-device-base/lofar-requirements.txt
-r{toxinidir}/test-requirements.txt
commands = {envpython} -m stestr run {posargs}
commands_pre =
{envpython} --version
commands =
{envpython} -m stestr --version
{envpython} -m stestr run {posargs}
[testenv:integration]
; Warning running integration tests will make changes to your docker system!
......@@ -37,6 +41,8 @@ setenv =
PYTHON={envpython} -m coverage run --source tangostationcontrol --parallel-mode
commands =
echo "Integration test directory configured for{env:TESTS_DIR} ({env:TEST_MODULE:default})"
{envpython} -m stestr --version
{envpython} -m coverage --version
{envpython} -m stestr run --serial {posargs}
{envpython} -m coverage combine
{envpython} -m coverage html --omit='*test*' -d cover
......@@ -54,6 +60,8 @@ deps =
-r{toxinidir}/../docker-compose/lofar-device-base/lofar-requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
{envpython} -m stestr --version
{envpython} -m coverage --version
{envpython} -m coverage erase
{envpython} -m stestr run {posargs}
{envpython} -m coverage combine
......@@ -64,6 +72,8 @@ commands =
; TODO(Corne): Integrate Hacking to customize pep8 rules
[testenv:pep8]
commands =
{envpython} -m doc8 --version
{envpython} -m flake8 --version
{envpython} -m doc8 docs/source/ --ignore D001
{envpython} -m flake8
......@@ -73,10 +83,12 @@ commands =
; It thus matters what interfaces Docker will bind our
; containers to, not what our containers listen on.
commands =
{envpython} -m bandit --version
{envpython} -m bandit -r devices/ -n5 -ll -s B104
[testenv:xenon];
commands =
{envpython} -m xenon --version
{envpython} -m xenon tangostationcontrol -b B -m A -a A -i libhdbpp-python
[testenv:docs]
......@@ -84,6 +96,7 @@ deps =
-r{toxinidir}/../docker-compose/lofar-device-base/lofar-requirements.txt
-r{toxinidir}/docs/docs-requirements.txt
commands =
sphinx-build --version
sphinx-build -W -b html docs/source docs/build/html
[flake8]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment