Skip to content

Commit

Permalink
Merge pull request #1243 from deeptools/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
WardDeb authored Aug 29, 2023
2 parents be3b947 + 292b492 commit 83f1929
Show file tree
Hide file tree
Showing 75 changed files with 818 additions and 1,009 deletions.
20 changes: 20 additions & 0 deletions .github/test_and_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
channels:
- conda-forge
- bioconda
dependencies:
- python >= 3.7
- numpy
- scipy
- flake8
- pysam
- deeptoolsintervals
- pytest
- samtools
- py2bit
- pyBigWig
- twine
- pip
- tomli # remove dependency when lowest supported version is py 3.11
- pip:
- build
- planemo
34 changes: 28 additions & 6 deletions .github/workflows/planemo.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
name: Planemo
on: [push, pull_request]

env:
GALAXY_BRANCH: release_22.05
GALAXY_BRANCH: release_23.1

defaults:
run:
shell: bash -l {0}

# setup micromamba doesn't work as galaxy setup by planemo requires conda.
# installing conda over into micromamba built env screws up the PATH
# setup-miniconda + changing over to libmamba to solve is the easiest workaround

jobs:
planemo_test:
name: Planemo test
Expand All @@ -10,12 +20,24 @@ jobs:
matrix:
chunk: [1, 2, 3]
steps:
- uses: actions/checkout@v1
- uses: "dpryan79/github-actions/@master"
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
auto-activate-base: true
- name: setup env
run: |
conda env list
conda install -n base conda-libmamba-solver
conda config --set solver libmamba
conda env create -f .github/test_and_build.yml -n test_and_build
- name: pip install
run: |
conda activate test_and_build
pip install .
- name: planemo
run: |
source activate foo
conda update -c conda-forge -c bioconda samtools
conda activate test_and_build
./.planemo.sh ${{ matrix.chunk }} ${{ env.GALAXY_BRANCH }}
- uses: actions/upload-artifact@v3
with:
Expand All @@ -27,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7']
python-version: ['3.7', '3.11']
steps:
- uses: actions/download-artifact@v3
with:
Expand Down
34 changes: 16 additions & 18 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
name: pypi

on:
create:
tags:

defaults:
run:
shell: bash -l {0}

jobs:
pypi:
name: upload to pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup conda
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@main
with:
environment-file: .github/test_and_build.yml
cache-downloads: true
environment-name: test_and_build
- name: build
run: |
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
- name: create env
run: |
export PATH=$HOME/miniconda/bin:$PATH
conda create -n foo -q --yes -c conda-forge -c bioconda python=3.7 twine
- name: sdist
run: |
export PATH=$HOME/miniconda/bin:$PATH
source activate foo
micromamba activate test_and_build
rm -f dist/*
python setup.py sdist
python -m build
- name: upload
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
export PATH=$HOME/miniconda/bin:$PATH
source activate foo
micromamba activate test_and_build
twine upload dist/*
74 changes: 60 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
name: Test
on: [push, pull_request]

defaults:
run:
shell: bash -l {0}

jobs:
check_versions_matches:
name: Check deeptools version matches galaxy tools
runs-on: ubuntu-latest
if: github.base_ref == 'master'
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Check path
run: find /home/runner/work/deepTools/deepTools -name "_version.py"
run: find /home/runner/work/deepTools/deepTools -name "pyproject.toml"
- name: Get Version of Deeptools
run: echo "deeptools_version=$(grep "__version__" /home/runner/work/deepTools/deepTools/deeptools/_version.py | awk '{print substr($NF, 2, length($NF) - 2)}')" >> $GITHUB_ENV
run: echo "deeptools_version=$(grep "version" /home/runner/work/deepTools/deepTools/pyproject.toml | awk '{print substr($NF, 2, length($NF) - 2)}')" >> $GITHUB_ENV
- name: Get Version of Galaxy tools
run: echo "galaxy_deeptools_version=$(grep "token.*TOOL_VERSION" /home/runner/work/deepTools/deepTools/galaxy/wrapper/deepTools_macros.xml | awk -F '>|<' '{print $3}')" >> $GITHUB_ENV
- name: Versions
Expand All @@ -35,32 +40,73 @@ jobs:
name: Test on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: "dpryan79/github-actions/@master"
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@main
with:
environment-file: .github/test_and_build.yml
cache-downloads: true
environment-name: test_and_build
- name: pip install
run: |
micromamba activate test_and_build
pip install .
- name: PEP8
run: |
source activate foo
micromamba activate test_and_build
flake8 . --exclude=.venv,.build,build --ignore=E501,F403,E402,F999,F405,E722,W504,W605
- name: Test deepTools
run: |
source activate foo
nosetests --with-doctest -sv deeptools
micromamba activate test_and_build
pytest -v
- name: make an artifact
run: |
source activate foo
micromamba activate test_and_build
rm -f dist/*
python setup.py sdist
python -m build
- uses: actions/upload-artifact@master
with:
name: "Dist files"
path: "dist"
test-wheels:
name: test wheel
runs-on: ubuntu-latest
needs: build-linux
strategy:
matrix:
python-version: ['3.7','3.8','3.9','3.10', '3.11']
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: "Dist files"
path: ~/dist/
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: install wheel
run: |
pip install ~/dist/*whl
deeptools -h
- name: pytest
run: |
pip install pytest
pytest -v
build-osx:
name: Test on OSX
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- uses: "dpryan79/github-actions/@master"
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@main
with:
environment-file: .github/test_and_build.yml
cache-downloads: true
environment-name: test_and_build
- name: pip install
run: |
micromamba activate test_and_build
pip install .
- name: Test deepTools
run: |
source activate foo
nosetests --with-doctest -sv deeptools
micromamba activate test_and_build
pytest -v
1 change: 1 addition & 0 deletions .planemo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ else
galaxy/wrapper/plotProfiler.xml"
fi

planemo --version
planemo lint ${wrappers}
planemo test --no_dependency_resolution --galaxy_branch $2 --install_galaxy ${wrappers} 2>&1
mkdir upload
Expand Down
10 changes: 10 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
3.5.3
* requirement cap for matplotlib lifted (changes in plotting can occur)
* nose has been deprecated in favor of pytests
* pytests run with python 3.7 - 3.11
* toml file for installation, requirements, versioning and executables
* planemo tests updated to galaxy 23.1
* custom github action runner deprecated
* deprecation of np types for builtin types
* stricter label checks and validator in galaxy

3.5.2
* new subcommand: Bigwig average #1169
* dendogram of plotCorrelation now matches each cell correctly
Expand Down
12 changes: 0 additions & 12 deletions bin/alignmentSieve

This file was deleted.

12 changes: 0 additions & 12 deletions bin/bamCompare

This file was deleted.

12 changes: 0 additions & 12 deletions bin/bamCoverage

This file was deleted.

12 changes: 0 additions & 12 deletions bin/bamPEFragmentSize

This file was deleted.

12 changes: 0 additions & 12 deletions bin/bigwigAverage

This file was deleted.

12 changes: 0 additions & 12 deletions bin/bigwigCompare

This file was deleted.

12 changes: 0 additions & 12 deletions bin/computeGCBias

This file was deleted.

14 changes: 0 additions & 14 deletions bin/computeMatrix

This file was deleted.

12 changes: 0 additions & 12 deletions bin/computeMatrixOperations

This file was deleted.

12 changes: 0 additions & 12 deletions bin/correctGCBias

This file was deleted.

Loading

0 comments on commit 83f1929

Please sign in to comment.