diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 773e125..bd3788a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: strategy: max-parallel: 5 matrix: - python: [3.8, 3.9, '3.10'] + python: ['3.11', '3.12'] fail-fast: false @@ -25,24 +25,26 @@ jobs: - name: install graphviz run: | + sudo apt-get update -qq sudo apt-get install -y graphviz - name: checkout git repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: conda/mamba - uses: mamba-org/provision-with-micromamba@main + uses: mamba-org/setup-micromamba@v2 with: environment-file: environment.yml - extra-specs: | + create-args: >- python=${{ matrix.python }} + cache-environment: true + cache-downloads: true - name: install package itself shell: bash -l {0} run: | pip install . - - name: Install dependencies shell: bash -l {0} run: | @@ -54,6 +56,7 @@ jobs: pytest -v --cov-report term-missing --cov=sequana_pipelines.ribofinder - name: coveralls + continue-on-error: true shell: bash -l {0} run: | echo $COVERALLS_REPO_TOKEN diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 435f810..5b1e408 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -8,11 +8,13 @@ on: jobs: build-n-publish: name: Build and publish to PyPI and TestPyPI - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest + permissions: + id-token: write steps: - - uses: actions/checkout@main - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - name: Set up Python 3.7 + uses: actions/setup-python@v5 with: python-version: 3.8 @@ -26,14 +28,13 @@ jobs: poetry build - name: Publish distribution to Test PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master with: - user: __token__ password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ + repository-url: https://test.pypi.org/legacy/ - name: Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: - user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/README.rst b/README.rst index 6c691f6..64e3cd0 100644 --- a/README.rst +++ b/README.rst @@ -9,10 +9,9 @@ .. image:: https://github.com/sequana/ribofinder/actions/workflows/main.yml/badge.svg :target: https://github.com/sequana/ribofinder/actions/workflows/main.yml -.. image:: https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C3.10-blue.svg - :target: https://pypi.python.org/pypi/sequana - :alt: Python 3.8 | 3.9 | 3.10 - +.. image:: https://img.shields.io/badge/python-3.11%20%7C%203.12-blue.svg + :target: https://pypi.python.org/pypi/sequana_ribofinder + :alt: Python 3.11 | 3.12 This is is the **ribofinder** pipeline from the `Sequana `_ project diff --git a/sequana_pipelines/ribofinder/main.py b/sequana_pipelines/ribofinder/main.py old mode 100755 new mode 100644 diff --git a/test/test_main.py b/test/test_main.py index f2b3ffa..091b00c 100644 --- a/test/test_main.py +++ b/test/test_main.py @@ -34,7 +34,7 @@ def test_full_rRNA_file(): cmd = f"sequana_ribofinder --input-directory {sharedir} " cmd += f"--working-directory {wk} --force --rRNA-file {sharedir}/feature.fasta" subprocess.call(cmd.split()) - stat = subprocess.call("sh ribofinder.sh".split(), cwd=wk) + stat = subprocess.call("bash ribofinder.sh".split(), cwd=wk) assert os.path.exists(wk + "/summary.html") def test_full_rRNA_extract(): @@ -43,15 +43,8 @@ def test_full_rRNA_extract(): cmd = f"sequana_ribofinder --input-directory {sharedir} " cmd += f"--working-directory {wk} --force --reference-file {sharedir}/Lepto.fa --gff-file {sharedir}/Lepto.gff" subprocess.call(cmd.split()) - stat = subprocess.call("sh ribofinder.sh".split(), cwd=wk) - - - if os.path.exists(wk + "/summary.html"): - pass - else: - with open(f"{wk}/indexing/bowtie_rRNA.log", "r") as fout: - print(fout.read()) - raise IOError + stat = subprocess.call("bash ribofinder.sh".split(), cwd=wk) + assert os.path.exists(wk + "/summary.html") def test_version(): cmd = "sequana_ribofinder --version"