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

initial test #449

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
50 changes: 32 additions & 18 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on: [ push ]
Expand All @@ -13,32 +10,49 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
include:
- python-version: "3.10"
numpy-version: "2.1.3"
numpy-version: ["2.1.3"]
environment-manager: ["conda", "pip"]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
if: ${{ matrix.environment-manager == 'pip' }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- if: ${{ matrix.numpy-version}}
run: python -m pip install numpy==${{ matrix.numpy-version }}
- name: Install dependencies

- name: Set up Conda ${{ matrix.python-version }}
if: ${{ matrix.environment-manager == 'conda' }}
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
activate-environment: test-env
auto-activate-base: false

- name: Install dependencies with pip
if: ${{ matrix.environment-manager == 'pip' }}
run: |
python -m pip install --upgrade pip
python -m pip install numpy==${{ matrix.numpy-version }}
python -m pip install flake8 pytest
#python -m pip install mdtraj # removed as long as mdtraj is not supporting numpy2
# Install mdtraj if numpy compatibility is resolved
# python -m pip install mdtraj
python -m pip install .
if [ -f requirements.txt ]; then pip install --upgrade -r requirements.txt; fi
#- name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Install dependencies with Conda
if: ${{ matrix.environment-manager == 'conda' }}
run: |
conda install --yes numpy=${{ matrix.numpy-version }} flake8 pytest
conda install --yes pip
pip install --upgrade pip
# Install mdtraj if numpy compatibility is resolved
# pip install mdtraj
pip install .
if [ -f requirements.txt ]; then pip install --upgrade -r requirements.txt; fi

- name: Test with pytest
run: |
pytest pytim/ --doctest-modules
pytest pytim/ --doctest-modules