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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Jul 22 13:27:50 PDT 2014


3 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/413a0d3964ad/
Changeset:   413a0d3964ad
Branch:      yt-3.0
User:        hegan
Date:        2014-07-22 19:18:59
Summary:     variety of bugfixes to halo catalog
Affected #:  2 files

diff -r e816afd0f0637f5a4eb1136a01309ad4875a97ce -r 413a0d3964ad241f13916783a3b3dd3572c1c532 yt/analysis_modules/halo_analysis/halo_catalog.py
--- a/yt/analysis_modules/halo_analysis/halo_catalog.py
+++ b/yt/analysis_modules/halo_analysis/halo_catalog.py
@@ -103,7 +103,6 @@
                  finder_kwargs=None,
                  output_dir="halo_catalogs/catalog"):
         ParallelAnalysisInterface.__init__(self)
-        halos_ds.index
         self.halos_ds = halos_ds
         self.data_ds = data_ds
         self.output_dir = ensure_dir(output_dir)
@@ -120,17 +119,18 @@
 
         if data_source is None:
             if halos_ds is not None:
+                halos_ds.index
                 data_source = halos_ds.all_data()
             else:
                 data_source = data_ds.all_data()
         self.data_source = data_source
 
+        if finder_kwargs is None:
+            finder_kwargs = {}
         if finder_method is not None:
             finder_method = finding_method_registry.find(finder_method,
                         **finder_kwargs)
         self.finder_method = finder_method            
-        if finder_kwargs is None:
-            finder_kwargs = {}
         
         # all of the analysis actions to be performed: callbacks, filters, and quantities
         self.actions = []
@@ -446,5 +446,5 @@
         self.add_quantity("particle_position_x", field_type=field_type,prepend=True)
         self.add_quantity("particle_position_y", field_type=field_type,prepend=True)
         self.add_quantity("particle_position_z", field_type=field_type,prepend=True)
-        self.add_quantity("virial_radius", field_type=field_type,prepend=True)
+        self.add_quantity("radius", field_type=field_type,prepend=True)
 

diff -r e816afd0f0637f5a4eb1136a01309ad4875a97ce -r 413a0d3964ad241f13916783a3b3dd3572c1c532 yt/analysis_modules/halo_analysis/halo_finding_methods.py
--- a/yt/analysis_modules/halo_analysis/halo_finding_methods.py
+++ b/yt/analysis_modules/halo_analysis/halo_finding_methods.py
@@ -98,7 +98,7 @@
     # Set up fields that we want to pull from identified halos and their units
     new_fields = ['particle_identifier', 'particle_mass', 'particle_position_x', 
         'particle_position_y','particle_position_z',
-        'virial_radius']
+        'radius']
     new_units = [ '', 'g', 'cm', 'cm','cm','cm']
 
     # Set up a dictionary based on those fields 
@@ -111,7 +111,7 @@
     for i,halo in enumerate(halo_list):
         halo_properties['particle_identifier'][0][i] = i
         halo_properties['particle_mass'][0][i] = halo.virial_mass().in_cgs()
-        halo_properties['virial_radius'][0][i] = halo.virial_radius().in_cgs()
+        halo_properties['radius'][0][i] = halo.virial_radius().in_cgs()
 
         com = halo.center_of_mass().in_cgs()
         halo_properties['particle_position_x'][0][i] = com[0]


https://bitbucket.org/yt_analysis/yt/commits/0d8cd808a998/
Changeset:   0d8cd808a998
Branch:      yt-3.0
User:        hegan
Date:        2014-07-22 19:49:14
Summary:     virial_radius is the radius field
Affected #:  3 files

