[yt-svn] commit/yt-3.0: 12 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Sep 9 12:31:50 PDT 2013


12 new commits in yt-3.0:

https://bitbucket.org/yt_analysis/yt-3.0/commits/bc3295e67941/
Changeset:   bc3295e67941
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-09-09 16:22:04
Summary:     Fixing format string error in logging for ARTIO.
Affected #:  1 file

diff -r a5b7d8a34375cddfe6337614947dd3f605adecf0 -r bc3295e679413f5c05473a7380bfaa88b5ec9f80 yt/frontends/artio/data_structures.py
--- a/yt/frontends/artio/data_structures.py
+++ b/yt/frontends/artio/data_structures.py
@@ -315,7 +315,7 @@
         self.fluid_field_list = self._detect_fluid_fields()
         self.particle_field_list = self._detect_particle_fields()
         self.field_list = self.fluid_field_list + self.particle_field_list
-        mylog.debug("Detected fields:", (self.field_list,))
+        mylog.debug("Detected fields: %s", (self.field_list,))
 
     def _detect_fluid_fields(self):
         return [art_to_yt[f] for f in yt_to_art.values() if f in


https://bitbucket.org/yt_analysis/yt-3.0/commits/cb14bdc63b94/
Changeset:   cb14bdc63b94
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-09-09 16:24:08
Summary:     We have to correctly set our field indices for ARTIO fill_sfc.
Affected #:  1 file

diff -r bc3295e679413f5c05473a7380bfaa88b5ec9f80 -r cb14bdc63b94677c6ce012be6db112ef08b0bb8b yt/frontends/artio/_artio_caller.pyx
--- a/yt/frontends/artio/_artio_caller.pyx
+++ b/yt/frontends/artio/_artio_caller.pyx
@@ -766,7 +766,7 @@
                     for j in range(8):
                         for i in range(nf):
                             field_vals[i][local_ind[level] * 8 + j] = \
-                                grid_variables[ngv * j + i]
+                                grid_variables[ngv * j + field_ind[i]]
                     local_ind[level] += 1
                 status = artio_grid_read_level_end(handle)
                 check_artio_status(status)


https://bitbucket.org/yt_analysis/yt-3.0/commits/2c3f399e75d3/
Changeset:   2c3f399e75d3
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-09-09 16:30:20
Summary:     Updating ARTIO tests with sample data.
Affected #:  1 file

diff -r cb14bdc63b94677c6ce012be6db112ef08b0bb8b -r 2c3f399e75d390c5b2f574e5667770639e7613ed yt/frontends/artio/tests/test_outputs.py
--- a/yt/frontends/artio/tests/test_outputs.py
+++ b/yt/frontends/artio/tests/test_outputs.py
@@ -31,21 +31,21 @@
     FieldValuesTest
 from yt.frontends.artio.api import ARTIOStaticOutput
 
-_fields = ("Temperature", "Density", "VelocityMagnitude") 
+_fields = ("Temperature", "Density", "VelocityMagnitude",
+           ("deposit", "all_density"), ("deposit", "all_count")) 
 
-aiso5 = "artio/aiso_a0.9005.art"
- at requires_pf(aiso5)
-def test_aiso5():
-    pf = data_dir_load(aiso5)
-    yield assert_equal, str(pf), "aiso_a0.9005.art"
+sizmbhloz = "sizmbhloz-clref04SNth-rs9_a0.9011/sizmbhloz-clref04SNth-rs9_a0.9011.art"
+ at requires_pf(sizmbhloz)
+def test_sizmbhloz():
+    pf = data_dir_load(sizmbhloz)
+    yield assert_equal, str(pf), "sizmbhloz-clref04SNth-rs9_a0.9011.art"
     dso = [ None, ("sphere", ("max", (0.1, 'unitary')))]
     for field in _fields:
         for axis in [0, 1, 2]:
             for ds in dso:
                 for weight_field in [None, "Density"]:
                     yield PixelizedProjectionValuesTest(
-                        aiso5, axis, field, weight_field,
+                        sizmbhloz, axis, field, weight_field,
                         ds)
                 yield FieldValuesTest(
-                        aiso5, field, ds)
-
+                        sizmbhloz, field, ds)


https://bitbucket.org/yt_analysis/yt-3.0/commits/b8435fe1eb92/
Changeset:   b8435fe1eb92
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-09-09 16:30:54
Summary:     Since this is yt-3.0, I have changed the gold standard to be gold310.
Affected #:  1 file

