[yt-svn] commit/yt: 3 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Jun 14 04:49:33 PDT 2013
3 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/6a553070a5c2/
Changeset: 6a553070a5c2
Branch: yt
User: Andrew Myers
Date: 2013-06-13 20:39:37
Summary: patching the RadMC3D exporter to work even if pf.h.grids are not already in order by level
Affected #: 1 file
diff -r 7d765411da341fa45519ecb3ab788d3701246eb7 -r 6a553070a5c20363b88148de7ee20bbe0d796fed yt/analysis_modules/radmc3d_export/RadMC3DInterface.py
--- a/yt/analysis_modules/radmc3d_export/RadMC3DInterface.py
+++ b/yt/analysis_modules/radmc3d_export/RadMC3DInterface.py
@@ -158,7 +158,8 @@
self.layers.append(base_layer)
self.cell_count += np.product(pf.domain_dimensions)
- for grid in pf.h.grids:
+ sorted_grids = sorted(pf.h.grids, key=lambda x: x.Level)
+ for grid in sorted_grids:
if grid.Level <= self.max_level:
self._add_grid_to_layers(grid)
@@ -232,11 +233,11 @@
if p == 0:
ind = (layer.LeftEdge - LE) / (2.0*dds) + 1
else:
- LE = np.zeros(3)
+ parent_LE = np.zeros(3)
for potential_parent in self.layers:
if potential_parent.id == p:
- LE = potential_parent.LeftEdge
- ind = (layer.LeftEdge - LE) / (2.0*dds) + 1
+ parent_LE = potential_parent.LeftEdge
+ ind = (layer.LeftEdge - parent_LE) / (2.0*dds) + 1
ix = int(ind[0]+0.5)
iy = int(ind[1]+0.5)
iz = int(ind[2]+0.5)
https://bitbucket.org/yt_analysis/yt/commits/3ab6b834fa3a/
Changeset: 3ab6b834fa3a
Branch: yt
User: atmyers
Date: 2013-06-13 20:40:24
Summary: Merged yt_analysis/yt into yt
Affected #: 9 files
diff -r 6a553070a5c20363b88148de7ee20bbe0d796fed -r 3ab6b834fa3af6f84fbee8e3bed1db517f0a2c62 yt/__init__.py
--- a/yt/__init__.py
+++ b/yt/__init__.py
@@ -83,3 +83,26 @@
"""
__version__ = "2.5-dev"
+
+def run_nose(verbose=False, run_answer_tests=False, answer_big_data=False):
+ import nose, os, sys
+ from yt.config import ytcfg
+ nose_argv = sys.argv
+ nose_argv += ['--exclude=answer_testing','--detailed-errors']
+ if verbose:
+ nose_argv.append('-v')
+ if run_answer_tests:
+ nose_argv.append('--with-answer-testing')
+ if answer_big_data:
+ nose_argv.append('--answer-big-data')
+ log_suppress = ytcfg.getboolean("yt","suppressStreamLogging")
+ ytcfg["yt","suppressStreamLogging"] = 'True'
+ initial_dir = os.getcwd()
+ yt_file = os.path.abspath(__file__)
+ yt_dir = os.path.dirname(yt_file)
+ os.chdir(yt_dir)
+ try:
+ nose.run(argv=nose_argv)
+ finally:
+ os.chdir(initial_dir)
+ ytcfg["yt","suppressStreamLogging"] = log_suppress
diff -r 6a553070a5c20363b88148de7ee20bbe0d796fed -r 3ab6b834fa3af6f84fbee8e3bed1db517f0a2c62 yt/data_objects/setup.py
--- a/yt/data_objects/setup.py
+++ b/yt/data_objects/setup.py
@@ -9,5 +9,6 @@
from numpy.distutils.misc_util import Configuration
config = Configuration('data_objects', parent_package, top_path)
config.make_config_py() # installs __config__.py
+ config.add_subpackage("tests")
#config.make_svn_version_py()
return config
diff -r 6a553070a5c20363b88148de7ee20bbe0d796fed -r 3ab6b834fa3af6f84fbee8e3bed1db517f0a2c62 yt/frontends/setup.py
--- a/yt/frontends/setup.py
+++ b/yt/frontends/setup.py
@@ -21,4 +21,9 @@
config.add_subpackage("castro")
config.add_subpackage("stream")
config.add_subpackage("pluto")
+ config.add_subpackage("flash/tests")
+ config.add_subpackage("enzo/tests")
+ config.add_subpackage("orion/tests")
+ config.add_subpackage("stream/tests")
+ config.add_subpackage("chombo/tests")
return config
diff -r 6a553070a5c20363b88148de7ee20bbe0d796fed -r 3ab6b834fa3af6f84fbee8e3bed1db517f0a2c62 yt/utilities/grid_data_format/setup.py
--- a/yt/utilities/grid_data_format/setup.py
+++ b/yt/utilities/grid_data_format/setup.py
@@ -9,6 +9,7 @@
from numpy.distutils.misc_util import Configuration
config = Configuration('grid_data_format', parent_package, top_path)
config.add_subpackage("conversion")
+ config.add_subpackage("tests")
config.make_config_py() # installs __config__.py
#config.make_svn_version_py()
return config
diff -r 6a553070a5c20363b88148de7ee20bbe0d796fed -r 3ab6b834fa3af6f84fbee8e3bed1db517f0a2c62 yt/utilities/lib/setup.py
--- a/yt/utilities/lib/setup.py
+++ b/yt/utilities/lib/setup.py
@@ -249,6 +249,7 @@
config.add_extension("GridTree",
["yt/utilities/lib/GridTree.pyx"],
libraries=["m"], depends=["yt/utilities/lib/fp_utils.pxd"])
+ config.add_subpackage("tests")
if os.environ.get("GPERFTOOLS", "no").upper() != "NO":
gpd = os.environ["GPERFTOOLS"]
diff -r 6a553070a5c20363b88148de7ee20bbe0d796fed -r 3ab6b834fa3af6f84fbee8e3bed1db517f0a2c62 yt/utilities/parallel_tools/task_queue.py
--- a/yt/utilities/parallel_tools/task_queue.py
+++ b/yt/utilities/parallel_tools/task_queue.py
@@ -133,14 +133,14 @@
comm = _get_comm(())
if not parallel_capable:
mylog.error("Cannot create task queue for serial process.")
- raise RunTimeError
+ raise RuntimeError
my_size = comm.comm.size
if njobs <= 0:
njobs = my_size - 1
if njobs >= my_size:
mylog.error("You have asked for %s jobs, but only %s processors are available.",
njobs, (my_size - 1))
- raise RunTimeError
+ raise RuntimeError
my_rank = comm.rank
all_new_comms = np.array_split(np.arange(1, my_size), njobs)
all_new_comms.insert(0, np.array([0]))
@@ -161,14 +161,14 @@
comm = _get_comm(())
if not parallel_capable:
mylog.error("Cannot create task queue for serial process.")
- raise RunTimeError
+ raise RuntimeError
my_size = comm.comm.size
if njobs <= 0:
njobs = my_size - 1
if njobs >= my_size:
mylog.error("You have asked for %s jobs, but only %s processors are available.",
njobs, (my_size - 1))
- raise RunTimeError
+ raise RuntimeError
my_rank = comm.rank
all_new_comms = np.array_split(np.arange(1, my_size), njobs)
all_new_comms.insert(0, np.array([0]))
diff -r 6a553070a5c20363b88148de7ee20bbe0d796fed -r 3ab6b834fa3af6f84fbee8e3bed1db517f0a2c62 yt/utilities/setup.py
--- a/yt/utilities/setup.py
+++ b/yt/utilities/setup.py
@@ -56,6 +56,7 @@
config.add_subpackage("lib")
config.add_extension("data_point_utilities",
"yt/utilities/data_point_utilities.c", libraries=["m"])
+ config.add_subpackage("tests")
hdf5_inc, hdf5_lib = check_for_hdf5()
include_dirs = [hdf5_inc]
library_dirs = [hdf5_lib]
diff -r 6a553070a5c20363b88148de7ee20bbe0d796fed -r 3ab6b834fa3af6f84fbee8e3bed1db517f0a2c62 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -717,7 +717,7 @@
cbname = callback_registry[key]._type_name
CallbackMaker = callback_registry[key]
callback = invalidate_plot(apply_callback(CallbackMaker))
- callback.__doc__ = CallbackMaker.__init__.__doc__
+ callback.__doc__ = CallbackMaker.__doc__
self.__dict__['annotate_'+cbname] = types.MethodType(callback,self)
@invalidate_plot
diff -r 6a553070a5c20363b88148de7ee20bbe0d796fed -r 3ab6b834fa3af6f84fbee8e3bed1db517f0a2c62 yt/visualization/setup.py
--- a/yt/visualization/setup.py
+++ b/yt/visualization/setup.py
@@ -7,6 +7,7 @@
config = Configuration('visualization', parent_package, top_path)
config.add_subpackage("image_panner")
config.add_subpackage("volume_rendering")
+ config.add_subpackage("tests")
config.make_config_py() # installs __config__.py
#config.make_svn_version_py()
config.add_extension("_MPL", "_MPL.c", libraries=["m"])
https://bitbucket.org/yt_analysis/yt/commits/c23cd3cde4a4/
Changeset: c23cd3cde4a4
Branch: yt
User: MatthewTurk
Date: 2013-06-14 13:49:26
Summary: Merged in atmyers/yt-clean (pull request #529)
Patching the RadMC3D export code
Affected #: 1 file
diff -r 252591eeb6a2c0014ddb3a87adb04acf7eeefa97 -r c23cd3cde4a41d7eae1e0ca657729acfc1c947d1 yt/analysis_modules/radmc3d_export/RadMC3DInterface.py
--- a/yt/analysis_modules/radmc3d_export/RadMC3DInterface.py
+++ b/yt/analysis_modules/radmc3d_export/RadMC3DInterface.py
@@ -158,7 +158,8 @@
self.layers.append(base_layer)
self.cell_count += np.product(pf.domain_dimensions)
- for grid in pf.h.grids:
+ sorted_grids = sorted(pf.h.grids, key=lambda x: x.Level)
+ for grid in sorted_grids:
if grid.Level <= self.max_level:
self._add_grid_to_layers(grid)
@@ -232,11 +233,11 @@
if p == 0:
ind = (layer.LeftEdge - LE) / (2.0*dds) + 1
else:
- LE = np.zeros(3)
+ parent_LE = np.zeros(3)
for potential_parent in self.layers:
if potential_parent.id == p:
- LE = potential_parent.LeftEdge
- ind = (layer.LeftEdge - LE) / (2.0*dds) + 1
+ parent_LE = potential_parent.LeftEdge
+ ind = (layer.LeftEdge - parent_LE) / (2.0*dds) + 1
ix = int(ind[0]+0.5)
iy = int(ind[1]+0.5)
iz = int(ind[2]+0.5)
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
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