diff -r 413a0d3964ad241f13916783a3b3dd3572c1c532 -r 0d8cd808a998bb095c2ab3e40c7649569d2c6ad0 yt/analysis_modules/halo_analysis/halo_catalog.py
--- a/yt/analysis_modules/halo_analysis/halo_catalog.py
+++ b/yt/analysis_modules/halo_analysis/halo_catalog.py
@@ -446,5 +446,5 @@
         self.add_quantity("particle_position_x", field_type=field_type,prepend=True)
         self.add_quantity("particle_position_y", field_type=field_type,prepend=True)
         self.add_quantity("particle_position_z", field_type=field_type,prepend=True)
-        self.add_quantity("radius", field_type=field_type,prepend=True)
+        self.add_quantity("virial_radius", field_type=field_type,prepend=True)
 

diff -r 413a0d3964ad241f13916783a3b3dd3572c1c532 -r 0d8cd808a998bb095c2ab3e40c7649569d2c6ad0 yt/analysis_modules/halo_analysis/halo_finding_methods.py
--- a/yt/analysis_modules/halo_analysis/halo_finding_methods.py
+++ b/yt/analysis_modules/halo_analysis/halo_finding_methods.py
@@ -98,7 +98,7 @@
     # Set up fields that we want to pull from identified halos and their units
     new_fields = ['particle_identifier', 'particle_mass', 'particle_position_x', 
         'particle_position_y','particle_position_z',
-        'radius']
+        'virial_radius']
     new_units = [ '', 'g', 'cm', 'cm','cm','cm']
 
     # Set up a dictionary based on those fields 
@@ -111,7 +111,7 @@
     for i,halo in enumerate(halo_list):
         halo_properties['particle_identifier'][0][i] = i
         halo_properties['particle_mass'][0][i] = halo.virial_mass().in_cgs()
-        halo_properties['radius'][0][i] = halo.virial_radius().in_cgs()
+        halo_properties['virial_radius'][0][i] = halo.virial_radius().in_cgs()
 
         com = halo.center_of_mass().in_cgs()
         halo_properties['particle_position_x'][0][i] = com[0]

diff -r 413a0d3964ad241f13916783a3b3dd3572c1c532 -r 0d8cd808a998bb095c2ab3e40c7649569d2c6ad0 yt/frontends/halo_catalogs/rockstar/definitions.py
--- a/yt/frontends/halo_catalogs/rockstar/definitions.py
+++ b/yt/frontends/halo_catalogs/rockstar/definitions.py
@@ -50,7 +50,7 @@
     ('particle_bulkvel_y', np.float32),
     ('particle_bulkvel_z', np.float32),
     ('particle_mass', np.float32),
-    ('radius', np.float32),
+    ('virial_radius', np.float32),
     ('child_r', np.float32),
     ('vmax_r', np.float32),
     ('mgrav', np.float32),


https://bitbucket.org/yt_analysis/yt/commits/ac01f1ab68ae/
Changeset:   ac01f1ab68ae
Branch:      yt-3.0
User:        hegan
Date:        2014-07-22 21:41:04
Summary:     removed broken commandline tools and updated docs accordingly
Affected #:  2 files

diff -r 0d8cd808a998bb095c2ab3e40c7649569d2c6ad0 -r ac01f1ab68ae88206b603ff8a220a09077218415 doc/source/reference/command-line.rst
--- a/doc/source/reference/command-line.rst
+++ b/doc/source/reference/command-line.rst
@@ -59,7 +59,6 @@
     help                Print help message
     bootstrap_dev       Bootstrap a yt development environment
     bugreport           Report a bug in yt
