From 0de733f2d15a8f3e06232c5ac45bbf28699abc43 Mon Sep 17 00:00:00 2001 From: Denis Nadeau Date: Wed, 15 Aug 2018 17:57:40 -0700 Subject: [PATCH] fix #246 clone axis units issue --- .circleci/config.yml | 6 +++--- Lib/axis.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 276d67cc..4b1a83a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,8 +22,8 @@ aliases: conda config --set always_yes yes --set changeps1 no conda update -y -q conda conda config --set anaconda_upload no - conda create -n py3 -c cdat/label/unstable -c cdat/label/nightly -c conda-forge -c cdat libcf distarray cdtime libcdms cdat_info testsrunner numpy esmf esmpy libdrs_f pyopenssl nose requests flake8 myproxyclient "python>3" "libpng=1.6.34" - conda create -n py2 -c cdat/label/unstable -c cdat/label/nightly -c conda-forge -c cdat libcf distarray cdtime libcdms cdat_info testsrunner numpy esmf esmpy libdrs_f pyopenssl nose requests flake8 myproxyclient "python<3" "libpng=1.6.34" + conda create -n py3 -c cdat/label/unstable -c cdat/label/nightly -c conda-forge -c cdat libcf distarray cdtime libcdms cdat_info testsrunner numpy esmf esmpy libdrs_f pyopenssl nose requests flake8 myproxyclient "python>3" + conda create -n py2 -c cdat/label/unstable -c cdat/label/nightly -c conda-forge -c cdat libcf distarray cdtime libcdms cdat_info testsrunner numpy esmf esmpy libdrs_f pyopenssl nose requests flake8 myproxyclient "python<3" if [ $(uname) == "Linux" ]; then conda install -n py3 -c cdat/label/unstable -c cdat/label/nightly -c conda-forge gcc_linux-64 conda install -n py2 -c cdat/label/unstable -c cdat/label/nightly -c conda-forge gcc_linux-64 @@ -66,7 +66,7 @@ aliases: source activate py3 python run_tests.py --subdir -v2 PY3_RESULT=$? - echo "**** py3 test result: "${PY3_RESULT} + echo "*** py3 test result: "${PY3_RESULT} echo $PY2_RESULT > $HOME/project/$WORKDIR/py2_result.txt echo $PY3_RESULT > $HOME/project/$WORKDIR/py3_result.txt diff --git a/Lib/axis.py b/Lib/axis.py index b070ba54..83af3cea 100644 --- a/Lib/axis.py +++ b/Lib/axis.py @@ -1708,13 +1708,13 @@ def clone(self, copyData=1): else: mycopy = createAxis(self[:]) mycopy.id = self.id + mycopy.__dict__.update(self.__dict__.copy()) + mycopy._obj_ = None # Erase Cdfile object if exist try: mycopy.setBounds(b, isGeneric=isGeneric[0]) except CDMSError: b = mycopy.genGenericBounds() mycopy.setBounds(b, isGeneric=False) - for k, v in list(self.attributes.items()): - setattr(mycopy, k, v) return mycopy def listall(self, all=None):