[yt-svn] commit/yt: 5 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Sun Mar 23 21:42:41 PDT 2014
5 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/1e9d46dad91a/
Changeset: 1e9d46dad91a
Branch: yt-3.0
User: MatthewTurk
Date: 2014-03-24 00:33:28
Summary: Adding a _show_field_errors variable.
Affected #: 1 file
diff -r 4646247054fb995eb10d56ea41af868479098bdb -r 1e9d46dad91a659cd47c18bea9d938e6a13b0c59 yt/fields/field_info_container.py
--- a/yt/fields/field_info_container.py
+++ b/yt/fields/field_info_container.py
@@ -42,6 +42,8 @@
standard_particle_fields, \
add_volume_weighted_smoothed_field
+_show_field_errors = []
+
class FieldInfoContainer(dict):
"""
This is a generic field container. It contains a list of potential derived
@@ -309,6 +311,8 @@
try:
fd = fi.get_dependencies(pf = self.pf)
except Exception as e:
+ if field in _show_field_errors:
+ raise
if type(e) != YTFieldNotFound:
mylog.debug("Raises %s during field %s detection.",
str(type(e)), field)
https://bitbucket.org/yt_analysis/yt/commits/859a451be182/
Changeset: 859a451be182
Branch: yt-3.0
User: MatthewTurk
Date: 2014-03-24 01:00:10
Summary: Fixing a bug in the field detection.
Affected #: 1 file
diff -r 1e9d46dad91a659cd47c18bea9d938e6a13b0c59 -r 859a451be182b8dcfade7bdbd651c24825e268bb yt/fields/field_detector.py
--- a/yt/fields/field_detector.py
+++ b/yt/fields/field_detector.py
@@ -128,7 +128,9 @@
return self[item]
elif finfo is not None and finfo.particle_type:
if "particle_position" in (item, item[1]) or \
- "particle_velocity" in (item, item[1]):
+ "particle_velocity" in (item, item[1]) or \
+ "Velocity" in (item, item[1]) or \
+ "Coordinates" in (item, item[1]):
# A vector
self[item] = \
YTArray(np.ones((self.NumberOfParticles, 3)),
https://bitbucket.org/yt_analysis/yt/commits/d657dc56dcd8/
Changeset: d657dc56dcd8
Branch: yt-3.0
User: MatthewTurk
Date: 2014-03-24 01:52:11
Summary: All locally added fields now throw their errors.
Affected #: 1 file
diff -r 859a451be182b8dcfade7bdbd651c24825e268bb -r d657dc56dcd898681e6d7afa496ab4ac35965af5 yt/fields/local_fields.py
--- a/yt/fields/local_fields.py
+++ b/yt/fields/local_fields.py
@@ -18,7 +18,9 @@
from .field_plugin_registry import \
register_field_plugin
-from .field_info_container import FieldInfoContainer
+from .field_info_container import \
+ FieldInfoContainer, \
+ _show_field_errors
# Empty FieldInfoContainer
local_fields = FieldInfoContainer(None, [], None)
@@ -31,4 +33,6 @@
# info container, and since they are not mutable in any real way, we are
# fine.
# Note that we actually don't care about the ftype here.
+ for f in local_fields:
+ _show_field_errors.append(f)
registry.update(local_fields)
https://bitbucket.org/yt_analysis/yt/commits/31feb73fe39d/
Changeset: 31feb73fe39d
Branch: yt-3.0
User: MatthewTurk
Date: 2014-03-24 01:57:51
Summary: Move _show_field_errors to class-level.
Affected #: 2 files
diff -r d657dc56dcd898681e6d7afa496ab4ac35965af5 -r 31feb73fe39d3c7080b4db01e38258be79e44355 yt/fields/field_info_container.py
--- a/yt/fields/field_info_container.py
+++ b/yt/fields/field_info_container.py
@@ -42,8 +42,6 @@
standard_particle_fields, \
add_volume_weighted_smoothed_field
-_show_field_errors = []
-
class FieldInfoContainer(dict):
"""
This is a generic field container. It contains a list of potential derived
@@ -57,6 +55,7 @@
known_particle_fields = ()
def __init__(self, pf, field_list, slice_info = None):
+ self._show_field_errors = []
self.pf = pf
# Now we start setting things up.
self.field_list = field_list
@@ -311,7 +310,7 @@
try:
fd = fi.get_dependencies(pf = self.pf)
except Exception as e:
- if field in _show_field_errors:
+ if field in self._show_field_errors:
raise
if type(e) != YTFieldNotFound:
mylog.debug("Raises %s during field %s detection.",
diff -r d657dc56dcd898681e6d7afa496ab4ac35965af5 -r 31feb73fe39d3c7080b4db01e38258be79e44355 yt/fields/local_fields.py
--- a/yt/fields/local_fields.py
+++ b/yt/fields/local_fields.py
@@ -19,8 +19,7 @@
register_field_plugin
from .field_info_container import \
- FieldInfoContainer, \
- _show_field_errors
+ FieldInfoContainer
# Empty FieldInfoContainer
local_fields = FieldInfoContainer(None, [], None)
@@ -34,5 +33,5 @@
# fine.
# Note that we actually don't care about the ftype here.
for f in local_fields:
- _show_field_errors.append(f)
+ registry._show_field_errors.append(f)
registry.update(local_fields)
https://bitbucket.org/yt_analysis/yt/commits/8165508993d6/
Changeset: 8165508993d6
Branch: yt-3.0
User: ngoldbaum
Date: 2014-03-24 05:42:34
Summary: Merged in MatthewTurk/yt/yt-3.0 (pull request #746)
Adding niceties for field detection
Affected #: 3 files
diff -r 429c90c927167ac77c26af8b185b8a9d8c3c9bcc -r 8165508993d62455bb511360d40208f78c3a5a82 yt/fields/field_detector.py
--- a/yt/fields/field_detector.py
+++ b/yt/fields/field_detector.py
@@ -128,7 +128,9 @@
return self[item]
elif finfo is not None and finfo.particle_type:
if "particle_position" in (item, item[1]) or \
- "particle_velocity" in (item, item[1]):
+ "particle_velocity" in (item, item[1]) or \
+ "Velocity" in (item, item[1]) or \
+ "Coordinates" in (item, item[1]):
# A vector
self[item] = \
YTArray(np.ones((self.NumberOfParticles, 3)),
diff -r 429c90c927167ac77c26af8b185b8a9d8c3c9bcc -r 8165508993d62455bb511360d40208f78c3a5a82 yt/fields/field_info_container.py
--- a/yt/fields/field_info_container.py
+++ b/yt/fields/field_info_container.py
@@ -55,6 +55,7 @@
known_particle_fields = ()
def __init__(self, pf, field_list, slice_info = None):
+ self._show_field_errors = []
self.pf = pf
# Now we start setting things up.
self.field_list = field_list
@@ -309,6 +310,8 @@
try:
fd = fi.get_dependencies(pf = self.pf)
except Exception as e:
+ if field in self._show_field_errors:
+ raise
if type(e) != YTFieldNotFound:
mylog.debug("Raises %s during field %s detection.",
str(type(e)), field)
diff -r 429c90c927167ac77c26af8b185b8a9d8c3c9bcc -r 8165508993d62455bb511360d40208f78c3a5a82 yt/fields/local_fields.py
--- a/yt/fields/local_fields.py
+++ b/yt/fields/local_fields.py
@@ -18,7 +18,8 @@
from .field_plugin_registry import \
register_field_plugin
-from .field_info_container import FieldInfoContainer
+from .field_info_container import \
+ FieldInfoContainer
# Empty FieldInfoContainer
local_fields = FieldInfoContainer(None, [], None)
@@ -31,4 +32,6 @@
# info container, and since they are not mutable in any real way, we are
# fine.
# Note that we actually don't care about the ftype here.
+ for f in local_fields:
+ registry._show_field_errors.append(f)
registry.update(local_fields)
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