diff -r 2c3f399e75d390c5b2f574e5667770639e7613ed -r b8435fe1eb92169b5dec518e2f096d4dd7a45715 yt/config.py
--- a/yt/config.py
+++ b/yt/config.py
@@ -62,7 +62,7 @@
     notebook_password = '',
     answer_testing_tolerance = '3',
     answer_testing_bitwise = 'False',
-    gold_standard_filename = 'gold010',
+    gold_standard_filename = 'gold310',
     local_standard_filename = 'local001',
     sketchfab_api_key = 'None',
     thread_field_detection = 'False'


https://bitbucket.org/yt_analysis/yt-3.0/commits/cf6a60c47a16/
Changeset:   cf6a60c47a16
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-09-09 16:59:22
Summary:     Fixing an issue with string formatting and __getitem__.
Affected #:  1 file

diff -r b8435fe1eb92169b5dec518e2f096d4dd7a45715 -r cf6a60c47a16af7538a5d6fdba8275787ec9cf05 yt/utilities/answer_testing/framework.py
--- a/yt/utilities/answer_testing/framework.py
+++ b/yt/utilities/answer_testing/framework.py
@@ -492,8 +492,9 @@
         frb[self.field]
         frb[self.weight_field]
         d = frb.data
-        d.update( dict( (("%s_sum" % f, proj[f].sum(dtype="float64"))
-                         for f in proj.field_data.keys()) ) )
+        for f in proj.field_data:
+            # Sometimes f will be a tuple.
+            d["%s_sum" % (f,)] = proj.field_data[f].sum(dtype="float64")
         return d
 
     def compare(self, new_result, old_result):


https://bitbucket.org/yt_analysis/yt-3.0/commits/b28b5fecc160/
Changeset:   b28b5fecc160
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-09-09 17:06:37
Summary:     When loading from another directory, make sure we have an absolute path for
RAMSES files.
Affected #:  1 file

diff -r cf6a60c47a16af7538a5d6fdba8275787ec9cf05 -r b28b5fecc1600d198216b61057d51b96ad6528d3 yt/frontends/ramses/data_structures.py
--- a/yt/frontends/ramses/data_structures.py
+++ b/yt/frontends/ramses/data_structures.py
@@ -63,7 +63,8 @@
         num = os.path.basename(pf.parameter_filename).split("."
                 )[0].split("_")[1]
         basename = "%s/%%s_%s.out%05i" % (
-            os.path.dirname(pf.parameter_filename),
+            os.path.abspath(
+              os.path.dirname(pf.parameter_filename)),
             num, domain_id)
         for t in ['grav', 'hydro', 'part', 'amr']:
             setattr(self, "%s_fn" % t, basename % t)


https://bitbucket.org/yt_analysis/yt-3.0/commits/a9d6608d03ac/
Changeset:   a9d6608d03ac
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-09-09 17:09:12
Summary:     Adding RAMSES frontend tests.
Affected #:  2 files

diff -r b28b5fecc1600d198216b61057d51b96ad6528d3 -r a9d6608d03ac9c18dfa2b970c705526e047ce50a yt/frontends/ramses/tests/test_outputs.py
--- /dev/null
+++ b/yt/frontends/ramses/tests/test_outputs.py
@@ -0,0 +1,52 @@
+"""
+RAMSES frontend tests 
+
+Author: Matthew Turk <matthewturk at gmail.com>
+Affiliation: Columbia University
+Homepage: http://yt-project.org/
+License:
+  Copyright (C) 2013 Matthew Turk.  All Rights Reserved.
+
+  This file is part of yt.
+
+  yt is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+"""
+
+from yt.testing import *
+from yt.utilities.answer_testing.framework import \
+    requires_pf, \
+    data_dir_load, \
+    PixelizedProjectionValuesTest, \
+    FieldValuesTest
+from yt.frontends.artio.api import ARTIOStaticOutput
+
+_fields = ("Temperature", "Density", "VelocityMagnitude",
+           ("deposit", "all_density"), ("deposit", "all_count")) 
+
+output_00080 = "output_00080/info_00080.txt"
+ at requires_pf(output_00080)
+def test_output_00080():
+    pf = data_dir_load(output_00080)
+    yield assert_equal, str(pf), "info_00080"
+    dso = [ None, ("sphere", ("max", (0.1, 'unitary')))]
+    for field in _fields:
+        for axis in [0, 1, 2]:
+            for ds in dso:
+                for weight_field in [None, "Density"]:
+                    yield PixelizedProjectionValuesTest(
+                        output_00080, axis, field, weight_field,
+                        ds)
+                yield FieldValuesTest(
+                        output_00080, field, ds)
+


