[yt-svn] commit/yt: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Thu Nov 15 20:44:52 PST 2012


2 new commits in yt:


https://bitbucket.org/yt_analysis/yt/changeset/cf7b6d987fa1/
changeset:   cf7b6d987fa1
branch:      yt
user:        chummels
date:        2012-11-16 05:44:33
summary:     Removing --answer-store flag in testing interface, since setting the answer-store-name automatically sets this bool to true.  Also made it so tester dies when one tries to store a dataset and compare against another dataset.
affected #:  1 file

diff -r b22a96f4172f87443ef19bc060b2725c8478cf4d -r cf7b6d987fa13bfbf96fa0952d1c37a753aa27f4 yt/utilities/answer_testing/framework.py
--- a/yt/utilities/answer_testing/framework.py
+++ b/yt/utilities/answer_testing/framework.py
@@ -29,6 +29,7 @@
 import contextlib
 import urllib2
 import cPickle
+import sys
 
 from nose.plugins import Plugin
 from yt.testing import *
@@ -54,15 +55,13 @@
     def options(self, parser, env=os.environ):
         super(AnswerTesting, self).options(parser, env=env)
         parser.add_option("--answer-compare-name", dest="compare_name", metavar='str',
-            default=_latest, help="The name against which we will compare")
+            default=_latest, help="The name of tests against which we will compare")
         parser.add_option("--answer-big-data", dest="big_data",
             default=False, help="Should we run against big data, too?",
             action="store_true")
-        parser.add_option("--answer-store-name", dest="this_name", metavar='str',
+        parser.add_option("--answer-store-name", dest="store_name", metavar='str',
             default=None,
             help="The name we'll call this set of tests")
-        parser.add_option("--answer-store", dest="store_results",
-            default=False, action="store_true")
         parser.add_option("--local-store", dest="store_local_results",
             default=False, action="store_true", help="Store/Load local results?")
 
@@ -83,8 +82,15 @@
         if not self.enabled:
             return
         disable_stream_logging()
-        if options.this_name is None: 
-            options.this_name = self.my_version
+        if options.store_name is not None:
+            self.store_results = True
+        # Making sure the user isn't trying to store and compare simultaneously
+            if options.compare_name is not None: 
+                sys.exit("You cannot store and compare simultaneously.")
+            options.compare_name = None
+        else: 
+            self.store_results = False
+            options.store_name = self.my_version
         from yt.config import ytcfg
         ytcfg["yt","__withintesting"] = "True"
         AnswerTestingTest.result_storage = \
@@ -93,8 +99,6 @@
             options.compare_name = None
         elif options.compare_name == "latest":
             options.compare_name = _latest
-        if options.store_results:
-            options.compare_name = None
             
         # Local/Cloud storage 
         if options.store_local_results:
@@ -104,20 +108,20 @@
                 options.compare_name = "%s/%s/%s" % \
                     (os.path.realpath(options.output_dir), options.compare_name, 
                      options.compare_name)
-            if options.this_name is not None:
+            if options.store_name is not None:
                 name_dir_path = "%s/%s" % \
                     (os.path.realpath(options.output_dir), 
-                    options.this_name)
+                    options.store_name)
                 if not os.path.isdir(name_dir_path):
                     os.mkdir(name_dir_path)
-                options.this_name= "%s/%s" % \
-                        (name_dir_path, options.this_name)
+                options.store_name= "%s/%s" % \
+                        (name_dir_path, options.store_name)
         else:
             storage_class = AnswerTestCloudStorage
 
         # Initialize answer/reference storage
         AnswerTestingTest.reference_storage = self.storage = \
-                storage_class(options.compare_name, options.this_name)
+                storage_class(options.compare_name, options.store_name)
 
         self.store_results = options.store_results
         self.store_local_results = options.store_local_results



https://bitbucket.org/yt_analysis/yt/changeset/9c43f0134dd1/
changeset:   9c43f0134dd1
branch:      yt
user:        chummels
date:        2012-11-16 05:44:44
summary:     merging.
affected #:  1 file

diff -r cf7b6d987fa13bfbf96fa0952d1c37a753aa27f4 -r 9c43f0134dd11071e0e30f846e8f001e9a50ab86 yt/frontends/flash/fields.py
--- a/yt/frontends/flash/fields.py
+++ b/yt/frontends/flash/fields.py
@@ -271,7 +271,7 @@
     elif pf['unitsystem'].lower() == "none":
          factor = np.sqrt(4*np.pi)
     else:
-        raise RuntimeError("Runtime parameter unitsystem with"
+        raise RuntimeError("Runtime parameter unitsystem with "
                            "value %s is unrecognized" % pf['unitsystem'])
     return factor

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