From 1e9e7c1fd1cc1b50e347773b7483324002294d38 Mon Sep 17 00:00:00 2001 From: Zhiyi Wu Date: Sun, 24 Mar 2024 08:44:09 +0000 Subject: [PATCH 1/6] Fix test --- src/alchemlyb/tests/test_workflow_ABFE.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/alchemlyb/tests/test_workflow_ABFE.py b/src/alchemlyb/tests/test_workflow_ABFE.py index c2dc4b15..0177f292 100644 --- a/src/alchemlyb/tests/test_workflow_ABFE.py +++ b/src/alchemlyb/tests/test_workflow_ABFE.py @@ -35,10 +35,10 @@ def workflow(tmp_path_factory): class TestInit: - def test_nofilematch(self): + def test_nofilematch(self, tmp_path): with pytest.raises(ValueError, match="No file has been matched to"): ABFE( - dir="./", + dir=str(tmp_path), prefix="dhdl", suffix="xvg", T=310, From 69861acd77f2d97b3950c4e4701e1b31a4bdcba3 Mon Sep 17 00:00:00 2001 From: Zhiyi Wu Date: Sun, 24 Mar 2024 09:34:06 +0000 Subject: [PATCH 2/6] fix ci --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0469f78f..89754ab3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,7 +50,7 @@ jobs: with: environment-file: devtools/conda-envs/test_env.yaml environment-name: test - extra-specs: | + create-args: | python=${{ matrix.python-version }} - name: Install package (with no dependencies) From 3f89a6ad94ea47eed1dc5d3b3108b248541078bd Mon Sep 17 00:00:00 2001 From: Zhiyi Wu Date: Sun, 24 Mar 2024 10:36:14 +0000 Subject: [PATCH 3/6] fixbalck --- src/alchemlyb/tests/parsing/test_amber.py | 1 + src/alchemlyb/tests/parsing/test_namd.py | 2 ++ src/alchemlyb/tests/test_fep_estimators.py | 1 + src/alchemlyb/tests/test_preprocessing.py | 1 + src/alchemlyb/tests/test_ti_estimators.py | 1 + src/alchemlyb/tests/test_ti_gaussian_quadrature.py | 1 + 6 files changed, 7 insertions(+) diff --git a/src/alchemlyb/tests/parsing/test_amber.py b/src/alchemlyb/tests/parsing/test_amber.py index 21b6064e..b74cab4b 100644 --- a/src/alchemlyb/tests/parsing/test_amber.py +++ b/src/alchemlyb/tests/parsing/test_amber.py @@ -1,6 +1,7 @@ """Amber parser tests. """ + import bz2 import logging diff --git a/src/alchemlyb/tests/parsing/test_namd.py b/src/alchemlyb/tests/parsing/test_namd.py index f5168e8f..e3f5ea7c 100644 --- a/src/alchemlyb/tests/parsing/test_namd.py +++ b/src/alchemlyb/tests/parsing/test_namd.py @@ -1,6 +1,7 @@ """NAMD parser tests. """ + import bz2 from os.path import basename from re import search @@ -13,6 +14,7 @@ from alchemlyb.parsing.namd import extract_u_nk, extract + # Indices of lambda values in the following line in NAMD fepout files: # #NEW FEP WINDOW: LAMBDA SET TO 0.6 LAMBDA2 0.7 LAMBDA_IDWS 0.5 LAMBDA1_IDX_NEW = 6 diff --git a/src/alchemlyb/tests/test_fep_estimators.py b/src/alchemlyb/tests/test_fep_estimators.py index 03d0122f..a956dbbc 100644 --- a/src/alchemlyb/tests/test_fep_estimators.py +++ b/src/alchemlyb/tests/test_fep_estimators.py @@ -1,6 +1,7 @@ """Tests for all FEP-based estimators in ``alchemlyb``. """ + import pytest import alchemlyb diff --git a/src/alchemlyb/tests/test_preprocessing.py b/src/alchemlyb/tests/test_preprocessing.py index d64c7267..2ce7677c 100644 --- a/src/alchemlyb/tests/test_preprocessing.py +++ b/src/alchemlyb/tests/test_preprocessing.py @@ -1,6 +1,7 @@ """Tests for preprocessing functions. """ + import logging import numpy as np diff --git a/src/alchemlyb/tests/test_ti_estimators.py b/src/alchemlyb/tests/test_ti_estimators.py index 5c644547..3fc490f4 100644 --- a/src/alchemlyb/tests/test_ti_estimators.py +++ b/src/alchemlyb/tests/test_ti_estimators.py @@ -1,6 +1,7 @@ """Tests for all TI-based estimators in ``alchemlyb``. """ + import pandas as pd import pytest diff --git a/src/alchemlyb/tests/test_ti_gaussian_quadrature.py b/src/alchemlyb/tests/test_ti_gaussian_quadrature.py index 2e331409..d3f772fd 100644 --- a/src/alchemlyb/tests/test_ti_gaussian_quadrature.py +++ b/src/alchemlyb/tests/test_ti_gaussian_quadrature.py @@ -1,6 +1,7 @@ """Tests for all TI-based estimators in ``alchemlyb``. """ + import pandas as pd import numpy as np import copy From 30b6c60e3ad78f2cc4bdee32e3a0046b5c304642 Mon Sep 17 00:00:00 2001 From: Zhiyi Wu Date: Sun, 24 Mar 2024 12:39:29 +0000 Subject: [PATCH 4/6] test new nest --- devtools/conda-envs/test_env.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index a8795f1c..662527fa 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -24,5 +24,5 @@ dependencies: - sphinx_rtd_theme - pip: - - alchemtest @ https://github.com/alchemistry/alchemtest/archive/master.zip + - alchemtest @ git+https://github.com/xiki-tempula/alchemtest.git@feat_main From 806d6114361acfbf70bf09f19c440069971b8a77 Mon Sep 17 00:00:00 2001 From: Zhiyi Wu Date: Sun, 31 Mar 2024 11:03:20 +0100 Subject: [PATCH 5/6] fix RTD --- .github/workflows/ci.yaml | 2 +- devtools/conda-envs/test_env.yaml | 2 +- docs/requirements.yaml | 9 +++++++++ readthedocs.yml | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 docs/requirements.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 89754ab3..6c666e99 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,7 +29,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "macOS-latest", "windows-latest"] - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11"] # Only test lowest and highest version on the expensive/slow # macOS and windows runners (UPDATE when supported versions change): exclude: diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml index 662527fa..a8795f1c 100644 --- a/devtools/conda-envs/test_env.yaml +++ b/devtools/conda-envs/test_env.yaml @@ -24,5 +24,5 @@ dependencies: - sphinx_rtd_theme - pip: - - alchemtest @ git+https://github.com/xiki-tempula/alchemtest.git@feat_main + - alchemtest @ https://github.com/alchemistry/alchemtest/archive/master.zip diff --git a/docs/requirements.yaml b/docs/requirements.yaml new file mode 100644 index 00000000..c008b03e --- /dev/null +++ b/docs/requirements.yaml @@ -0,0 +1,9 @@ +name: docs +channels: +dependencies: + # Base depends + - python=3.10 + - pip + # Doc + - sphinx + - sphinx_rtd_theme diff --git a/readthedocs.yml b/readthedocs.yml index 0c61d50f..4c77a2b4 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -13,9 +13,9 @@ build: python: "mambaforge-4.10" conda: - environment: devtools/conda-envs/test_env.yaml + environment: docs/requirements.yaml python: install: - method: pip - path: . + path: . \ No newline at end of file From ba3afe859559477cf0ef702b20ff30df1eb06543 Mon Sep 17 00:00:00 2001 From: Zhiyi Wu Date: Sun, 31 Mar 2024 11:08:03 +0100 Subject: [PATCH 6/6] add tailing line --- readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs.yml b/readthedocs.yml index 4c77a2b4..e053c3bc 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -18,4 +18,4 @@ conda: python: install: - method: pip - path: . \ No newline at end of file + path: .