https://bitbucket.org/yt_analysis/yt-3.0/commits/f79eeee6ad10/
Changeset:   f79eeee6ad10
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-09-09 17:18:42
Summary:     Adding filename paths to the template.
Affected #:  1 file

diff -r a9d6608d03ac9c18dfa2b970c705526e047ce50a -r f79eeee6ad10cf5e622a580a4e45089b8b12fc7c yt/frontends/sph/data_structures.py
--- a/yt/frontends/sph/data_structures.py
+++ b/yt/frontends/sph/data_structures.py
@@ -308,7 +308,7 @@
         self.hubble_constant = hvals["HubbleParam"]
         self.parameters = hvals
 
-        prefix = self.parameter_filename.split(".", 1)[0]
+        prefix = os.path.abspath(self.parameter_filename.split(".", 1)[0])
         suffix = self.parameter_filename.rsplit(".", 1)[-1]
         self.filename_template = "%s.%%(num)i.%s" % (prefix, suffix)
         self.file_count = hvals["NumFilesPerSnapshot"]


https://bitbucket.org/yt_analysis/yt-3.0/commits/0c3a35d32850/
Changeset:   0c3a35d32850
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-09-09 17:19:44
Summary:     Adding OWLS tests.
Affected #:  2 files

diff -r f79eeee6ad10cf5e622a580a4e45089b8b12fc7c -r 0c3a35d328507f6634bac7613f30d6caf409f49e yt/frontends/sph/tests/test_owls.py
--- /dev/null
+++ b/yt/frontends/sph/tests/test_owls.py
@@ -0,0 +1,61 @@
+"""
+Tipsy tests using the OWLS HDF5-Gadget dataset
+
+Author: Matthew Turk <matthewturk at gmail.com>
+Affiliation: Columbia University
+Homepage: http://yt-project.org/
+License:
+  Copyright (C) 2013 Matthew Turk.  All Rights Reserved.
+
+  This file is part of yt.
+
+  yt is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+"""
+
+from yt.testing import *
+from yt.utilities.answer_testing.framework import \
+    requires_pf, \
+    small_patch_amr, \
+    big_patch_amr, \
+    data_dir_load, \
+    PixelizedProjectionValuesTest, \
+    FieldValuesTest
+from yt.frontends.sph.api import OWLSStaticOutput
+
+_fields = (("deposit", "all_density"), ("deposit", "all_count"),
+           ("deposit", "PartType0_density"),
+           ("deposit", "PartType4_density"))
+
+os33 = "snapshot_033/snap_033.0.hdf5"
+ at requires_pf(os33)
+def test_snapshot_033():
+    pf = data_dir_load(os33)
+    yield assert_equal, str(pf), "snap_033"
+    dso = [ None, ("sphere", ("c", (0.1, 'unitary')))]
+    dd = pf.h.all_data()
+    yield assert_equal, dd["Coordinates"].shape[0], 2*(128*128*128)
+    yield assert_equal, dd["Coordinates"].shape[1], 3
+    tot = sum(dd[ptype,"Coordinates"].shape[0]
+              for ptype in pf.particle_types if ptype != "all")
+    yield assert_equal, tot, (2*128*128*128)
+    for field in _fields:
+        for axis in [0, 1, 2]:
+            for ds in dso:
+                for weight_field in [None, "Density"]:
+                    yield PixelizedProjectionValuesTest(
+                        os33, axis, field, weight_field,
+                        ds)
+                yield FieldValuesTest(
+                        os33, field, ds)
+


https://bitbucket.org/yt_analysis/yt-3.0/commits/8e06fdd4faae/
Changeset:   8e06fdd4faae
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-09-09 20:39:47
Summary:     Merging
Affected #:  48 files

diff -r 0c3a35d328507f6634bac7613f30d6caf409f49e -r 8e06fdd4faaee9bf5901e20114fa7f147d4a3760 .hgchurn
--- a/.hgchurn
+++ b/.hgchurn
@@ -17,3 +17,4 @@
 tabel = tabel at slac.stanford.edu
 sername=kayleanelson = kaylea.nelson at yale.edu
 kayleanelson = kaylea.nelson at yale.edu
+jcforbes at ucsc.edu = jforbes at ucolick.org

diff -r 0c3a35d328507f6634bac7613f30d6caf409f49e -r 8e06fdd4faaee9bf5901e20114fa7f147d4a3760 doc/install_script.sh
--- a/doc/install_script.sh
+++ b/doc/install_script.sh
@@ -419,7 +419,7 @@
 echo "be installing ZeroMQ"
 
 printf "%-15s = %s so I " "INST_ROCKSTAR" "${INST_ROCKSTAR}"
-get_willwont ${INST_0MQ}
+get_willwont ${INST_ROCKSTAR}
 echo "be installing Rockstar"
 
 echo
@@ -877,6 +877,11 @@
 mkdir -p ${DEST_DIR}/src/$MATPLOTLIB
 echo "[directories]" >> ${DEST_DIR}/src/$MATPLOTLIB/setup.cfg
 echo "basedirlist = ${DEST_DIR}" >> ${DEST_DIR}/src/$MATPLOTLIB/setup.cfg
+if [ `uname` = "Darwin" ]
+then
+   echo "[gui_support]" >> ${DEST_DIR}/src/$MATPLOTLIB/setup.cfg
+   echo "macosx = False" >> ${DEST_DIR}/src/$MATPLOTLIB/setup.cfg
+fi
 do_setup_py $MATPLOTLIB
 if [ -n "${OLD_LDFLAGS}" ]
 then

diff -r 0c3a35d328507f6634bac7613f30d6caf409f49e -r 8e06fdd4faaee9bf5901e20114fa7f147d4a3760 yt/analysis_modules/halo_merger_tree/enzofof_merger_tree.py
--- a/yt/analysis_modules/halo_merger_tree/enzofof_merger_tree.py
+++ b/yt/analysis_modules/halo_merger_tree/enzofof_merger_tree.py
@@ -54,8 +54,8 @@
 import glob
 
 from yt.funcs import *
-from yt.utilities.pykdtree import KDTree
-import yt.utilities.pydot as pydot
+from yt.extern.pykdtree import KDTree
+import yt.extern.pydot as pydot
 
 # We don't currently use this, but we may again find a use for it in the
 # future.

diff -r 0c3a35d328507f6634bac7613f30d6caf409f49e -r 8e06fdd4faaee9bf5901e20114fa7f147d4a3760 yt/analysis_modules/halo_merger_tree/merger_tree.py
--- a/yt/analysis_modules/halo_merger_tree/merger_tree.py
+++ b/yt/analysis_modules/halo_merger_tree/merger_tree.py
@@ -36,7 +36,7 @@
     HaloProfiler
 from yt.convenience import load
 from yt.utilities.logger import ytLogger as mylog
-import yt.utilities.pydot as pydot
+import yt.extern.pydot as pydot
 from yt.utilities.spatial import cKDTree
 from yt.utilities.parallel_tools.parallel_analysis_interface import \
     ParallelDummy, \

diff -r 0c3a35d328507f6634bac7613f30d6caf409f49e -r 8e06fdd4faaee9bf5901e20114fa7f147d4a3760 yt/analysis_modules/halo_profiler/multi_halo_profiler.py
--- a/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
+++ b/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
@@ -1254,7 +1254,7 @@
                 mylog.error("Output directory exists, but is not a directory: %s." % my_output_dir)
                 raise IOError(my_output_dir)
         else:
