Commit 2690d683 authored by Sylvain Guieu's avatar Sylvain Guieu

file 1D7 supported

parent 69ab9c0a
......@@ -90,23 +90,13 @@ fits_name:
fits_sub_system:
xls_col_name: FITS sub-system
model_comment:
xls_col_name: Comments (model)
pbs_code:
xls_col_name: PBS code
power:
xls_col_name: Power
sensor_grouping:
xls_col_name: Sensor grouping
......@@ -118,6 +108,16 @@ sw_device:
sw_supervision:
xls_col_name: Supervision SW
brake:
xls_col_name: Brake or detent mechanism
encoder:
xls_col_name: 'Encoder: model'
homing:
xls_col_name: Homing on…
encoder_prev:
xls_col_name: 'Encoder : p/rev'
steps_per_turn:
xls_col_name: Steps per turn (if stepper)
......@@ -80,7 +80,7 @@ class Int(FType):
return field
def parse_value(self, field, value):
value = int(value)
value = 0 if value is None else int(value)
field[K.MIN] = min(field[K.MIN] , value)
field[K.MAX] = max(field[K.MAX] , value)
return value
......@@ -99,4 +99,5 @@ def load_device_conf(file_name):
fields[k] = field
return fields
\ No newline at end of file
......@@ -30,6 +30,22 @@ def version2rules(version):
'key_col': 'E', # the column which correspond to the dictionary key e.i. a unique name id
'column_patch': {'T':'#2'}
}
if version in ('1D7',):
# from A to Z
columns = [chr(x) for x in range(65, 65+26)]
#from AA to AP
columns += ['A'+chr(x) for x in range(65, 65+18)]
# AB to BQ
columns += ['B'+chr(x) for x in range(65, 65+17)]
rows = list(range(4, 145))
return {'columns':columns,
'rows':rows,
'header_row': 2, # the row where to find the header
'key_col': 'D', # the column which correspond to the dictionary key e.i. a unique name id
'column_patch': {'AM':'#2', 'AQ':'#3'}
}
raise ValueError('version %s cannot be read. version2rules function need to be updated to read the given version'%version)
......
......@@ -7,7 +7,7 @@ import sys
from setuptools import setup
name = "hrmtools"
version='0.1.dev5' # https://www.python.org/dev/peps/pep-0440/
version='0.1.dev6' # https://www.python.org/dev/peps/pep-0440/
author='Sylvain Guieu'
author_email='sylvain.guieu@univ-grenoble-alpes.fr'
install_requires = ['PyYAML', 'openpyxl>=3.0']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment