Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/requirements/scikit-learn-1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JecaTosovic authored Jun 24, 2024
2 parents 1002baf + 280d5f6 commit 72c6572
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: .github/workflows/envs/environment.yml
channels: conda-forge
activate-environment: test
show-channel-urls: true
Expand All @@ -29,10 +28,13 @@ jobs:
- name: Check and Conditionally Install PyMOL
shell: bash -l {0}
run: |
PYMOL_VER=3.0.0
PYTHON_VER=${{ matrix.python-version }}
PYTHON_VER=${PYTHON_VER//./} # Remove the dot from the Python version
if mamba search -c conda-forge pymol-open-source=3.0.0 | grep -q "py${PYTHON_VER}"; then
mamba install -c conda-forge pymol-open-source=3.0.0
if mamba search -c conda-forge pymol-open-source==${PYMOL_VER} | grep -q "py${PYTHON_VER}"; then
mamba install -c conda-forge pymol-open-source==${PYMOL_VER} --file requirements/requirements-test.txt
else
mamba install -c conda-forge --file requirements/requirements-test.txt
fi
- name: Install package
shell: bash -l {0}
Expand All @@ -42,5 +44,4 @@ jobs:
shell: bash -l {0}
run: |
which python
python -m pip install pytest
pytest
python -m pytest
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: requirements-txt-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.2.2
rev: v0.4.10
hooks:
# Run the linter.
- id: ruff
Expand Down
1 change: 1 addition & 0 deletions requirements/requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ matplotlib==3.8.4
nglview==3.1.2
numpy==1.26.4
scikit-learn==1.5.0
pytest==8.2.2
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def water_data(request):
return np.loadtxt(request.param), request.param.split("/")[-1].split(".")[0]


@pytest.fixture(autouse=True)
@pytest.fixture()
def _pymol_skip():
pytest.importorskip("pymol")

Expand Down
3 changes: 1 addition & 2 deletions tests/test_hydrogen_orientation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Unit and regression test for the ConservedWaterSearch package.
"""
"""Unit and regression test for the ConservedWaterSearch package."""

# Import package, test suite, and other packages as needed
import numpy as np
Expand Down
3 changes: 3 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def test_read_results(water_results):
assert waterH2[0] == []


@pytest.mark.usefixtures("_pymol_skip")
def test_visualise_pymol():
# Create a temporary file using with for writing and reading
with tempfile.NamedTemporaryFile(mode="w+", suffix=".pse", delete=True) as f:
Expand All @@ -117,6 +118,7 @@ def test_visualise_pymol():
)


@pytest.mark.usefixtures("_pymol_skip")
def test_visualise_pymol2():
# Create a temporary file using with for writing and reading
with tempfile.NamedTemporaryFile(mode="w+", suffix=".pdb", delete=True) as f:
Expand All @@ -133,6 +135,7 @@ def test_visualise_pymol2():


# Visualise pymol tests
@pytest.mark.usefixtures("_pymol_skip")
@pytest.mark.parametrize(
("output_file", "align_file"),
[
Expand Down

0 comments on commit 72c6572

Please sign in to comment.