-    hop                 Run HOP on one or more datasets
     hub_register        Register a user on the Hub: http://hub.yt-project.org/
     hub_submit          Submit a mercurial repository to the yt Hub
                         (http://hub.yt-project.org/), creating a BitBucket
@@ -67,18 +66,14 @@
     instinfo            Get some information about the yt installation
     version             Get some information about the yt installation
     load                Load a single dataset into an IPython instance
-    mapserver           Serve a plot in a GMaps-style interface
     pastebin            Post a script to an anonymous pastebin
     pastebin_grab       Print an online pastebin to STDOUT for local use.
     upload_notebook     Upload an IPython notebook to hub.yt-project.org.
     plot                Create a set of images
-    render              Create a simple volume rendering
     rpdb                Connect to a currently running (on localhost) rpd
                         session. Commands run with --rpdb will trigger an rpdb
                         session with any uncaught exceptions.
     notebook            Run the IPython Notebook
-    serve               Run the Web GUI Reason
-    reason              Run the Web GUI Reason
     stats               Print stats and max/min value of a given field (if
                         requested), for one or more datasets (default field is
                         Density)
@@ -154,15 +149,6 @@
 
 Help lists all of the various command-line options in yt.
 
-bootstrap_dev
-+++++++++++++
-
-After you have installed yt and you want to do some development, there may 
-be a few more steps to complete.  This subcommand automates building a 
-development environment for you by setting up your hg preferences correctly,
-creating/linking to a bitbucket account for hosting and sharing your code, 
-and setting up a pasteboard for your code snippets.  A full description of 
-how this works can be found in :ref:`bootstrap-dev`.
 
 bugreport         
 +++++++++
@@ -174,16 +160,6 @@
 making a mistake (see :ref:`asking-for-help`), you can submit bug 
 reports using this nice utility.
 
-hop               
-+++
-
-This lets you run the HOP algorithm as a halo-finder on one or more 
-datasets.  It nominally reproduces the behavior of enzohop from the 
-enzo suite.  There are several flags you can use in order to specify
-your threshold, input names, output names, and whether you want to use 
-dark matter or all particles.  To view these flags run help with the 
-hop subcommand.
-
 hub_register and hub_submit
 +++++++++++++++++++++++++++
 
@@ -215,13 +191,6 @@
 This will start the iyt interactive environment with your specified 
 dataset already loaded.  See :ref:`interactive-prompt` for more details.
 
-mapserver
-+++++++++
-
-Ever wanted to interact with your data using the 
-`google maps <http://maps.google.com/>`_ interface?  Now you can by using the
-yt mapserver.  See :ref:`mapserver` for more details.
-
 pastebin and pastebin_grab
 ++++++++++++++++++++++++++
 
@@ -263,14 +232,6 @@
 notebooks will be viewable online, and the appropriate URLs will be returned on
 the command line.
 
-render
-++++++
-
-This command generates a volume rendering for a single dataset.  By specifying
-the center, width, number of pixels, number and thickness of contours, etc.
-(run ``yt help render`` for details),  you can create high-quality volume
-renderings at the command-line before moving on to more involved volume
-rendering scripts.
 
 rpdb
 ++++

diff -r 0d8cd808a998bb095c2ab3e40c7649569d2c6ad0 -r ac01f1ab68ae88206b603ff8a220a09077218415 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -437,221 +437,6 @@
     # Now we think we have our supplemental repository.
     return supp_path
 
-class YTBootstrapDevCmd(YTCommand):
-    name = "bootstrap_dev"
-    description = \
-        """
-        Bootstrap a yt development environment
-        """
-    def __call__(self, args):
-        from mercurial import hg, ui, commands
-        import imp
-        import getpass
-        import json
-        uu = ui.ui()
-        print
-        print "Hi there!  Welcome to the yt development bootstrap tool."
-        print
-        print "This should get you started with mercurial as well as a few"
-        print "other handy things"
-        print
-        # We have to do a couple things.
-        # First, we check that YT_DEST is set.
-        if "YT_DEST" not in os.environ:
-            print
-            print "*** You must set the environment variable YT_DEST ***"
-            print "*** to point to the installation location!        ***"
-            print
-            sys.exit(1)
-        supp_path = _get_yt_supp(uu)
-        print
-        print "I have found the yt-supplemental repository at %s" % (supp_path)
-        print
-        print "Let's load up and check what we need to do to get up and"
-        print "running."
-        print
-        print "There are three stages:"
-        print
-        print " 1. Setting up your ~/.hgrc to have a username."
-        print " 2. Setting up your bitbucket user account and the hgbb"
-        print "    extension."
-        print
-        firstname = lastname = email_address = bbusername = repo_list = None
-        # Now we try to import the cedit extension.
-        try:
-            result = imp.find_module("cedit", [supp_path])
-        except ImportError:
-            print "I was unable to find the 'cedit' module in %s" % (supp_path)
-            print "This may be due to a broken checkout."
-            print "Sorry, but I'm going to bail."
-            sys.exit(1)
-        cedit = imp.load_module("cedit", *result)
-        try:
-            result = imp.find_module("hgbb", [supp_path + "/hgbb"])
-        except ImportError:
-            print "I was unable to find the 'hgbb' module in %s" % (supp_path)
-            print "This may be due to a broken checkout."
-            print "Sorry, but I'm going to bail."
-            sys.exit(1)
-        hgbb = imp.load_module("hgbb", *result)
-        if uu.config("ui","username",None) is None:
-            print "You don't have a username specified in your ~/.hgrc."
-            print "Let's set this up.  If you would like to quit at any time,"
-            print "hit Ctrl-C."
-            print
-            firstname = raw_input("What is your first name? ")
-            lastname = raw_input("What is your last name? ")
-            email_address = raw_input("What is your email address? ")
-            print
-            print "Thanks.  I will now add a username of this form to your"
-            print "~/.hgrc file:"
-            print
-            print "    %s %s <%s>" % (firstname, lastname, email_address)
-            print
-            loki = raw_input("Press enter to go on, Ctrl-C to exit.")
-            print
-            cedit.setuser(uu, name="%s %s" % (firstname, lastname),
-                              email="%s" % (email_address),
-                              local=False, username=False)
-            print
-        else:
-            print "Looks like you already have a username!"
-            print "We'll skip that step, then."
-            print
-        print "Now we'll set up BitBucket user.  If you would like to do this"
-        print "yourself, please visit:"
-        print " https://bitbucket.org/account/signup/?plan=5_users"
-        print "for a free account."
-        print
-        loki = raw_input("Do you have a BitBucket.org user already? [yes/no]")
-        if loki.strip().upper() == "YES":
-            bbusername = raw_input("Okay, cool.  What is your username?  ").strip()
-            # Now we get information about the username.
-            if firstname is None or lastname is None:
-                rv = hgbb._bb_apicall(uu, "users/%s" % bbusername, None, False)
-                rv = json.loads(rv)
-                firstname = rv['user']["first_name"]
-                lastname = rv['user']["last_name"]
-                repo_list = rv['repositories']
-                print "Retrieved your info:"
-                print "  username:   %s" % (bbusername)
-                print "  first name: %s" % (firstname)
-                print "  last name:  %s" % (lastname)
-        elif loki.strip().upper() == "NO":
-            print "Okay, we can set you up with one.  It's probably better for"
-            print "it to be all lowercase letter."
-            print
-            bbusername = raw_input("What is your desired username? ").strip()
-            if firstname is None:
-                firstname = raw_input("What's your first name? ").strip()
-            if lastname is None:
-                lastname = raw_input("What's your last name? ").strip()
-            if email_address is None:
-                email_address = raw_input("What's your email address? ").strip()
-            print
-            print "Okay, I'll see if I can create a user with this information:"
-            print "  username:   %s" % (bbusername)
-            print "  first name: %s" % (firstname)
-            print "  last name:  %s" % (lastname)
-            print "  email:      %s" % (email_address)
-            print
-            print "Now, I'm going to ask for a password.  This password will"
-            print "be transmitted over HTTPS (not HTTP) and will not be stored"
-            print "in any local file.  But, it will be stored in memory for"
-            print "the duration of the user-creation process."
-            print
-            while 1:
-                password1 = getpass.getpass("Password? ")
-                password2 = getpass.getpass("Confirm? ")
-                if password1 == password2: break
-                print "Sorry, they didn't match!  Let's try again."
-                print
-            rv = hgbb._bb_apicall(uu, "newuser",
-                                    dict(username=bbusername,
-                                         password=password1,
-                                         email=email_address,
-                                         first_name = firstname,
-                                         last_name = lastname),
-                                   False)
-            del password1, password2
-            if str(json.loads(rv)['username']) == bbusername:
-                print "Successful!  You probably just got an email asking you"
-                print "to confirm this."
-            else:
-                print "Okay, something is wrong.  Quitting!"
-                sys.exit(1)
-        else:
-            print "Not really sure what you replied with.  Quitting!"
-            sys.exit(1)
-        # We're now going to do some modification of the hgrc.
-        # We need an hgrc first.
-        hgrc_path = [cedit.config.defaultpath("user", uu)]
-        hgrc_path = cedit.config.verifypaths(hgrc_path)
-        # Now we set up the hgbb extension
-        if uu.config("extensions","config",None) is None:
-            # cedit is a module, but hgbb is a file.  So we call dirname here.
-            cedit_path = os.path.dirname(cedit.__file__)
-            print "Now we're going to turn on the cedit extension in:"
-            print "    ", hgrc_path
-            print "This will enable you to edit your configuration from the"
-            print "command line.  Mainly, this is useful to use the command"
-            print "'addsource', which will let you add a new source to a given"
-            print "mercurial repository -- like a fork, or your own fork."
-            print
-            print "This constitutes adding the path to the cedit extension,"
-            print "which will look like this:"
-            print
-            print "   [extensions]"
-            print "   config=%s" % cedit_path
-            print
-            loki = raw_input("Press enter to go on, Ctrl-C to exit.")
-            cedit.config.setoption(uu, hgrc_path, "extensions.config=%s" % cedit_path)
-        if uu.config("extensions","hgbb",None) is None:
-            hgbb_path = hgbb.__file__
-            if hgbb_path.endswith(".pyc"): hgbb_path = hgbb_path[:-1]
-            print "Now we're going to turn on the hgbb extension in:"
-            print "    ", hgrc_path
-            print "This will enable you to access BitBucket more easily, as well"
-            print "as create repositories from the command line."
-            print
-            print "This constitutes adding the path to the hgbb extension,"
-            print "which will look like this:"
-            print
-            print "   [extensions]"
-            print "   hgbb=%s" % hgbb_path
-            print
-            loki = raw_input("Press enter to go on, Ctrl-C to exit.")
-            cedit.config.setoption(uu, hgrc_path, "extensions.hgbb=%s" % hgbb_path)
-        if uu.config("bb","username", None) is None:
-            print "We'll now set up your username for BitBucket."
-            print "We will add this:"
-            print
-            print "   [bb]"
-            print "   username = %s" % (bbusername)
-            print
-            loki = raw_input("Press enter to go on, Ctrl-C to exit.")
-            cedit.config.setoption(uu, hgrc_path, "bb.username=%s" % bbusername)
-        # We now reload the UI's config file so that it catches the [bb]
-        # section changes.
-        uu.readconfig(hgrc_path[0])
-        try:
-            import lxml
-            install_lxml = False
-        except ImportError:
-            install_lxml = True
-        if install_lxml:
-            print "You are missing the lxml package.  Installing."
-            import pip
-            rv = pip.main(["install", "lxml"])
-            if rv == 1:
-                print "Unable to install lxml.  Please report this bug to yt-users."
-                sys.exit(1)
-        print
-        print "All done!"
-        print
-        print "You're now set up to develop using Mercurial and BitBucket."
-        print
-        print "Good luck!"
 
 class YTBugreportCmd(YTCommand):
     name = "bugreport"
@@ -768,23 +553,6 @@
         print "Keep in touch!"
         print
 
-class YTHopCmd(YTCommand):
-    args = ('outputfn','bn','thresh','dm_only','skip', 'ds')
-    name = "hop"
-    description = \
-        """
-        Run HOP on one or more datasets
-
-        """
-
-    def __call__(self, args):
-        ds = args.ds
-        kwargs = {'dm_only' : args.dm_only}
-        if args.threshold is not None: kwargs['threshold'] = args.threshold
-        hop_list = HaloFinder(ds, **kwargs)
-        if args.output is None: fn = "%s.hop" % ds
-        else: fn = args.output
-        hop_list.write_out(fn)
 
 class YTHubRegisterCmd(YTCommand):
     name = "hub_register"
@@ -1138,46 +906,6 @@
             IPython.embed(config=cfg,user_ns=local_ns)
 
 
-class YTMapserverCmd(YTCommand):
-    args = ("proj", "field", "weight",
-            dict(short="-a", longname="--axis", action="store", type=int,
-                 dest="axis", default=0, help="Axis (4 for all three)"),
-            dict(short ="-o", longname="--host", action="store", type=str,
-                   dest="host", default=None, help="IP Address to bind on"),
-            "ds",
-            )
-
-    name = "mapserver"
-    description = \
-        """
-        Serve a plot in a GMaps-style interface
-
-        """
-
-    def __call__(self, args):
-        ds = args.ds
-        if args.axis == 4:
-            print "Doesn't work with multiple axes!"
-            return
-        if args.projection:
-            p = ProjectionPlot(ds, args.axis, args.field, weight_field=args.weight)
-        else:
-            p = SlicePlot(ds, args.axis, args.field)
-        from yt.gui.reason.pannable_map import PannableMapServer
-        mapper = PannableMapServer(p.data_source, args.field)
-        import yt.extern.bottle as bottle
-        bottle.debug(True)
-        if args.host is not None:
-            colonpl = args.host.find(":")
-            if colonpl >= 0:
-                port = int(args.host.split(":")[-1])
-                args.host = args.host[:colonpl]
-            else:
-                port = 8080
-            bottle.run(server='rocket', host=args.host, port=port)
-        else:
-            bottle.run(server='rocket')
-
 class YTPastebinCmd(YTCommand):
     name = "pastebin"
     args = (
@@ -1324,92 +1052,6 @@
             ensure_dir_exists(args.output)
             plt.save(os.path.join(args.output,"%s" % (ds)))
 
-class YTRenderCmd(YTCommand):
-
-    args = ("width", "unit", "center","enhance",'outputfn',
-            "field", "cmap", "contours", "viewpoint", "linear",
-            "pixels", "up", "valrange", "log","contour_width", "ds")
-    name = "render"
-    description = \
-        """
-        Create a simple volume rendering
-        """
-
-    def __call__(self, args):
-        ds = args.ds
-        center = args.center
-        if args.center == (-1,-1,-1):
-            mylog.info("No center fed in; seeking.")
-            v, center = ds.find_max("density")
-        elif args.center is None:
-            center = 0.5*(ds.domain_left_edge + ds.domain_right_edge)
-        center = np.array(center)
-
-        L = args.viewpoint
-        if L is None:
-            L = [1.]*3
-        L = np.array(args.viewpoint)
-
-        unit = args.unit
-        if unit is None:
-            unit = '1'
-        width = args.width
-        if width is None:
-            width = 0.5*(ds.domain_right_edge - ds.domain_left_edge)
-        width /= ds[unit]
-
-        N = args.pixels
-        if N is None:
-            N = 512
-
-        up = args.up
-        if up is None:
-            up = [0.,0.,1.]
-
-        field = args.field
-        if field is None:
-            field = 'density'
-
-        log = args.takelog
-        if log is None:
-            log = True
-
-        myrange = args.valrange
-        if myrange is None:
-            roi = ds.region(center, center-width, center+width)
-            mi, ma = roi.quantities['Extrema'](field)[0]
-            if log:
-                mi, ma = np.log10(mi), np.log10(ma)
-        else:
-            mi, ma = myrange[0], myrange[1]
-
-        n_contours = args.contours
-        if n_contours is None:
-            n_contours = 7
-
-        contour_width = args.contour_width
-
-        cmap = args.cmap
-        if cmap is None:
-            cmap = 'jet'
-        tf = ColorTransferFunction((mi-2, ma+2))
-        tf.add_layers(n_contours,w=contour_width,col_bounds = (mi,ma), colormap=cmap)
-
-        cam = ds.camera(center, L, width, (N,N), transfer_function=tf, fields=[field])
-        image = cam.snapshot()
-
-        if args.enhance:
-            for i in range(3):
-                image[:,:,i] = image[:,:,i]/(image[:,:,i].mean() + 5.*image[:,:,i].std())
-            image[image>1.0]=1.0
-
-        save_name = args.output
-        if save_name is None:
-            save_name = "%s"%ds+"_"+field+"_rendering.png"
-        if not '.png' in save_name:
-            save_name += '.png'
-        if cam.comm.rank != -1:
-            write_bitmap(image,save_name)
 
 class YTRPDBCmd(YTCommand):
     name = "rpdb"
@@ -1501,69 +1143,6 @@
         app.start()
 
 
-class YTGUICmd(YTCommand):
-    name = ["serve", "reason"]
-    args = (
-            dict(short="-o", longname="--open-browser", action="store_true",
-                 default = False, dest='open_browser',
-                 help="Open a web browser."),
-            dict(short="-p", longname="--port", action="store",
-                 default = 0, dest='port',
-                 help="Port to listen on"),
-            dict(short="-f", longname="--find", action="store_true",
-                 default = False, dest="find",
-                 help="At startup, find all *.hierarchy files in the CWD"),
-            dict(short="-d", longname="--debug", action="store_true",
-                 default = False, dest="debug",
-                 help="Add a debugging mode for cell execution"),
-            dict(short = "-r", longname = "--remote", action = "store_true",
-                 default = False, dest="use_pyro",
-                 help = "Use with a remote Pyro4 server."),
-            "ods"
-            )
-    description = \
-        """
-        Run the Web GUI Reason
-        """
-
-    def __call__(self, args):
-        # We have to do a couple things.
-        # First, we check that YT_DEST is set.
-        if args.port == 0:
-            # This means, choose one at random.  We do this by binding to a
-            # socket and allowing the OS to choose the port for that socket.
-            import socket
-            sock = socket.socket()
-            sock.bind(('', 0))
-            args.port = sock.getsockname()[-1]
-            del sock
-        elif args.port == '-1':
-            port = raw_input("Desired yt port? ")
-            try:
-                args.port = int(port)
-            except ValueError:
-                print "Please try a number next time."
-                return 1
-        from yt.gui.reason.utils import get_reasonjs_path
-        try:
-            reasonjs_path = get_reasonjs_path()
-        except IOError:
-            sys.exit(1)
-        from yt.config import ytcfg;ytcfg["yt","__withinreason"]="True"
-        import yt.extern.bottle as bottle
-        from yt.gui.reason.extdirect_repl import ExtDirectREPL
-        from yt.gui.reason.bottle_mods import uuid_serve_functions, PayloadHandler
-        hr = ExtDirectREPL(reasonjs_path, use_pyro=args.use_pyro)
-        hr.debug = PayloadHandler.debug = args.debug
-        command_line = ["datasets = []"]
-        if args.find:
-            # We just have to find them and store references to them.
-            for fn in sorted(glob.glob("*/*.index")):
-                command_line.append("datasets.append(load('%s'))" % fn[:-10])
-        hr.execute("\n".join(command_line))
-        bottle.debug()
-        uuid_serve_functions(open_browser=args.open_browser,
-                    port=int(args.port), repl=hr)
 
 class YTStatsCmd(YTCommand):
     args = ('outputfn','bn','skip','ds','field',

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