[yt-svn] commit/yt: 9 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Mar 28 04:46:11 PDT 2016
9 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/ec37f94e175c/
Changeset: ec37f94e175c
Branch: yt
User: migueldvb
Date: 2016-03-20 03:14:34+00:00
Summary: GDF answer tests
Affected #: 2 files
diff -r e870ed5eb0e897bbaf4be9da9c78dbf0e0fcdd42 -r ec37f94e175c706d3d12f0bddc36d72e5fb11bfd yt/frontends/gdf/tests/test_outputs.py
--- /dev/null
+++ b/yt/frontends/gdf/tests/test_outputs.py
@@ -0,0 +1,40 @@
+"""
+GDF frontend tests
+
+
+
+"""
+
+#-----------------------------------------------------------------------------
+# Copyright (c) 2016, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
+
+from yt.testing import \
+ assert_equal, \
+ requires_file
+from yt.utilities.answer_testing.framework import \
+ requires_ds, \
+ small_patch_amr, \
+ data_dir_load
+from yt.frontends.gdf.api import GDFDataset
+
+_fields = ("density", "velocity_x")
+
+wt = "sedov/sedov_tst_0004.h5"
+
+ at requires_ds(wt)
+def test_sedov_tunnel():
+ ds = data_dir_load(wt)
+ yield assert_equal, str(ds), "sedov_tst_0004"
+ for test in small_patch_amr(ds, _fields):
+ test_sedov_tunnel.__name__ = test.description
+ yield test
+
+
+ at requires_file(wt)
+def test_GDFDataset():
+ assert isinstance(data_dir_load(wt), GDFDataset)
https://bitbucket.org/yt_analysis/yt/commits/1e88534b818b/
Changeset: 1e88534b818b
Branch: yt
User: migueldvb
Date: 2016-03-20 04:02:23+00:00
Summary: Prepend test_data_dir path to datafiles in GDF IOHandler
Affected #: 1 file
diff -r ec37f94e175c706d3d12f0bddc36d72e5fb11bfd -r 1e88534b818b15fa34c193a05ac266458c946dd8 yt/frontends/gdf/io.py
--- a/yt/frontends/gdf/io.py
+++ b/yt/frontends/gdf/io.py
@@ -13,8 +13,10 @@
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
+import os
import numpy as np
from yt.utilities.on_demand_imports import _h5py as h5py
+from yt.config import ytcfg
from yt.funcs import \
mylog
from yt.utilities.io_handler import \
@@ -44,7 +46,8 @@
if not (len(chunks) == len(chunks[0].objs) == 1):
raise RuntimeError
grid = chunks[0].objs[0]
- h5f = h5py.File(grid.filename, 'r')
+ data_dir = ytcfg.get("yt","test_data_dir")
+ h5f = h5py.File(os.path.join(data_dir, grid.filename), 'r')
gds = h5f.get(_grid_dname(grid.id))
for ftype, fname in fields:
if self.ds.field_ordering == 1:
https://bitbucket.org/yt_analysis/yt/commits/cebb14a41a23/
Changeset: cebb14a41a23
Branch: yt
User: migueldvb
Date: 2016-03-20 04:07:43+00:00
Summary: Correct path to file in calls to h5f.open function
Affected #: 1 file
diff -r 1e88534b818b15fa34c193a05ac266458c946dd8 -r cebb14a41a23d0b79c82bf0a76f8c26d90882172 yt/frontends/gdf/io.py
--- a/yt/frontends/gdf/io.py
+++ b/yt/frontends/gdf/io.py
@@ -41,12 +41,12 @@
from sys import version
rv = {}
chunks = list(chunks)
+ data_dir = ytcfg.get("yt", "test_data_dir")
if selector.__class__.__name__ == "GridSelector":
if not (len(chunks) == len(chunks[0].objs) == 1):
raise RuntimeError
grid = chunks[0].objs[0]
- data_dir = ytcfg.get("yt","test_data_dir")
h5f = h5py.File(os.path.join(data_dir, grid.filename), 'r')
gds = h5f.get(_grid_dname(grid.id))
for ftype, fname in fields:
@@ -78,10 +78,11 @@
if grid.filename is None:
continue
if fid is None:
+ _filename = os.path.join(data_dir, grid.filename)
if version < '3':
- fid = h5py.h5f.open(grid.filename,h5py.h5f.ACC_RDONLY)
+ fid = h5py.h5f.open(_filename,h5py.h5f.ACC_RDONLY)
else:
- fid = h5py.h5f.open(bytes(grid.filename,'utf-8'),h5py.h5f.ACC_RDONLY)
+ fid = h5py.h5f.open(bytes(_filename,'utf-8'),h5py.h5f.ACC_RDONLY)
if self.ds.field_ordering == 1:
# check the dtype instead
data = np.empty(grid.ActiveDimensions[::-1],
https://bitbucket.org/yt_analysis/yt/commits/fd308dd53fdf/
Changeset: fd308dd53fdf
Branch: yt
User: migueldvb
Date: 2016-03-20 23:00:50+00:00
Summary: Revert "Correct path to file in calls to h5f.open function"
This reverts commit c3f0f25384e6a68b7d1c3af0a44a31e2a65d5c52.
Affected #: 1 file
diff -r cebb14a41a23d0b79c82bf0a76f8c26d90882172 -r fd308dd53fdfc89bf9dad7f173be1caeed20c7dc yt/frontends/gdf/io.py
--- a/yt/frontends/gdf/io.py
+++ b/yt/frontends/gdf/io.py
@@ -41,12 +41,12 @@
from sys import version
rv = {}
chunks = list(chunks)
- data_dir = ytcfg.get("yt", "test_data_dir")
if selector.__class__.__name__ == "GridSelector":
if not (len(chunks) == len(chunks[0].objs) == 1):
raise RuntimeError
grid = chunks[0].objs[0]
+ data_dir = ytcfg.get("yt","test_data_dir")
h5f = h5py.File(os.path.join(data_dir, grid.filename), 'r')
gds = h5f.get(_grid_dname(grid.id))
for ftype, fname in fields:
@@ -78,11 +78,10 @@
if grid.filename is None:
continue
if fid is None:
- _filename = os.path.join(data_dir, grid.filename)
if version < '3':
- fid = h5py.h5f.open(_filename,h5py.h5f.ACC_RDONLY)
+ fid = h5py.h5f.open(grid.filename,h5py.h5f.ACC_RDONLY)
else:
- fid = h5py.h5f.open(bytes(_filename,'utf-8'),h5py.h5f.ACC_RDONLY)
+ fid = h5py.h5f.open(bytes(grid.filename,'utf-8'),h5py.h5f.ACC_RDONLY)
if self.ds.field_ordering == 1:
# check the dtype instead
data = np.empty(grid.ActiveDimensions[::-1],
https://bitbucket.org/yt_analysis/yt/commits/69f15c5505e8/
Changeset: 69f15c5505e8
Branch: yt
User: migueldvb
Date: 2016-03-20 23:01:08+00:00
Summary: Revert "Prepend test_data_dir path to datafiles in GDF IOHandler"
This reverts commit fdb0e4ee2fc5aa3389dd23e2b6c1f5bddb492a70.
Affected #: 1 file
diff -r fd308dd53fdfc89bf9dad7f173be1caeed20c7dc -r 69f15c5505e865c355a3a1dc133724f9713a69b8 yt/frontends/gdf/io.py
--- a/yt/frontends/gdf/io.py
+++ b/yt/frontends/gdf/io.py
@@ -13,10 +13,8 @@
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
-import os
import numpy as np
from yt.utilities.on_demand_imports import _h5py as h5py
-from yt.config import ytcfg
from yt.funcs import \
mylog
from yt.utilities.io_handler import \
@@ -46,8 +44,7 @@
if not (len(chunks) == len(chunks[0].objs) == 1):
raise RuntimeError
grid = chunks[0].objs[0]
- data_dir = ytcfg.get("yt","test_data_dir")
- h5f = h5py.File(os.path.join(data_dir, grid.filename), 'r')
+ h5f = h5py.File(grid.filename, 'r')
gds = h5f.get(_grid_dname(grid.id))
for ftype, fname in fields:
if self.ds.field_ordering == 1:
https://bitbucket.org/yt_analysis/yt/commits/9d2a3fe0bd9a/
Changeset: 9d2a3fe0bd9a
Branch: yt
User: migueldvb
Date: 2016-03-22 15:53:38+00:00
Summary: Add units_override test for GDF frontend
Affected #: 1 file
diff -r 69f15c5505e865c355a3a1dc133724f9713a69b8 -r 9d2a3fe0bd9a87c60c8e5bedb6e9ccd0f81ceee5 yt/frontends/gdf/tests/test_outputs.py
--- a/yt/frontends/gdf/tests/test_outputs.py
+++ b/yt/frontends/gdf/tests/test_outputs.py
@@ -15,7 +15,8 @@
from yt.testing import \
assert_equal, \
- requires_file
+ requires_file, \
+ units_override_check
from yt.utilities.answer_testing.framework import \
requires_ds, \
small_patch_amr, \
@@ -24,17 +25,23 @@
_fields = ("density", "velocity_x")
-wt = "sedov/sedov_tst_0004.h5"
+sedov = "sedov/sedov_tst_0004.h5"
- at requires_ds(wt)
+ at requires_ds(sedov)
def test_sedov_tunnel():
- ds = data_dir_load(wt)
+ ds = data_dir_load(sedov)
yield assert_equal, str(ds), "sedov_tst_0004"
for test in small_patch_amr(ds, _fields):
test_sedov_tunnel.__name__ = test.description
yield test
- at requires_file(wt)
+ at requires_file(sedov)
def test_GDFDataset():
- assert isinstance(data_dir_load(wt), GDFDataset)
+ assert isinstance(data_dir_load(sedov), GDFDataset)
+
+
+ at requires_file(sedov)
+def test_units_override():
+ for test in units_override_check(sedov):
+ yield test
https://bitbucket.org/yt_analysis/yt/commits/ff85191ef75c/
Changeset: ff85191ef75c
Branch: yt
User: migueldvb
Date: 2016-03-22 16:00:31+00:00
Summary: Update code support docs
Affected #: 1 file
diff -r 9d2a3fe0bd9a87c60c8e5bedb6e9ccd0f81ceee5 -r ff85191ef75c6a89101c08a047a5478850ffbf10 doc/source/reference/code_support.rst
--- a/doc/source/reference/code_support.rst
+++ b/doc/source/reference/code_support.rst
@@ -36,7 +36,7 @@
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
| Gasoline | Y | Y | Y | Y | Y [#f2]_ | Y | Y | Full |
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
-| Grid Data Format (GDF)| Y | N/A | Y | Y | Y | Y | N | Full |
+| Grid Data Format (GDF)| Y | N/A | Y | Y | Y | Y | Y | Full |
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
| Maestro | Y [#f1]_ | N | Y | Y | Y | Y | N | Partial |
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
@@ -48,7 +48,7 @@
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
| OWLS/EAGLE | Y | Y | Y | Y | Y [#f2]_ | Y | Y | Full |
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
-| Piernik | Y | N/A | Y | Y | Y | Y | N | Full |
+| Piernik | Y | N/A | Y | Y | Y | Y | Y | Full |
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
| Pluto | Y | N | Y | Y | Y | Y | Y | Partial |
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
https://bitbucket.org/yt_analysis/yt/commits/8dfc3dc88221/
Changeset: 8dfc3dc88221
Branch: yt
User: migueldvb
Date: 2016-03-22 16:53:47+00:00
Summary: Add gdf answer tests to yaml 2.7 file
Affected #: 1 file
diff -r ff85191ef75c6a89101c08a047a5478850ffbf10 -r 8dfc3dc88221844dd443f2c0d16e4b25ec5ca0a9 tests/tests_2.7.yaml
--- a/tests/tests_2.7.yaml
+++ b/tests/tests_2.7.yaml
@@ -20,6 +20,9 @@
local_gadget_270:
- yt/frontends/gadget/tests/test_outputs.py
+ local_gdf_270:
+ - yt/frontends/gdf/tests/test_outputs.py
+
local_halos_270:
- yt/analysis_modules/halo_analysis/tests/test_halo_finders.py
- yt/analysis_modules/halo_finding/tests/test_rockstar.py
https://bitbucket.org/yt_analysis/yt/commits/fbf09b0618e0/
Changeset: fbf09b0618e0
Branch: yt
User: xarthisius
Date: 2016-03-28 11:45:57+00:00
Summary: Merged in migueldvb/yt (pull request #2055)
GDF answer tests
Affected #: 5 files
diff -r bba3843608189ecf29b8ad109ae02546bbd272af -r fbf09b0618e08deb4f675c82b61e816d8f17156a doc/source/reference/code_support.rst
--- a/doc/source/reference/code_support.rst
+++ b/doc/source/reference/code_support.rst
@@ -36,7 +36,7 @@
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
| Gasoline | Y | Y | Y | Y | Y [#f2]_ | Y | Y | Full |
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
-| Grid Data Format (GDF)| Y | N/A | Y | Y | Y | Y | N | Full |
+| Grid Data Format (GDF)| Y | N/A | Y | Y | Y | Y | Y | Full |
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
| Maestro | Y [#f1]_ | N | Y | Y | Y | Y | N | Partial |
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
@@ -48,7 +48,7 @@
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
| OWLS/EAGLE | Y | Y | Y | Y | Y [#f2]_ | Y | Y | Full |
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
-| Piernik | Y | N/A | Y | Y | Y | Y | N | Full |
+| Piernik | Y | N/A | Y | Y | Y | Y | Y | Full |
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
| Pluto | Y | N | Y | Y | Y | Y | Y | Partial |
+-----------------------+------------+-----------+------------+-------+----------+----------+------------+----------+
diff -r bba3843608189ecf29b8ad109ae02546bbd272af -r fbf09b0618e08deb4f675c82b61e816d8f17156a tests/tests_2.7.yaml
--- a/tests/tests_2.7.yaml
+++ b/tests/tests_2.7.yaml
@@ -20,6 +20,9 @@
local_gadget_270:
- yt/frontends/gadget/tests/test_outputs.py
+ local_gdf_270:
+ - yt/frontends/gdf/tests/test_outputs.py
+
local_halos_270:
- yt/analysis_modules/halo_analysis/tests/test_halo_finders.py
- yt/analysis_modules/halo_finding/tests/test_rockstar.py
diff -r bba3843608189ecf29b8ad109ae02546bbd272af -r fbf09b0618e08deb4f675c82b61e816d8f17156a yt/frontends/gdf/tests/test_outputs.py
--- /dev/null
+++ b/yt/frontends/gdf/tests/test_outputs.py
@@ -0,0 +1,47 @@
+"""
+GDF frontend tests
+
+
+
+"""
+
+#-----------------------------------------------------------------------------
+# Copyright (c) 2016, yt Development Team.
+#
+# Distributed under the terms of the Modified BSD License.
+#
+# The full license is in the file COPYING.txt, distributed with this software.
+#-----------------------------------------------------------------------------
+
+from yt.testing import \
+ assert_equal, \
+ requires_file, \
+ units_override_check
+from yt.utilities.answer_testing.framework import \
+ requires_ds, \
+ small_patch_amr, \
+ data_dir_load
+from yt.frontends.gdf.api import GDFDataset
+
+_fields = ("density", "velocity_x")
+
+sedov = "sedov/sedov_tst_0004.h5"
+
+ at requires_ds(sedov)
+def test_sedov_tunnel():
+ ds = data_dir_load(sedov)
+ yield assert_equal, str(ds), "sedov_tst_0004"
+ for test in small_patch_amr(ds, _fields):
+ test_sedov_tunnel.__name__ = test.description
+ yield test
+
+
+ at requires_file(sedov)
+def test_GDFDataset():
+ assert isinstance(data_dir_load(sedov), GDFDataset)
+
+
+ at requires_file(sedov)
+def test_units_override():
+ for test in units_override_check(sedov):
+ yield test
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-svn-spacepope.org/attachments/20160328/bd5152d6/attachment.html>
More information about the yt-svn
mailing list