Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
80 changes: 80 additions & 0 deletions .github/workflows/mdanalysis-compatability-matrix.yaml
Comment thread
harryswift01 marked this conversation as resolved.
Outdated
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: MDAnalysis Compatibility Matrix

on:
schedule:
- cron: '0 8 * * 1'
workflow_dispatch:

jobs:
mdanalysis_compatibility:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
mdanalysis-version: ["2.7.0", "2.8.0", "2.9.0", "latest"]
name: MDAnalysis v${{ matrix.mdanalysis-version }} / Python ${{ matrix.python-version }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies with MDAnalysis ${{ matrix.mdanalysis-version }}
run: |
pip install --upgrade pip
pip install -e .[testing]
if [ "${{ matrix.mdanalysis-version }}" = "latest" ]; then
pip install MDAnalysis
else
pip install "MDAnalysis==${{ matrix.mdanalysis-version }}"
fi

- name: Run tests
run: pytest --cov CodeEntropy --cov-report=term-missing --cov-append

- name: Create Issue on Failure
if: failure()
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pythonVersion = "${{ matrix.python-version }}";
const mdaVersion = "${{ matrix.mdanalysis-version }}";
const runNumber = "${{ github.run_number }}";
const runUrl = "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}";

const title = `CI Failure: MDAnalysis v${mdaVersion} / Python ${pythonVersion}`;
const body =
"### Automated MDAnalysis Compatibility Test Failure",
"",
`**MDAnalysis version**: \`${mdaVersion}\``,
`**Python version**: \`${pythonVersion}\``,
`**Workflow Run**: [Run #${runNumber}`,
"",
"Please investigate the failure and take necessary action."
].join("\n");

const { data: issues } = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
state: "open",
});

const issueExists = issues.some(issue => issue.title === title);

if (!issueExists) {
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title,
body,
labels: ["CI Failure", "MDAnalysis Compatibility"]
});
console.log("Issue created:", title);
} else {
console.log("An issue with this title already exists. Skipping creation.");
}
Comment thread
harryswift01 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: CodeEntropy CI

on:
push:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Comment thread
harryswift01 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ classifiers = [
"Development Status :: 4 - Beta"
]
keywords = ["entropy", "macromolecular systems", "MD simulation"]
requires-python = ">=3.8"
requires-python = ">=3.11"
dependencies = [
"numpy==2.2.3",
"mdanalysis==2.8.0",
"mdanalysis>=2.7.0",
"pandas==2.2.3",
"psutil==5.9.5",
"PyYAML==6.0.2",
Expand Down