mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[Python] Deprecate Sim1D.write_hdf
This commit is contained in:
committed by
Ray Speth
parent
85efbc1bdd
commit
df3d6f96fc
@@ -563,7 +563,14 @@ class FlameBase(Sim1D):
|
||||
`SolutionArray.collect_data`. The method exports data using
|
||||
`SolutionArray.write_hdf` via `to_solution_array` and requires a working
|
||||
installation of *h5py* (``h5py`` can be installed using pip or conda).
|
||||
|
||||
.. deprecated:: 3.0
|
||||
|
||||
Method to be removed after Cantera 3.0; replaceable by 'Sim1D.save'.
|
||||
"""
|
||||
warnings.warn(
|
||||
"Method to be removed after Cantera 3.0; use 'Sim1D.save' instead.",
|
||||
DeprecationWarning)
|
||||
cols = ('extra', 'T', 'P', species)
|
||||
meta = self.settings
|
||||
meta['date'] = formatdate(localtime=True)
|
||||
|
||||
@@ -730,10 +730,12 @@ class TestFreeFlame(utilities.CanteraTest):
|
||||
k = self.gas.species_index('H2')
|
||||
self.assertArrayNear(data.X[:, k], self.sim.X[k, :])
|
||||
|
||||
@pytest.mark.usefixtures("allow_deprecated")
|
||||
@utilities.unittest.skipIf("h5py" not in ct.hdf_support(), "h5py not installed")
|
||||
def test_write_hdf_legacy(self):
|
||||
self.run_freeflame_write_hdf("legacy")
|
||||
|
||||
@pytest.mark.usefixtures("allow_deprecated")
|
||||
@utilities.unittest.skipIf(ct.hdf_support() != {"h5py", "native"}, "h5py and/or HighFive not installed")
|
||||
def test_write_hdf_transition(self):
|
||||
self.run_freeflame_write_hdf("transition")
|
||||
@@ -1313,10 +1315,12 @@ class TestImpingingJet(utilities.CanteraTest):
|
||||
def test_reacting_surface_case3(self):
|
||||
self.run_reacting_surface(xch4=0.2, tsurf=800.0, mdot=0.1, width=0.2)
|
||||
|
||||
@pytest.mark.usefixtures("allow_deprecated")
|
||||
@utilities.unittest.skipIf("h5py" not in ct.hdf_support(), "h5py not installed")
|
||||
def test_write_hdf_legacy(self):
|
||||
self.run_impingingjet_write("legacy")
|
||||
|
||||
@pytest.mark.usefixtures("allow_deprecated")
|
||||
@utilities.unittest.skipIf(ct.hdf_support() != {"h5py", "native"}, "h5py and/or HighFive not installed")
|
||||
def test_write_hdf_transition(self):
|
||||
self.run_impingingjet_write("transition")
|
||||
|
||||
Reference in New Issue
Block a user