Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
pull_request:
branches:
- "main"
workflow_dispatch:
schedule:
# Midnight Tuesdays and Fridays
- cron: "0 0 * * 2,5"
Expand All @@ -29,7 +30,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.11"
cache: pip
cache-dependency-path: pyproject.toml

Expand All @@ -43,8 +44,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
python-version: [3.9, "3.10", 3.11, 3.12]
os: [macOS-latest, ubuntu-latest]
python-version: [3.11, 3.12, 3.13]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# This should be the path to the paper within your repo.
paper-path: joss_paper/paper.md
- name: Upload
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: paper
# This is the output path where Pandoc will write the compiled
Expand Down
9 changes: 5 additions & 4 deletions docs/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ channels:
- defaults
dependencies:
# Base depends
- python
- python=3.12
- pip
- numpy
- numpy>=2.2
- pytest
- mdanalysis
- mdanalysis>=2.8
- pandas>=2.2
- nglview
- nbsphinx
- ipython
- plotly
- sphinx_rtd_theme
- scipy==1.12.0
- scipy


# Pip-only installs
Expand Down
11 changes: 5 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ maintainers = [
{name = 'Hugo MacDermott-Opeskin', email = '[email protected]'}

]
requires-python = ">=3.8"
requires-python = ">=3.11"

keywords = [
"python", "science", "chemistry", "biophysics", "molecular-dynamics",
Expand All @@ -28,9 +28,9 @@ keywords = [
]

dependencies = [
'numpy>=1.20.0',
'numpy>=2.2',
'pandas>=2.2',
'mdanalysis>=2.0.0',
'mdanalysis>=2.8',
'pytest',
'matplotlib',
'setuptools',
Expand All @@ -49,10 +49,9 @@ classifiers = [
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Programming Language :: Python',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Scientific/Engineering :: Chemistry',
Expand Down
3 changes: 3 additions & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ build:

conda:
environment: docs/requirements.yaml

sphinx:
configuration: docs/conf.py
4 changes: 2 additions & 2 deletions solvation_analysis/rdf_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,10 @@ def identify_cutoff_poly(
cr_pts, cr_vals = identify_minima(f)
if not good_cutoff(cutoff_region, cr_pts, cr_vals):
if failure_behavior == "silent":
return np.NaN
return np.nan
if failure_behavior == "warn":
warnings.warn("No solvation shell detected.")
return np.NaN
return np.nan
if failure_behavior == "exception":
raise RuntimeError(
"Solute could not identify a solvation radius for at least one solvent. "
Expand Down
16 changes: 8 additions & 8 deletions solvation_analysis/tests/test_rdf_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_good_cutoff(cutoff_region, cr_pts, cr_vals, expected):
@pytest.mark.parametrize(
"rdf_tag, cutoff",
[
("fec_F", np.NaN),
("fec_F", np.nan),
("fec_O", 3.30),
("fec_all", 2.74),
("bn_all", 2.64),
Expand All @@ -108,7 +108,7 @@ def test_identify_cutoff_poly_easy(
@pytest.mark.parametrize(
"rdf_tag, cutoff",
[
("fec_F", np.NaN),
("fec_F", np.nan),
("fec_O", 3.30),
("fec_all", 2.74),
("bn_all", 2.64),
Expand All @@ -122,7 +122,7 @@ def test_identify_cutoff_scipy_easy(
):
bins, rdf = rdf_bins_and_data_easy[rdf_tag]
np.testing.assert_allclose(
identify_cutoff_scipy(bins, rdf, failure_behavior="warn", default=np.NaN),
identify_cutoff_scipy(bins, rdf, failure_behavior="warn", default=np.nan),
cutoff,
atol=0.2,
equal_nan=True,
Expand All @@ -148,8 +148,8 @@ def test_identify_scipy_hard(
bins_ez, rdf_ez = rdf_bins_and_data_easy[rdf_tag]
bins_hd, rdf_hd = rdf_bins_and_data_hard[rdf_tag]
np.testing.assert_allclose(
identify_cutoff_scipy(bins_hd, rdf_hd, failure_behavior="warn", default=np.NaN),
identify_cutoff_scipy(bins_ez, rdf_ez, failure_behavior="warn", default=np.NaN),
identify_cutoff_scipy(bins_hd, rdf_hd, failure_behavior="warn", default=np.nan),
identify_cutoff_scipy(bins_ez, rdf_ez, failure_behavior="warn", default=np.nan),
atol=0.2,
equal_nan=True,
)
Expand Down Expand Up @@ -201,11 +201,11 @@ def test_identify_cutoff_non_solv(rdf_tag, rdf_bins_and_data_non_solv):
bins, rdf = rdf_bins_and_data_non_solv[rdf_tag]
np.testing.assert_allclose(
identify_cutoff_poly(bins, rdf, failure_behavior="warn"),
np.NaN,
np.nan,
equal_nan=True,
)
np.testing.assert_allclose(
identify_cutoff_scipy(bins, rdf, failure_behavior="warn", default=np.NaN),
np.NaN,
identify_cutoff_scipy(bins, rdf, failure_behavior="warn", default=np.nan),
np.nan,
equal_nan=True,
)