Skip to content

LDMS implementation for runtime I/O collection #830

LDMS implementation for runtime I/O collection

LDMS implementation for runtime I/O collection #830

Workflow file for this run

name: Python Testing
on:
push:
branches:
- main
paths:
- darshan-util/**
- include/**
pull_request:
branches:
- main
paths:
- darshan-util/**
- include/**
- .github/workflows/**
jobs:
test_pydarshan:
strategy:
matrix:
platform: [ubuntu-latest,
macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pytest pyflakes asv pytest-cov lxml matplotlib packaging humanize "mypy<1.0.0"
- if: ${{matrix.platform == 'macos-latest'}}
name: Install MacOS deps
run: |
brew install automake
- name: Install darshan-util
run: |
mkdir darshan_install
export DARSHAN_INSTALL_PATH=$PWD/darshan_install
git submodule update --init
./prepare.sh
cd darshan-util
mkdir build
cd build
../configure --prefix=$DARSHAN_INSTALL_PATH --enable-apxc-mod --enable-apmpi-mod
make
make install
make check
- name: Install pydarshan
run: |
cd darshan-util/pydarshan
python -m pip install .
# shim for importlib.resources on Python < 3.9
- if: ${{matrix.python-version < 3.9}}
name: Install importlib_resources
run: |
python -m pip install -U importlib_resources
# only install the darshan_logs project in some CI
# entries so we test proper handling of skips
# in test suite
- if: ${{matrix.python-version != 3.8}}
name: Install darshan_logs package
run: |
python -m pip install git+https://github.com/darshan-hpc/darshan-logs.git@main
- if: ${{matrix.python-version == 3.8}}
name: Use minimal deps
run: |
# uninstall deps that are not absolute requirements
# to make sure that i.e., tests skip appropriately
python -m pip uninstall -y lxml
- name: Test with pytest
run: |
export LD_LIBRARY_PATH=$PWD/darshan_install/lib
export DYLD_FALLBACK_LIBRARY_PATH=$PWD/darshan_install/lib
# the test suite should be portable
# to any directory--it must be possible
# to check HPC spack installs for example
cd $RUNNER_TEMP
site_packages=$(pip show darshan | grep Location | cut -d ' ' -f 2)
pytest -W error::FutureWarning -W error:"The join function was deprecated in Matplotlib" --pyargs darshan --cov-report xml --cov=$site_packages/darshan
- name: mypy check
run: |
export LD_LIBRARY_PATH=$PWD/darshan_install/lib
export DYLD_FALLBACK_LIBRARY_PATH=$PWD/darshan_install/lib
cd darshan-util/pydarshan
mypy darshan
- name: pyflakes check
run: |
cd darshan-util/pydarshan
pyflakes darshan/backend | (grep -E -i 'assigned to but never used' || exit 0 && exit 123)
- name: asv check
run: |
export LD_LIBRARY_PATH=$PWD/darshan_install/lib
export DYLD_FALLBACK_LIBRARY_PATH=$PWD/darshan_install/lib
cd darshan-util/pydarshan/benchmarks
python -m asv check -E existing
- name: codecov check
uses: codecov/codecov-action@v3
with:
files: $RUNNER_TEMP/coverage.xml,/home/runner/work/_temp/coverage.xml,/Users/runner/work/_temp/coverage.xml
fail_ci_if_error: False