From 8074367326812cf98fee2662383065afcbb0d26e Mon Sep 17 00:00:00 2001 From: Irfan Alibay Date: Fri, 27 Oct 2023 11:26:09 +0100 Subject: [PATCH 01/15] FIx CI * Fixes codecov failing cron CI because of being called too many times * Adds 3.11 CI * Adds 3.12 to upstream CI --- .github/workflows/CI.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 3ae20bf..8d42392 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -24,7 +24,7 @@ jobs: fail-fast: false matrix: os: [macOS-latest, ubuntu-latest, windows-latest] - python-version: [3.8, 3.9, "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.12"] env_file: [env, ] include: - name: minimum_requirements @@ -68,7 +68,9 @@ jobs: pytest -v --cov=membrane_curvature --cov-report=xml --color=yes membrane_curvature/tests/ - name: CodeCov - uses: codecov/codecov-action@v2 + if: ${{ github.repository == 'MDAnalysis/membrane-curvature' + && github.event_name == 'pull_request' }} + uses: codecov/codecov-action@v3 with: file: ./coverage.xml flags: unittests @@ -80,7 +82,7 @@ jobs: strategy: fail-fast: false matrix: - latest-python : ["3.10", "3.11"] + latest-python : ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 From 3ef00f4fc791dfa5b1ac8b61105697d5e3ffafa6 Mon Sep 17 00:00:00 2001 From: Irfan Alibay Date: Fri, 27 Oct 2023 11:30:22 +0100 Subject: [PATCH 02/15] Update and rename readthedocs.yml to .readthedocs.yml --- .readthedocs.yml | 14 ++++++++++++++ readthedocs.yml | 15 --------------- 2 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 .readthedocs.yml delete mode 100644 readthedocs.yml diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..1823762 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,14 @@ +# readthedocs.yml + +version: 2 + +sphinx: + configuration: docs/conf.py + +build: + os: ubuntu-22.04 + tools: + python: "mambaforge-4.10" + +conda: + environment: docs/requirements.yaml diff --git a/readthedocs.yml b/readthedocs.yml deleted file mode 100644 index 69d6db5..0000000 --- a/readthedocs.yml +++ /dev/null @@ -1,15 +0,0 @@ -# readthedocs.yml - -version: 2 - -build: - image: latest - -python: - version: 3.8 - install: - - method: pip - path: . - -conda: - environment: docs/requirements.yaml \ No newline at end of file From 7df05782d1e7593d025523755cf0ce49cf76ea2d Mon Sep 17 00:00:00 2001 From: IAlibay Date: Fri, 27 Oct 2023 11:57:17 +0100 Subject: [PATCH 03/15] switch to importlib --- membrane_curvature/tests/datafiles.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/membrane_curvature/tests/datafiles.py b/membrane_curvature/tests/datafiles.py index 67912c2..709c2d9 100644 --- a/membrane_curvature/tests/datafiles.py +++ b/membrane_curvature/tests/datafiles.py @@ -23,22 +23,24 @@ "GRO_MEMBPROT_FIT" # Gromacs coordinates to load trajectory with fit ] -from pkg_resources import resource_filename +from importlib import resources + +_data_ref = resources.files('membrane_curvature,data') # Membrane protein systems -GRO_MEMBRANE_PROTEIN = resource_filename(__name__, '../data/test_curvature_abca1.gro') -XTC_MEMBRANE_PROTEIN = resource_filename(__name__, '../data/test_curvature_abca1.xtc') +GRO_MEMBRANE_PROTEIN = (_data_ref / '../data/test_curvature_abca1.gro').as_posix() +XTC_MEMBRANE_PROTEIN = (_data_ref / '../data/test_curvature_abca1.xtc').as_posix() # PO4 beads only -GRO_PO4 = resource_filename(__name__, '../data/test_curvature_po4_only.gro') -XTC_PO4 = resource_filename(__name__, '../data/test_curvature_po4_only.xtc') +GRO_PO4 = (_data_ref / '../data/test_curvature_po4_only.gro').as_posix() +XTC_PO4 = (_data_ref / '../data/test_curvature_po4_only.xtc').as_posix() # big systems -GRO_PO4_SMALL = resource_filename(__name__, '../data/test_po4_small.gro') -XTC_PO4_SMALL = resource_filename(__name__, '../data/test_po4_small.xtc') +GRO_PO4_SMALL = (_data_ref / '../data/test_po4_small.gro').as_posix() +XTC_PO4_SMALL = (_data_ref / '../data/test_po4_small.xtc').as_posix() # membrane-only -MEMB_GRO = resource_filename(__name__, '../data/MEMB_traj_short.gro') -MEMB_XTC = resource_filename(__name__, '../data/MEMB_traj_short.xtc') +MEMB_GRO = (_data_ref / '../data/MEMB_traj_short.gro').as_posix() +MEMB_XTC = (_data_ref / '../data/MEMB_traj_short.xtc').as_posix() # membrane-protein -GRO_MEMBPROT_FIT = resource_filename(__name__, '../data/Membrane_protein_fit.gro') -XTC_MEMBPROT_FIT = resource_filename(__name__, '../data/Membrane_protein_fit.xtc') +GRO_MEMBPROT_FIT = (_data_ref / '../data/Membrane_protein_fit.gro').as_posix() +XTC_MEMBPROT_FIT = (_data_ref / '../data/Membrane_protein_fit.xtc').as_posix() -del resource_filename +del resources From 956b058a8b47cbeeeebcfbdcb05426d68d15f204 Mon Sep 17 00:00:00 2001 From: IAlibay Date: Fri, 27 Oct 2023 11:58:05 +0100 Subject: [PATCH 04/15] Drop py3.8, add py3.12 --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index d8cb529..e4e8d2e 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,7 @@ # 'Mac OS-X', # 'Unix', # 'Windows'], # Valid platforms your code works on, adjust to your flavor - python_requires=">=3.8", # Python version restrictions + python_requires=">=3.9", # Python version restrictions classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Console', @@ -70,10 +70,10 @@ 'Operating System :: POSIX', 'Topic :: Scientific/Engineering ', 'Programming Language :: Python :: 3', - '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', ] # Manual control if final package is compressible or not, set False to prevent the .egg from being made # zip_safe=False, From 1b6946fa2477450a8b3f1ef48b4efa38952825a4 Mon Sep 17 00:00:00 2001 From: IAlibay Date: Fri, 27 Oct 2023 12:06:51 +0100 Subject: [PATCH 05/15] fix CI --- .github/workflows/CI.yaml | 4 ++-- membrane_curvature/tests/datafiles.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 8d42392..038d2c1 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -24,12 +24,12 @@ jobs: fail-fast: false matrix: os: [macOS-latest, ubuntu-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.12"] + python-version: ["3.9", "3.10", "3.11"] env_file: [env, ] include: - name: minimum_requirements os: ubuntu-latest - python-version: 3.8 + python-version: 3.9 env_file: min steps: diff --git a/membrane_curvature/tests/datafiles.py b/membrane_curvature/tests/datafiles.py index 709c2d9..2b80cf9 100644 --- a/membrane_curvature/tests/datafiles.py +++ b/membrane_curvature/tests/datafiles.py @@ -25,7 +25,7 @@ from importlib import resources -_data_ref = resources.files('membrane_curvature,data') +_data_ref = resources.files('membrane_curvature.data') # Membrane protein systems GRO_MEMBRANE_PROTEIN = (_data_ref / '../data/test_curvature_abca1.gro').as_posix() From 0a2de319865eaa07eda6ea5a35ee0134594a8113 Mon Sep 17 00:00:00 2001 From: IAlibay Date: Fri, 27 Oct 2023 12:23:43 +0100 Subject: [PATCH 06/15] remove as_posix calls --- membrane_curvature/tests/datafiles.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/membrane_curvature/tests/datafiles.py b/membrane_curvature/tests/datafiles.py index 2b80cf9..19ae2cc 100644 --- a/membrane_curvature/tests/datafiles.py +++ b/membrane_curvature/tests/datafiles.py @@ -28,19 +28,19 @@ _data_ref = resources.files('membrane_curvature.data') # Membrane protein systems -GRO_MEMBRANE_PROTEIN = (_data_ref / '../data/test_curvature_abca1.gro').as_posix() -XTC_MEMBRANE_PROTEIN = (_data_ref / '../data/test_curvature_abca1.xtc').as_posix() +GRO_MEMBRANE_PROTEIN = (_data_ref / '../data/test_curvature_abca1.gro') +XTC_MEMBRANE_PROTEIN = (_data_ref / '../data/test_curvature_abca1.xtc') # PO4 beads only -GRO_PO4 = (_data_ref / '../data/test_curvature_po4_only.gro').as_posix() -XTC_PO4 = (_data_ref / '../data/test_curvature_po4_only.xtc').as_posix() +GRO_PO4 = (_data_ref / '../data/test_curvature_po4_only.gro') +XTC_PO4 = (_data_ref / '../data/test_curvature_po4_only.xtc') # big systems -GRO_PO4_SMALL = (_data_ref / '../data/test_po4_small.gro').as_posix() -XTC_PO4_SMALL = (_data_ref / '../data/test_po4_small.xtc').as_posix() +GRO_PO4_SMALL = (_data_ref / '../data/test_po4_small.gro') +XTC_PO4_SMALL = (_data_ref / '../data/test_po4_small.xtc') # membrane-only -MEMB_GRO = (_data_ref / '../data/MEMB_traj_short.gro').as_posix() -MEMB_XTC = (_data_ref / '../data/MEMB_traj_short.xtc').as_posix() +MEMB_GRO = (_data_ref / '../data/MEMB_traj_short.gro') +MEMB_XTC = (_data_ref / '../data/MEMB_traj_short.xtc') # membrane-protein -GRO_MEMBPROT_FIT = (_data_ref / '../data/Membrane_protein_fit.gro').as_posix() -XTC_MEMBPROT_FIT = (_data_ref / '../data/Membrane_protein_fit.xtc').as_posix() +GRO_MEMBPROT_FIT = (_data_ref / '../data/Membrane_protein_fit.gro') +XTC_MEMBPROT_FIT = (_data_ref / '../data/Membrane_protein_fit.xtc') del resources From 7d9b6bee73934c6bb74cf22a5a4a94d8bfe49ad3 Mon Sep 17 00:00:00 2001 From: IAlibay Date: Fri, 27 Oct 2023 12:35:24 +0100 Subject: [PATCH 07/15] fix relative path issues --- membrane_curvature/tests/datafiles.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/membrane_curvature/tests/datafiles.py b/membrane_curvature/tests/datafiles.py index 19ae2cc..4efeb3d 100644 --- a/membrane_curvature/tests/datafiles.py +++ b/membrane_curvature/tests/datafiles.py @@ -28,19 +28,19 @@ _data_ref = resources.files('membrane_curvature.data') # Membrane protein systems -GRO_MEMBRANE_PROTEIN = (_data_ref / '../data/test_curvature_abca1.gro') -XTC_MEMBRANE_PROTEIN = (_data_ref / '../data/test_curvature_abca1.xtc') +GRO_MEMBRANE_PROTEIN = (_data_ref / 'test_curvature_abca1.gro') +XTC_MEMBRANE_PROTEIN = (_data_ref / 'test_curvature_abca1.xtc') # PO4 beads only -GRO_PO4 = (_data_ref / '../data/test_curvature_po4_only.gro') -XTC_PO4 = (_data_ref / '../data/test_curvature_po4_only.xtc') +GRO_PO4 = (_data_ref / 'test_curvature_po4_only.gro') +XTC_PO4 = (_data_ref / 'test_curvature_po4_only.xtc') # big systems -GRO_PO4_SMALL = (_data_ref / '../data/test_po4_small.gro') -XTC_PO4_SMALL = (_data_ref / '../data/test_po4_small.xtc') +GRO_PO4_SMALL = (_data_ref / 'test_po4_small.gro') +XTC_PO4_SMALL = (_data_ref / 'test_po4_small.xtc') # membrane-only -MEMB_GRO = (_data_ref / '../data/MEMB_traj_short.gro') -MEMB_XTC = (_data_ref / '../data/MEMB_traj_short.xtc') +MEMB_GRO = (_data_ref / 'MEMB_traj_short.gro') +MEMB_XTC = (_data_ref / 'MEMB_traj_short.xtc') # membrane-protein -GRO_MEMBPROT_FIT = (_data_ref / '../data/Membrane_protein_fit.gro') -XTC_MEMBPROT_FIT = (_data_ref / '../data/Membrane_protein_fit.xtc') +GRO_MEMBPROT_FIT = (_data_ref / 'Membrane_protein_fit.gro') +XTC_MEMBPROT_FIT = (_data_ref / 'Membrane_protein_fit.xtc') del resources From eebf54a8d961e034a637b9a3e3bcc1f90981a652 Mon Sep 17 00:00:00 2001 From: IAlibay Date: Fri, 27 Oct 2023 12:42:13 +0100 Subject: [PATCH 08/15] pin to <7 sphinx --- docs/requirements.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/requirements.yaml b/docs/requirements.yaml index 2b3f044..7d4455a 100644 --- a/docs/requirements.yaml +++ b/docs/requirements.yaml @@ -10,8 +10,9 @@ dependencies: - MDAnalysis - ipython - MDAnalysisTests + - sphinx<7 # Pip-only installs - pip: - nbsphinx - ipywidgets - - nglview \ No newline at end of file + - nglview From 449ccc1c3f5953ec33c289342ab1407dc4197b7f Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Fri, 27 Oct 2023 23:17:51 +1100 Subject: [PATCH 09/15] try fixing rtd --- readthedocs.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/readthedocs.yml b/readthedocs.yml index 69d6db5..875aac1 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -1,15 +1,19 @@ -# readthedocs.yml +# readthedocs.yaml version: 2 +sphinx: + configuration: docs/source/conf.py + build: - image: latest + os: ubuntu-22.04 + tools: + python: "mambaforge-4.10" python: - version: 3.8 install: - - method: pip + - method: setuptools path: . conda: - environment: docs/requirements.yaml \ No newline at end of file + environment: docs/requirements.yaml From f52a3920e3e9bf8b302d6bcb9be3b6a833303419 Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Fri, 27 Oct 2023 23:23:27 +1100 Subject: [PATCH 10/15] fix path --- readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs.yml b/readthedocs.yml index 875aac1..da72b6b 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -3,7 +3,7 @@ version: 2 sphinx: - configuration: docs/source/conf.py + configuration: docs/conf.py build: os: ubuntu-22.04 From a971874d3e13fcecafecd20ee1cd37db280b7ffe Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Fri, 27 Oct 2023 23:31:21 +1100 Subject: [PATCH 11/15] add sphinx theme to req --- docs/conf.py | 1 - docs/requirements.yaml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 5367ce8..3d36894 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,7 +13,6 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # Incase the project was not installed -import membrane_curvature import os import sys sys.path.insert(0, os.path.abspath('..')) diff --git a/docs/requirements.yaml b/docs/requirements.yaml index 2b3f044..837fdd8 100644 --- a/docs/requirements.yaml +++ b/docs/requirements.yaml @@ -10,6 +10,7 @@ dependencies: - MDAnalysis - ipython - MDAnalysisTests + - sphinx_rtd_theme # Pip-only installs - pip: - nbsphinx From 70667de3774eaa2e7b30231a13f0997337434775 Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Fri, 27 Oct 2023 23:35:24 +1100 Subject: [PATCH 12/15] upgrade mambaforge --- readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs.yml b/readthedocs.yml index da72b6b..e169a97 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -8,7 +8,7 @@ sphinx: build: os: ubuntu-22.04 tools: - python: "mambaforge-4.10" + python: "mambaforge-22.9" python: install: From f764b149a26055a6fab48a8b04014adaf77068c3 Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Fri, 27 Oct 2023 23:35:39 +1100 Subject: [PATCH 13/15] fix header --- readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs.yml b/readthedocs.yml index e169a97..31adaf0 100644 --- a/readthedocs.yml +++ b/readthedocs.yml @@ -1,4 +1,4 @@ -# readthedocs.yaml +# readthedocs.yml version: 2 From 219cc316e9e2cb9316b57c06334a7b7235b18af4 Mon Sep 17 00:00:00 2001 From: IAlibay Date: Sat, 28 Oct 2023 20:59:39 +0100 Subject: [PATCH 14/15] missing init file? --- membrane_curvature/data/__init__.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 membrane_curvature/data/__init__.py diff --git a/membrane_curvature/data/__init__.py b/membrane_curvature/data/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/membrane_curvature/data/__init__.py @@ -0,0 +1 @@ + From d2cf8d54df0da76c623d66ca8c6150b0cc62097a Mon Sep 17 00:00:00 2001 From: IAlibay Date: Sat, 28 Oct 2023 21:08:50 +0100 Subject: [PATCH 15/15] switch to micromamba action --- .github/workflows/CI.yaml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 038d2c1..1f6283c 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -33,7 +33,7 @@ jobs: env_file: min steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Additional info about the build shell: bash @@ -44,22 +44,21 @@ jobs: # More info on options: https://github.com/conda-incubator/setup-miniconda # An environment for the minimum versions - - uses: conda-incubator/setup-miniconda@v2 + - name: setup micromamba + uses: mamba-org/setup-micromamba@v1 with: - python-version: ${{ matrix.python-version }} environment-file: devtools/conda-envs/test_${{ matrix.env_file }}.yaml - channels: conda-forge, defaults - activate-environment: test - auto-update-conda: false - auto-activate-base: false - show-channel-urls: true - + environment-name: test + create-args: >- + python=${{ matrix.python-version }} + - name: Install package # conda setup requires this special shell shell: bash -l {0} run: | python -m pip install . --no-deps - conda list + pip list + micromamba list - name: Run tests # conda setup requires this special shell @@ -82,10 +81,10 @@ jobs: strategy: fail-fast: false matrix: - latest-python : ["3.10", "3.11", "3.12"] + latest-python : ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.latest-python }}