rewrite BedGraphIO.py #659
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: MACS3 CI x64 | |
on: | |
push: | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
- 'ChangeLog' | |
- '.github/workflows/**' | |
- '!.github/workflows/build-and-test-MACS3-x64.yml' | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
- 'ChangeLog' | |
- '.github/workflows/**' | |
- '!.github/workflows/build-and-test-MACS3-x64.yml' | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
arch: ['x64'] | |
name: Build on x64 with Python ${{ matrix.python-version }} | |
steps: | |
- name: Checkout MACS | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: ${{ matrix.arch }} | |
- name: Cache pip | |
uses: actions/cache@v4 | |
with: | |
# This path is specific to Ubuntu | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: | | |
# make sure pip is the lastest | |
python3 -m pip install --upgrade pip | |
python3 -m pip install pytest | |
if [ -f requirements.txt ]; then python3 -m pip install --upgrade -r requirements.txt; fi | |
- name: Install MACS | |
run: | | |
# we use pip install instead of old fashion setup.py install | |
python3 -m pip install . | |
- name: Output versions of installed libraries | |
run: | | |
python3 -m pip freeze | |
- name: Test with pytest | |
run: | | |
pytest --runxfail | |
cd test | |
./cmdlinetest macs3 | |
cd .. | |
- name: Build sdist | |
run: | | |
python3 setup.py sdist | |
- name: Archive sdist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sdist-${{ matrix.arch }}-${{ matrix.python-version }} | |
path: | | |
dist/*.tar.gz | |