# Path: cellpy/log.py
# def setup_logging(
#     default_json_path=None,
#     default_level=None,
#     env_key="LOG_CFG",
#     custom_log_dir=None,
#     reset_big_log=False,
#     max_size=5_000_000,
#     testing=False,
# ):
# 
# Path: cellpy/utils/ocv_rlx.py
# def select_ocv_points(
#     cellpydata,
#     cycles=None,
#     selection_method="martin",
#     number_of_points=5,
#     interval=10,
#     relative_voltage=False,
#     report_times=False,
#     direction="both",
#     return_times=False,
# ):
#     def __init__(self, cellpydata, cycles, circuits=3):
#     def set_data(self, cellpydata):
#     def set_cycles(self, cycles):
#     def run_fitting(self, direction="up", weighted=True):
#     def get_best_fit_data(self):
#     def get_best_fit_parameters(self):
#     def get_best_fit_parameters_translated(self):
#     def get_best_fit_parameters_grouped(self):
#     def get_best_fit_parameters_translated_grouped(self):
#     def get_fit_cycles(self):
#     def plot_summary(self, cycles=None):
#     def plot_summary_translated(self):
#     def __init__(self, zero_current=0.1, zero_voltage=0.05):
#     def set_cellpydata(self, cellpydata, cycle):
#     def set_data(self, time, voltage):
#     def set_zero_current(self, zero_current):
#     def set_zero_voltage(self, zero_voltage):
#     def set_circuits(self, circuits):
#     def set_weights(self, weights):
#     def reset_weights(self):
#     def set_weights_power_law(self, prefactor=1, power=-2, zero_level=1):
#     def create_model(self):
#     def _model(time, ocv, t0, w0, t1, w1, t2, w2, t3, w3, t4, w4):
#     def fit_model(self):
#     def run_fit(self):
#     def get_result(self):
#     def get_best_fit_data(self):
#     def get_best_fit_parameters(self):
#     def get_best_fit_parameters_translated(self):
# def _main():
# class MultiCycleOcvFit(object):
# class OcvFit(object):


import logging
import pytest
from cellpy import log
from cellpy.utils import ocv_rlx
    ocv_fit.run_fit()
    r = ocv_fit.get_best_fit_parameters_translated()
    assert r[variable] == pytest.approx(value, 0.001)


def test_ocv_rlx_multi(dataset):
    cycles = [1, 2, 5]
    ocv_fit = ocv_rlx.MultiCycleOcvFit(dataset, cycles, circuits=3)
    ocv_fit.run_fitting(direction="up")


def test_select_ocv_points(dataset):
    out = ocv_rlx.select_ocv_points(dataset)
    # print()
    # print(" ocv rlx points ".center(80, "="))
    # print(" all defaults ".center(80, "-"))
    # print(out.head())

    out = ocv_rlx.select_ocv_points(dataset, relative_voltage=True)
    # print(" relative voltage ".center(80, "-"))
    # print(out.head())

    out = ocv_rlx.select_ocv_points(dataset, number_of_points=1)
    # print(" seven points ".center(80, "-"))
    # print(out.head())

    out = ocv_rlx.select_ocv_points(dataset, report_times=True)
    # print(" report times ".center(80, "-"))
    # print(out.head())


# Path: cellpy/log.py
# def setup_logging(
#     default_json_path=None,
#     default_level=None,
#     env_key="LOG_CFG",
#     custom_log_dir=None,
#     reset_big_log=False,
#     max_size=5_000_000,
#     testing=False,
# ):
# 
# Path: cellpy/utils/ocv_rlx.py
# def select_ocv_points(
#     cellpydata,
#     cycles=None,
#     selection_method="martin",
#     number_of_points=5,
#     interval=10,
#     relative_voltage=False,
#     report_times=False,
#     direction="both",
#     return_times=False,
# ):
#     def __init__(self, cellpydata, cycles, circuits=3):
#     def set_data(self, cellpydata):
#     def set_cycles(self, cycles):
#     def run_fitting(self, direction="up", weighted=True):
#     def get_best_fit_data(self):
#     def get_best_fit_parameters(self):
#     def get_best_fit_parameters_translated(self):
#     def get_best_fit_parameters_grouped(self):
#     def get_best_fit_parameters_translated_grouped(self):
#     def get_fit_cycles(self):
#     def plot_summary(self, cycles=None):
#     def plot_summary_translated(self):
#     def __init__(self, zero_current=0.1, zero_voltage=0.05):
#     def set_cellpydata(self, cellpydata, cycle):
#     def set_data(self, time, voltage):
#     def set_zero_current(self, zero_current):
#     def set_zero_voltage(self, zero_voltage):
#     def set_circuits(self, circuits):
#     def set_weights(self, weights):
#     def reset_weights(self):
#     def set_weights_power_law(self, prefactor=1, power=-2, zero_level=1):
#     def create_model(self):
#     def _model(time, ocv, t0, w0, t1, w1, t2, w2, t3, w3, t4, w4):
#     def fit_model(self):
#     def run_fit(self):
#     def get_result(self):
#     def get_best_fit_data(self):
#     def get_best_fit_parameters(self):
#     def get_best_fit_parameters_translated(self):
# def _main():
# class MultiCycleOcvFit(object):
# class OcvFit(object):


# Path: tests/test_ocv_relax.py
import logging
import pytest
from cellpy import log
from cellpy.utils import ocv_rlx

    ocv_fit.run_fit()
    r = ocv_fit.get_best_fit_parameters_translated()
    assert r[variable] == pytest.approx(value, 0.001)


def test_ocv_rlx_multi(dataset):
    cycles = [1, 2, 5]
    ocv_fit = ocv_rlx.MultiCycleOcvFit(dataset, cycles, circuits=3)
    ocv_fit.run_fitting(direction="up")


def test_select_ocv_points(dataset):
    out = ocv_rlx.select_ocv_points(dataset)
    # print()
    # print(" ocv rlx points ".center(80, "="))
    # print(" all defaults ".center(80, "-"))
    # print(out.head())

    out = ocv_rlx.select_ocv_points(dataset, relative_voltage=True)
    # print(" relative voltage ".center(80, "-"))
    # print(out.head())

    out = ocv_rlx.select_ocv_points(dataset, number_of_points=1)
    # print(" seven points ".center(80, "-"))
    # print(out.head())

    out = ocv_rlx.select_ocv_points(dataset, report_times=True)
    # print(" report times ".center(80, "-"))
    # print(out.head())


    out = ocv_rlx.select_ocv_points(dataset, selection_method="fixed_times")