Matthew Turk avatar Matthew Turk committed 1ba6fe4

Updating to match current yt version and API; adding new profiler test.

Comments (0)

Files changed (2)

profile_support.py

 def get_version_string():
     yt_provider = pkg_resources.get_provider("yt")
     path = os.path.dirname(yt_provider.module_path)
-    vc_type = cl._get_vcs_type(path)
-    vstring = cl._vcs_identifier[vc_type](path)
+    vstring = cl._get_hg_version(path)
     my_version = vstring.replace("(", "").replace(")","").replace(" ", "_").strip()
     return my_version
 
     proj = pf.h.proj(0, "VelocityMagnitude", "Density")
 
 @profile_test
+def projection_divv(pf):
+    proj = pf.h.proj(0, "DivV", "Density")
+
+@profile_test
 def quantities_extrema(pf):
     dd = pf.h.all_data()
     ex = dd.quantities["Extrema"](["Density", "Temperature"])
     print "QUANTITIES", ex
 
-#@profile_test
+@profile_test
+def profile_1d(pf):
+    dd = pf.h.all_data()
+    min_rho, max_rho = dd.quantities["Extrema"](["Density"])[0]
+    prof = BinnedProfile1D(dd,
+                128, "Density", min_rho, max_rho, True,
+                           lazy_reader = True)
+    prof.add_fields(["CellMassMsun"], weight=None)
+
+@profile_test
 def profile_2d(pf):
     dd = pf.h.all_data()
+    (min_rho, max_rho), (min_T, max_T) = dd.quantities[
+        "Extrema"](["Density", "Temperature"])
     prof = BinnedProfile2D(dd,
                 128, "Density", min_rho, max_rho, True,
                 128, "Temperature", min_T, max_T, True,
                            lazy_reader = True)
     prof.add_fields(["CellMassMsun"], weight=None)
 
-pf = load("../RD0035/RD0035", data_style="enzo_packed_3d")
-#pf = load("/nics/d/home/davem/turk/tar1/DD0083/DD0083")
+pf = load("DD0087/DD0087", data_style="enzo_packed_3d")
 
 run_all_tests(pf, 1, True)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.