from cerillo import StratusReader


def test_Stratus():
    """Test a complete experiment setup workflow"""

    # Configure plate template
    reader = StratusReader(port="/dev/ttyUSB0")
    reader.connect()
    results = reader.start_endpoint_experiment(wavelength=600)
    print(results.to_json(indent=2))
    csv_long = results.to_csv(format='long')
    csv_wide = results.to_csv(format='wide')

    # Save to disk
    results.save_json('experiment.json')
    results.save_csv('experiment_long.csv', format='long')
    results.save_csv('experiment_wide.csv', format='wide')



test_Stratus()
