Skip to content

Commit

Permalink
Set 'check_continuity' default to True for nojump transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
p-j-smith committed Sep 17, 2023
1 parent 6549191 commit 847ac79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/mda_tui/widgets/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ class NoJump(Vertical):
def compose(self) -> ComposeResult:
"""Create layout of parameter widgets"""

check_continuity = Switch()
check_continuity = Switch(value=True)

# Define tooltips
check_continuity_tooltip = "check the trajectory step size is not more than 1"
Expand Down
3 changes: 3 additions & 0 deletions tests/test_transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from textual.widgets import (
Input,
Select,
Switch,
)

from mda_tui.widgets import (
Expand Down Expand Up @@ -153,6 +154,7 @@ async def test_unwrap(app, universe_filenames: tuple[pathlib.Path, pathlib.Path]
@pytest.mark.xfail(
mda.__version__ not in mda_min_version,
reason="bug in NoJump transformation is fixed in MDAnalysis >2.6.1",
strict=True,
)
@pytest.mark.asyncio()
async def test_nojump(app, universe_filenames: tuple[pathlib.Path, pathlib.Path]):
Expand All @@ -168,6 +170,7 @@ async def test_nojump(app, universe_filenames: tuple[pathlib.Path, pathlib.Path]
Select,
)
nojump_transformation = pilot.app.query_one(transformations.NoJump)
nojump_transformation.query_one(Switch).value = True

topology_reader_input.value = pdb.as_posix()
trajectory_reader_input.value = xtc.as_posix()
Expand Down

0 comments on commit 847ac79

Please sign in to comment.