Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIx CI #112

Merged
merged 18 commits into from
Dec 19, 2023
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
31 changes: 16 additions & 15 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
micromamba list

Is this necessary? As far as I can tell, micromamba list is run for the setup micromamba step already.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm keeping the spirit of what the original CI file did (there was a conda list call here).

Generally having a step post install that tells you everything in the environment is a good idea though - it tells you if anything has changed through pip override

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, good point!


- name: Run tests
# conda setup requires this special shell
Expand All @@ -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
Expand All @@ -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 }}
Expand Down
19 changes: 19 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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('..'))
Expand Down
3 changes: 2 additions & 1 deletion docs/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ dependencies:
- MDAnalysis
- ipython
- MDAnalysisTests
- sphinx_rtd_theme
# Pip-only installs
- pip:
- nbsphinx
- ipywidgets
- nglview
- nglview
1 change: 1 addition & 0 deletions membrane_curvature/data/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

26 changes: 14 additions & 12 deletions membrane_curvature/tests/datafiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 0 additions & 15 deletions readthedocs.yml

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
Expand Down