Repository: MDAnalysis/membrane-curvature (language: python)

Issue:
Try fixing rtd
## Description
Fixes RTD build

## Todos
Notable points that this PR has either accomplished or will accomplish.
  - [ ] TODO 1

## Questions
- [ ] Question1

## Status
- [ ] Ready to go


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml
index 3ae20bf..1f6283c 100644
--- a/.github/workflows/CI.yaml
+++ b/.github/workflows/CI.yaml
@@ -24,16 +24,16 @@ jobs:
       fail-fast: false
       matrix:
         os: [macOS-latest, ubuntu-latest, windows-latest]
-        python-version: [3.8, 3.9, "3.10"]
+        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:
-    - 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
@@ -68,7 +67,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,10 +81,10 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        latest-python : ["3.10", "3.11"]
+        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 }}
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
new file mode 100644
index 0000000..31adaf0
--- /dev/null
+++ b/.readthedocs.yaml
@@ -0,0 +1,19 @@
+# readthedocs.yml
+
+version: 2
+
+sphinx:
+  configuration: docs/conf.py
+
+build:
+  os: ubuntu-22.04
+  tools:
+    python: "mambaforge-22.9"
+
+python:
+  install:
+    - method: setuptools
+      path: .
+
+conda:
+  environment: docs/requirements.yaml
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..97295e2 100644
--- a/docs/requirements.yaml
+++ b/docs/requirements.yaml
@@ -10,8 +10,9 @@ dependencies:
   - MDAnalysis
   - ipython
   - MDAnalysisTests
+  - sphinx_rtd_theme
     # Pip-only installs
   - pip:
     - nbsphinx
     - ipywidgets
-    - nglview
\ No newline at end of file
+    - nglview
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,1 @@
+
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
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,


Test patch:
diff --git a/membrane_curvature/tests/datafiles.py b/membrane_curvature/tests/datafiles.py
index 67912c2..4efeb3d 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 / 'test_curvature_abca1.gro')
+XTC_MEMBRANE_PROTEIN = (_data_ref / 'test_curvature_abca1.xtc')
 # 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 / 'test_curvature_po4_only.gro')
+XTC_PO4 = (_data_ref / 'test_curvature_po4_only.xtc')
 # 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 / 'test_po4_small.gro')
+XTC_PO4_SMALL = (_data_ref / 'test_po4_small.xtc')
 # 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 / 'MEMB_traj_short.gro')
+MEMB_XTC = (_data_ref / 'MEMB_traj_short.xtc')
 # 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 / 'Membrane_protein_fit.gro')
+XTC_MEMBPROT_FIT = (_data_ref / 'Membrane_protein_fit.xtc')
 
-del resource_filename
+del resources