From 70beeb9918efbe410d970c713e0bc96443f73d88 Mon Sep 17 00:00:00 2001 From: Johan Hidding Date: Tue, 17 Apr 2018 11:53:53 +0200 Subject: [PATCH] fix dcs.DCS serialisation --- .gitignore | 1 + cslib/noodles.py | 6 ++++-- setup.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 31209dc..1b5b362 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ var/ *.egg-info/ .installed.cfg *.egg +.pytest_cache # PyInstaller # Usually these files are written by a python script from a template diff --git a/cslib/noodles.py b/cslib/noodles.py index e3d77ad..5e6f921 100644 --- a/cslib/noodles.py +++ b/cslib/noodles.py @@ -3,7 +3,7 @@ from .dataframe import DataFrame, DCS from .units import units - +from .dcs import DCS as DCS2 class SerQuantity(Serialiser): def encode(self, obj, make_rec): @@ -53,7 +53,9 @@ def registry(): DataFrame: SerStandardObject( DataFrame, ['data', 'units', 'comments']), DCS: SerStandardObject( - DCS, ['energy', 'angle', 'cs']) + DCS, ['energy', 'angle', 'cs']), + DCS2: SerStandardObject( + DCS2, ['x', 'y', 'z', 'log']) }, hooks={ '': SerQuantity(''), diff --git a/setup.py b/setup.py index 8d9e328..968409c 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ 'Development Status :: 4 - Beta', 'Programming Language :: Python :: 3', 'Topic :: Scientific/Engineering :: Physics'], - install_requires=['pint==0.8.1', 'numpy==1.13.0', 'scipy==0.19.1', 'noodles[numpy,prov]==0.2.3'], + install_requires=['pint==0.8.1', 'numpy==1.13.0', 'scipy==0.19.1', 'noodles[numpy]==0.3.0'], extras_require={ 'test': ['pytest', 'sphinx'] },