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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon May 19 06:39:29 PDT 2014


3 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/dd6f5fb62282/
Changeset:   dd6f5fb62282
Branch:      yt-3.0
User:        ngoldbaum
Date:        2014-05-19 02:15:28
Summary:     Adding a docstring for parallel_profile.
Affected #:  1 file

diff -r e36b5500ae24facd11fa6f62cfa2396e1f322633 -r dd6f5fb62282560822c20d2ec9c87a855603b78a yt/funcs.py
--- a/yt/funcs.py
+++ b/yt/funcs.py
@@ -622,6 +622,19 @@
 
 @contextlib.contextmanager
 def parallel_profile(prefix):
+    r"""A context manager for profiling parallel code execution
+
+    Parameters
+    ----------
+    prefix : string
+        A string name to prefix filenames with.
+
+    Examples
+    --------
+
+    >>> with parallel_profile('my_profile'):
+    ...     yt.PhasePlot(ds.all_data(), 'density', 'temperature', 'cell_mass')
+    """
     import cProfile
     from yt.config import ytcfg
     fn = "%s_%04i_%04i.cprof" % (prefix,


https://bitbucket.org/yt_analysis/yt/commits/9a24e54c9a7e/
Changeset:   9a24e54c9a7e
Branch:      yt-3.0
User:        ngoldbaum
Date:        2014-05-19 04:46:36
Summary:     Fixing up text.
Affected #:  1 file

diff -r dd6f5fb62282560822c20d2ec9c87a855603b78a -r 9a24e54c9a7e88edd3bd7daa155ecacdc2d90ecf yt/funcs.py
--- a/yt/funcs.py
+++ b/yt/funcs.py
@@ -622,12 +622,15 @@
 
 @contextlib.contextmanager
 def parallel_profile(prefix):
-    r"""A context manager for profiling parallel code execution
+    r"""A context manager for profiling parallel code execution using cProfile
+
+    This is a simple context manager that automatically profiles the execution
+    of a snippet of code.
 
     Parameters
     ----------
     prefix : string
-        A string name to prefix filenames with.
+        A string name to prefix outputs with.
 
     Examples
     --------


https://bitbucket.org/yt_analysis/yt/commits/7a08af110b44/
Changeset:   7a08af110b44
Branch:      yt-3.0
User:        jzuhone
Date:        2014-05-19 15:39:23
Summary:     Merged in ngoldbaum/yt/yt-3.0 (pull request #910)

Adding a docstring for parallel_profile.
Affected #:  1 file

diff -r 42232180162bb8d2c5280b874f6ba4c17e4bfe2f -r 7a08af110b448af6365b9167f0d3a9db019719aa yt/funcs.py
--- a/yt/funcs.py
+++ b/yt/funcs.py
@@ -622,6 +622,22 @@
 
 @contextlib.contextmanager
 def parallel_profile(prefix):
+    r"""A context manager for profiling parallel code execution using cProfile
+
+    This is a simple context manager that automatically profiles the execution
+    of a snippet of code.
+
+    Parameters
+    ----------
+    prefix : string
+        A string name to prefix outputs with.
+
+    Examples
+    --------
+
+    >>> with parallel_profile('my_profile'):
+    ...     yt.PhasePlot(ds.all_data(), 'density', 'temperature', 'cell_mass')
+    """
     import cProfile
     from yt.config import ytcfg
     fn = "%s_%04i_%04i.cprof" % (prefix,

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