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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Oct 24 14:39:59 PDT 2014


4 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/e15f59dafcd3/
Changeset:   e15f59dafcd3
Branch:      yt
User:        ngoldbaum
Date:        2014-10-20 21:10:57+00:00
Summary:     Remove duplicated imports im yt/funcs.py
Affected #:  1 file

diff -r 2972a66a5c6e830050263882e3eca08e3f9691ac -r e15f59dafcd34384173c34d6a4da7cd4e511b1bc yt/funcs.py
--- a/yt/funcs.py
+++ b/yt/funcs.py
@@ -14,7 +14,6 @@
 #-----------------------------------------------------------------------------
 
 import time, types, signal, inspect, traceback, sys, pdb, os, re
-import time, types, signal, inspect, traceback, sys, pdb, os, re
 import contextlib
 import warnings, struct, subprocess
 import numpy as np


https://bitbucket.org/yt_analysis/yt/commits/541ef6c8fc95/
Changeset:   541ef6c8fc95
Branch:      yt
User:        ngoldbaum
Date:        2014-10-20 21:11:49+00:00
Summary:     Add a __setitem__ method to YTConfigParser.

This makes it possible to do ytcfg['yt', 'loglevel'] = '100', as an example.
Affected #:  1 file

diff -r e15f59dafcd34384173c34d6a4da7cd4e511b1bc -r 541ef6c8fc95149acb6b52d901fdac735aa2e333 yt/config.py
--- a/yt/config.py
+++ b/yt/config.py
@@ -97,6 +97,8 @@
 class YTConfigParser(ConfigParser.ConfigParser):
     def __setitem__(self, key, val):
         self.set(key[0], key[1], val)
+    def __getitem__(self, key):
+        self.get(key[0], key[1])
 
 if os.path.exists(os.path.expanduser("~/.yt/config")):
     ytcfg = YTConfigParser(ytcfg_defaults)


https://bitbucket.org/yt_analysis/yt/commits/2ed45f84cff8/
Changeset:   2ed45f84cff8
Branch:      yt
User:        ngoldbaum
Date:        2014-10-20 21:12:35+00:00
Summary:     Updating the docs on setting the log level on a per-script basis.  Closes #928.
Affected #:  1 file

diff -r 541ef6c8fc95149acb6b52d901fdac735aa2e333 -r 2ed45f84cff87f10489fa1cc705fb427c8099fce doc/source/reference/configuration.rst
--- a/doc/source/reference/configuration.rst
+++ b/doc/source/reference/configuration.rst
@@ -40,14 +40,15 @@
 
 .. code-block:: python
 
-   from yt.config import ytcfg
-   ytcfg["yt", "loglevel"] = "1"
+   import yt
+   yt.funcs.mylog.setLevel(1)
 
-   from yt.mods import *
-   ds = load("my_data0001")
+   ds = yt.load("my_data0001")
    ds.print_stats()
 
-This has the same effect as setting ``loglevel = 1`` in the configuration file.
+This has the same effect as setting ``loglevel = 1`` in the configuration
+file. Note that a log level of 1 means that all log messages are printed to
+stdout.  To disable logging, set the log level to 50.
 
 Setting Configuration On the Command Line
 -----------------------------------------


https://bitbucket.org/yt_analysis/yt/commits/9dd19b71e068/
Changeset:   9dd19b71e068
Branch:      yt
User:        chummels
Date:        2014-10-24 21:39:49+00:00
Summary:     Merged in ngoldbaum/yt (pull request #1276)

[bugfix] Two minor docs and config updates
Affected #:  3 files

diff -r 89f43c999bf661261f2ccac2571f9e966d51a481 -r 9dd19b71e068de9beb89189f61e07a60aa24969b doc/source/reference/configuration.rst
--- a/doc/source/reference/configuration.rst
+++ b/doc/source/reference/configuration.rst
@@ -40,14 +40,15 @@
 
 .. code-block:: python
 
-   from yt.config import ytcfg
-   ytcfg["yt", "loglevel"] = "1"
+   import yt
+   yt.funcs.mylog.setLevel(1)
 
-   from yt.mods import *
-   ds = load("my_data0001")
+   ds = yt.load("my_data0001")
    ds.print_stats()
 
-This has the same effect as setting ``loglevel = 1`` in the configuration file.
+This has the same effect as setting ``loglevel = 1`` in the configuration
+file. Note that a log level of 1 means that all log messages are printed to
+stdout.  To disable logging, set the log level to 50.
 
 Setting Configuration On the Command Line
 -----------------------------------------

diff -r 89f43c999bf661261f2ccac2571f9e966d51a481 -r 9dd19b71e068de9beb89189f61e07a60aa24969b yt/config.py
--- a/yt/config.py
+++ b/yt/config.py
@@ -98,6 +98,8 @@
 class YTConfigParser(ConfigParser.ConfigParser):
     def __setitem__(self, key, val):
         self.set(key[0], key[1], val)
+    def __getitem__(self, key):
+        self.get(key[0], key[1])
 
 if os.path.exists(os.path.expanduser("~/.yt/config")):
     ytcfg = YTConfigParser(ytcfg_defaults)

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