-            os.mkdir(my_output_dir)
+            os.makedirs(my_output_dir)
 
 def _shift_projections(pf, projections, oldCenter, newCenter, axis):
     """

diff -r 0c3a35d328507f6634bac7613f30d6caf409f49e -r 8e06fdd4faaee9bf5901e20114fa7f147d4a3760 yt/convenience.py
--- a/yt/convenience.py
+++ b/yt/convenience.py
@@ -58,8 +58,19 @@
     candidates = []
     args = [os.path.expanduser(arg) if isinstance(arg, types.StringTypes)
             else arg for arg in args]
-    valid_file = [os.path.exists(arg) if isinstance(arg, types.StringTypes) 
-            else False for arg in args]
+    valid_file = []
+    for argno, arg in enumerate(args):
+        if isinstance(arg, types.StringTypes):
+            if os.path.exists(arg):
+                valid_file.append(True)
+            else:
+                if os.path.exists(os.path.join(ytcfg.get("yt", "test_data_dir"), arg)):
+                    valid_file.append(True)
+                    args[argno] = os.path.join(ytcfg.get("yt", "test_data_dir"), arg)
+                else:
+                    valid_file.append(False)
+        else:
+            valid_file.append(False)
     if not any(valid_file):
         try:
             from yt.data_objects.time_series import TimeSeriesData

diff -r 0c3a35d328507f6634bac7613f30d6caf409f49e -r 8e06fdd4faaee9bf5901e20114fa7f147d4a3760 yt/data_objects/time_series.py
--- a/yt/data_objects/time_series.py
+++ b/yt/data_objects/time_series.py
@@ -347,6 +347,7 @@
         # Figure out the starting and stopping times and redshift.
         self._calculate_simulation_bounds()
         # Get all possible datasets.
+        self.all_time_outputs = []
         self._get_all_outputs(find_outputs=find_outputs)
         
         self.print_key_parameters()

This diff is so big that we needed to truncate the remainder.

https://bitbucket.org/yt_analysis/yt-3.0/commits/4f048d43cf7c/
Changeset:   4f048d43cf7c
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-09-09 20:46:37
Summary:     Problems with field detection mean we should disable this for the time being.
Affected #:  1 file

diff -r 8e06fdd4faaee9bf5901e20114fa7f147d4a3760 -r 4f048d43cf7c871f1eabe6b76ebe9c47e95697e8 yt/frontends/enzo/tests/test_outputs.py
--- a/yt/frontends/enzo/tests/test_outputs.py
+++ b/yt/frontends/enzo/tests/test_outputs.py
@@ -31,8 +31,7 @@
     data_dir_load
 from yt.frontends.enzo.api import EnzoStaticOutput
 
-_fields = ("Temperature", "Density", "VelocityMagnitude", "DivV",
-           "particle_density")
+_fields = ("Temperature", "Density", "VelocityMagnitude", "DivV")
 
 m7 = "DD0010/moving7_0010"
 @requires_pf(m7)


https://bitbucket.org/yt_analysis/yt-3.0/commits/f462e06e6a77/
Changeset:   f462e06e6a77
Branch:      yt-3.0
User:        xarthisius
Date:        2013-09-09 21:31:45
Summary:     Merged in MatthewTurk/yt-3.0 (pull request #92)

Adding frontend tests
Affected #:  12 files

diff -r 0db2b82b59f454b78845d24585fc723dd4db130b -r f462e06e6a772cd5277184469803c52404d1ea12 yt/config.py
--- a/yt/config.py
+++ b/yt/config.py
@@ -62,7 +62,7 @@
     notebook_password = '',
     answer_testing_tolerance = '3',
     answer_testing_bitwise = 'False',
-    gold_standard_filename = 'gold010',
+    gold_standard_filename = 'gold310',
     local_standard_filename = 'local001',
     sketchfab_api_key = 'None',
     thread_field_detection = 'False'

diff -r 0db2b82b59f454b78845d24585fc723dd4db130b -r f462e06e6a772cd5277184469803c52404d1ea12 yt/frontends/artio/_artio_caller.pyx
--- a/yt/frontends/artio/_artio_caller.pyx
+++ b/yt/frontends/artio/_artio_caller.pyx
@@ -766,7 +766,7 @@
                     for j in range(8):
                         for i in range(nf):
                             field_vals[i][local_ind[level] * 8 + j] = \
-                                grid_variables[ngv * j + i]
+                                grid_variables[ngv * j + field_ind[i]]
                     local_ind[level] += 1
                 status = artio_grid_read_level_end(handle)
                 check_artio_status(status)

diff -r 0db2b82b59f454b78845d24585fc723dd4db130b -r f462e06e6a772cd5277184469803c52404d1ea12 yt/frontends/artio/data_structures.py
--- a/yt/frontends/artio/data_structures.py
+++ b/yt/frontends/artio/data_structures.py
@@ -315,7 +315,7 @@
         self.fluid_field_list = self._detect_fluid_fields()
         self.particle_field_list = self._detect_particle_fields()
         self.field_list = self.fluid_field_list + self.particle_field_list
-        mylog.debug("Detected fields:", (self.field_list,))
+        mylog.debug("Detected fields: %s", (self.field_list,))
 
     def _detect_fluid_fields(self):
         return [art_to_yt[f] for f in yt_to_art.values() if f in

diff -r 0db2b82b59f454b78845d24585fc723dd4db130b -r f462e06e6a772cd5277184469803c52404d1ea12 yt/frontends/artio/tests/test_outputs.py
--- a/yt/frontends/artio/tests/test_outputs.py
+++ b/yt/frontends/artio/tests/test_outputs.py
@@ -31,21 +31,21 @@
     FieldValuesTest
 from yt.frontends.artio.api import ARTIOStaticOutput
 
-_fields = ("Temperature", "Density", "VelocityMagnitude") 
+_fields = ("Temperature", "Density", "VelocityMagnitude",
+           ("deposit", "all_density"), ("deposit", "all_count")) 
 
-aiso5 = "artio/aiso_a0.9005.art"
- at requires_pf(aiso5)
-def test_aiso5():
-    pf = data_dir_load(aiso5)
-    yield assert_equal, str(pf), "aiso_a0.9005.art"
+sizmbhloz = "sizmbhloz-clref04SNth-rs9_a0.9011/sizmbhloz-clref04SNth-rs9_a0.9011.art"
+ at requires_pf(sizmbhloz)
+def test_sizmbhloz():
+    pf = data_dir_load(sizmbhloz)
+    yield assert_equal, str(pf), "sizmbhloz-clref04SNth-rs9_a0.9011.art"
     dso = [ None, ("sphere", ("max", (0.1, 'unitary')))]
     for field in _fields:
         for axis in [0, 1, 2]:
             for ds in dso:
                 for weight_field in [None, "Density"]:
                     yield PixelizedProjectionValuesTest(
-                        aiso5, axis, field, weight_field,
+                        sizmbhloz, axis, field, weight_field,
                         ds)
                 yield FieldValuesTest(
-                        aiso5, field, ds)
-
+                        sizmbhloz, field, ds)

diff -r 0db2b82b59f454b78845d24585fc723dd4db130b -r f462e06e6a772cd5277184469803c52404d1ea12 yt/frontends/enzo/tests/test_outputs.py
--- a/yt/frontends/enzo/tests/test_outputs.py
+++ b/yt/frontends/enzo/tests/test_outputs.py
@@ -31,8 +31,7 @@
     data_dir_load
 from yt.frontends.enzo.api import EnzoStaticOutput
 
-_fields = ("Temperature", "Density", "VelocityMagnitude", "DivV",
-           "particle_density")
+_fields = ("Temperature", "Density", "VelocityMagnitude", "DivV")
 
 m7 = "DD0010/moving7_0010"
 @requires_pf(m7)

diff -r 0db2b82b59f454b78845d24585fc723dd4db130b -r f462e06e6a772cd5277184469803c52404d1ea12 yt/frontends/ramses/data_structures.py
--- a/yt/frontends/ramses/data_structures.py
+++ b/yt/frontends/ramses/data_structures.py
@@ -63,7 +63,8 @@
         num = os.path.basename(pf.parameter_filename).split("."
                 )[0].split("_")[1]
         basename = "%s/%%s_%s.out%05i" % (
-            os.path.dirname(pf.parameter_filename),
+            os.path.abspath(
+              os.path.dirname(pf.parameter_filename)),
             num, domain_id)
         for t in ['grav', 'hydro', 'part', 'amr']:
             setattr(self, "%s_fn" % t, basename % t)

diff -r 0db2b82b59f454b78845d24585fc723dd4db130b -r f462e06e6a772cd5277184469803c52404d1ea12 yt/frontends/ramses/tests/test_outputs.py
--- /dev/null
+++ b/yt/frontends/ramses/tests/test_outputs.py
@@ -0,0 +1,52 @@
+"""
+RAMSES frontend tests 
+
+Author: Matthew Turk <matthewturk at gmail.com>
+Affiliation: Columbia University
+Homepage: http://yt-project.org/
+License:
+  Copyright (C) 2013 Matthew Turk.  All Rights Reserved.
+
+  This file is part of yt.
+
+  yt is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+"""
+
+from yt.testing import *
+from yt.utilities.answer_testing.framework import \
+    requires_pf, \
+    data_dir_load, \
+    PixelizedProjectionValuesTest, \
+    FieldValuesTest
+from yt.frontends.artio.api import ARTIOStaticOutput
+
+_fields = ("Temperature", "Density", "VelocityMagnitude",
+           ("deposit", "all_density"), ("deposit", "all_count")) 
+
+output_00080 = "output_00080/info_00080.txt"
+ at requires_pf(output_00080)
+def test_output_00080():
+    pf = data_dir_load(output_00080)
+    yield assert_equal, str(pf), "info_00080"
+    dso = [ None, ("sphere", ("max", (0.1, 'unitary')))]
+    for field in _fields:
+        for axis in [0, 1, 2]:
+            for ds in dso:
+                for weight_field in [None, "Density"]:
+                    yield PixelizedProjectionValuesTest(
+                        output_00080, axis, field, weight_field,
+                        ds)
+                yield FieldValuesTest(
+                        output_00080, field, ds)
+

diff -r 0db2b82b59f454b78845d24585fc723dd4db130b -r f462e06e6a772cd5277184469803c52404d1ea12 yt/frontends/sph/data_structures.py
--- a/yt/frontends/sph/data_structures.py
+++ b/yt/frontends/sph/data_structures.py
@@ -308,7 +308,7 @@
         self.hubble_constant = hvals["HubbleParam"]
         self.parameters = hvals
 
-        prefix = self.parameter_filename.split(".", 1)[0]
+        prefix = os.path.abspath(self.parameter_filename.split(".", 1)[0])
         suffix = self.parameter_filename.rsplit(".", 1)[-1]
         self.filename_template = "%s.%%(num)i.%s" % (prefix, suffix)
         self.file_count = hvals["NumFilesPerSnapshot"]

diff -r 0db2b82b59f454b78845d24585fc723dd4db130b -r f462e06e6a772cd5277184469803c52404d1ea12 yt/frontends/sph/tests/test_owls.py
--- /dev/null
+++ b/yt/frontends/sph/tests/test_owls.py
@@ -0,0 +1,61 @@
+"""
+Tipsy tests using the OWLS HDF5-Gadget dataset
+
+Author: Matthew Turk <matthewturk at gmail.com>
+Affiliation: Columbia University
+Homepage: http://yt-project.org/
+License:
+  Copyright (C) 2013 Matthew Turk.  All Rights Reserved.
+
+  This file is part of yt.
+
+  yt is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+"""
+
+from yt.testing import *
+from yt.utilities.answer_testing.framework import \
+    requires_pf, \
+    small_patch_amr, \
+    big_patch_amr, \
+    data_dir_load, \
+    PixelizedProjectionValuesTest, \
+    FieldValuesTest
+from yt.frontends.sph.api import OWLSStaticOutput
+
+_fields = (("deposit", "all_density"), ("deposit", "all_count"),
+           ("deposit", "PartType0_density"),
+           ("deposit", "PartType4_density"))
+
+os33 = "snapshot_033/snap_033.0.hdf5"
+ at requires_pf(os33)
+def test_snapshot_033():
+    pf = data_dir_load(os33)
+    yield assert_equal, str(pf), "snap_033"
+    dso = [ None, ("sphere", ("c", (0.1, 'unitary')))]
+    dd = pf.h.all_data()
+    yield assert_equal, dd["Coordinates"].shape[0], 2*(128*128*128)
+    yield assert_equal, dd["Coordinates"].shape[1], 3
+    tot = sum(dd[ptype,"Coordinates"].shape[0]
+              for ptype in pf.particle_types if ptype != "all")
+    yield assert_equal, tot, (2*128*128*128)
+    for field in _fields:
+        for axis in [0, 1, 2]:
+            for ds in dso:
+                for weight_field in [None, "Density"]:
+                    yield PixelizedProjectionValuesTest(
+                        os33, axis, field, weight_field,
+                        ds)
+                yield FieldValuesTest(
+                        os33, field, ds)
+

diff -r 0db2b82b59f454b78845d24585fc723dd4db130b -r f462e06e6a772cd5277184469803c52404d1ea12 yt/utilities/answer_testing/framework.py
--- a/yt/utilities/answer_testing/framework.py
+++ b/yt/utilities/answer_testing/framework.py
@@ -492,8 +492,9 @@
         frb[self.field]
         frb[self.weight_field]
         d = frb.data
-        d.update( dict( (("%s_sum" % f, proj[f].sum(dtype="float64"))
-                         for f in proj.field_data.keys()) ) )
+        for f in proj.field_data:
+            # Sometimes f will be a tuple.
+            d["%s_sum" % (f,)] = proj.field_data[f].sum(dtype="float64")
         return d
 
     def compare(self, new_result, old_result):

Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list