Beispiel #1
0
    def read_csv(self, filepath):
        """
        Read data from csv file.

        :param filepath: path of the csv file
        """
        self.fitting_data = FittingData.read_from_csv(filepath)
def test_save_and_read_csv_without_name(tmpdir):
    original_fitting_data = FittingData(data=RAW_DATA)
    original_fitting_data.save_csv(tmpdir)
    loaded_fitting_data = FittingData.read_from_csv(
        Path(tmpdir / "fitting_data.csv"))

    assert_fitting_data_are_equal(original_fitting_data, loaded_fitting_data)
 def actual_read(file_path, **kwargs):
     with patch("eddington.fitting_data.open", m_open):
         actual_fitting_data = FittingData.read_from_csv(
             file_path, **kwargs)
     return actual_fitting_data
Beispiel #4
0
 def read_method(**kwargs):
     return FittingData.read_from_csv(file_path, **kwargs)