diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index d0f5a0b..1a5a049 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -24,10 +24,32 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Build msyd - uses: schneebergerlab/msyd@main + # use old install manually + # since switching to conda no longer supports different python version + # - name: Build msyd + # uses: schneebergerlab/msyd@main + # # with: + # # python-version: ${{ matrix.python-version }} + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ inputs.python-version }} + cache: pip + - name: Update pip + run: python -m pip install --upgrade pip setuptools + shell: bash + - name: Install SyRI manually + run: | + # manually install syris dependencies + # the python version spoofing requires the --no-deps flag, so this is necessary + pip install Cython numpy pandas scipy psutil igraph longestrunsubsequence pysam pulp + # manually use pip to install syri from github, as it isn't on pypi + # spoof python version to get around bounds check + pip install 'git+https://github.com/schneebergerlab/syri.git' --python-version '3.10' --no-deps --no-warn-conflicts --target $(python -m site --user-site) + shell: bash + - name: Install other dependencies + run: pip install -r requirements.txt + shell: bash - name: Test installation run: | msyd --version diff --git a/.github/workflows/test_example.yml b/.github/workflows/test_example.yml index de8fa18..f88ec50 100644 --- a/.github/workflows/test_example.yml +++ b/.github/workflows/test_example.yml @@ -19,13 +19,13 @@ jobs: steps: - name: Build msyd uses: schneebergerlab/msyd@main - with: - python-version: "3.12" - - name: Install minimap2 manually # conda doesn't seem to work - run: | - curl -L https://github.com/lh3/minimap2/releases/download/v2.28/minimap2-2.28_x64-linux.tar.bz2 | tar -jxvf - - mv minimap2-2.28_x64-linux\/minimap2 ./ - ./minimap2 -h # test it worked & is callable + # with: + # python-version: "3.12" + # - name: Install minimap2 manually # conda doesn't seem to work + # run: | + # curl -L https://github.com/lh3/minimap2/releases/download/v2.28/minimap2-2.28_x64-linux.tar.bz2 | tar -jxvf - + # mv minimap2-2.28_x64-linux\/minimap2 ./ + # ./minimap2 -h # test it worked & is callable - name: Test example_run.sh run: ./.github/workflows/run_test_example.sh shell: bash diff --git a/action.yml b/action.yml index 405e062..9d78cfa 100644 --- a/action.yml +++ b/action.yml @@ -3,37 +3,42 @@ name: Build msyd description: "Checks out, installs dependencies and builds the msyd package. Formulated as a composite action to reduce code duplication in testing. Composite workflows cannot perserve state." -inputs: - python-version: - description: 'Python version to use' - required: true - default: '3.12' +#inputs: +# python-version: +# description: 'Python version to use' +# required: true +# default: '3.12' runs: using: composite steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ inputs.python-version }} - cache: pip - - name: Update pip - run: python -m pip install --upgrade pip setuptools - shell: bash - - name: Install SyRI manually + # - name: Set up Python ${{ inputs.python-version }} + # uses: actions/setup-python@v5 + # with: + # python-version: ${{ inputs.python-version }} + # cache: pip + # - name: Update pip + # run: python -m pip install --upgrade pip setuptools + # shell: bash + # - name: Install SyRI manually + # run: | + # # manually install syris dependencies + # # the python version spoofing requires the --no-deps flag, so this is necessary + # pip install Cython numpy pandas scipy psutil igraph longestrunsubsequence pysam pulp + # # manually use pip to install syri from github, as it isn't on pypi + # # spoof python version to get around bounds check + # pip install 'git+https://github.com/schneebergerlab/syri.git' --python-version '3.10' --no-deps --no-warn-conflicts --target $(python -m site --user-site) + # shell: bash + # - name: Install other dependencies + # run: pip install -r requirements.txt + # shell: bash + - name: Setup conda env run: | - # manually install syris dependencies - # the python version spoofing requires the --no-deps flag, so this is necessary - pip install Cython numpy pandas scipy psutil igraph longestrunsubsequence pysam pulp - # manually use pip to install syri from github, as it isn't on pypi - # spoof python version to get around bounds check - pip install 'git+https://github.com/schneebergerlab/syri.git' --python-version '3.10' --no-deps --no-warn-conflicts --target $(python -m site --user-site) - shell: bash - - name: Install other dependencies - run: pip install -r requirements.txt - shell: bash + $CONDA/bin/conda env create -n msyd --file ./environment.yml + $CONDA/bin/conda activate msyd + # python -m pip install mappy - name: Build msyd run: pip install . shell: bash