Skip to content

Commit

Permalink
plot sanity checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cgevans committed Dec 3, 2021
1 parent 18acac5 commit 5d36d1d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Much faster `Experiment.sync_from_machine`, only transferring additional log entries rather than the entire log.
- Common plotting routines for fluorescence data.
- More reliable monitoring.
- More reliable connections, and testing.
- `Stage.stepped_ramp` convenience function.
- Fixes to bugs inhibiting exposure setting, and some basic
implementations for this.
Expand Down
14 changes: 12 additions & 2 deletions tests/test_experiment_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
import pytest
from qslib.common import Experiment


@pytest.fixture(scope="module")
def exp() -> Experiment:
return Experiment.from_file("tests/test.eds")


@pytest.fixture(scope="module")
def exp_reloaded(exp: Experiment, tmp_path_factory: pytest.TempPathFactory) -> Experiment:
def exp_reloaded(
exp: Experiment, tmp_path_factory: pytest.TempPathFactory
) -> Experiment:
tmp_path = tmp_path_factory.mktemp("exp")
exp.save_file(tmp_path / "test_loaded.eds")
return Experiment.from_file(tmp_path / "test_loaded.eds")
Expand All @@ -23,4 +27,10 @@ def test_reload(exp: Experiment, exp_reloaded: Experiment):
assert (exp.welldata == exp_reloaded.welldata).all().all()
assert exp.name == exp_reloaded.name
assert exp.protocol == exp_reloaded.protocol
assert exp.plate_setup == exp_reloaded.plate_setup
assert exp.plate_setup == exp_reloaded.plate_setup


def test_plots(exp: Experiment):
exp.plot_over_time(samples="Sample 1", temperatures="axes")
exp.plot_anneal_melt(samples="Sample 1")
exp.protocol.tcplot()

0 comments on commit 5d36d1d

Please sign in to comment.