Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 20 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,33 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version}}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
- name: Install Rye
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH

- name: Install Dependencies
run: poetry install -n
- name: Setup Python ${{matrix.python-version}} & Dependencies
run: |
rye pin ${{ matrix.python-version }}
rye sync --update-all --all-features

- name: Run black format check
run: poetry run black src tests --check --diff --verbose
- name: Install external tool dependencies
run: |
sudo apt update -y
sudo apt install -y ncbi-blast+
if: ${{ matrix.os=='ubuntu-latest' }}

- name: Run ruff lint check
run: poetry run ruff .
run: rye run ruff check --diff

- name: Run ruff format check
run: rye run ruff format --check --diff

- name: Run pytest
run: poetry run pytest tests --tb=line --cov=src --cov-report=xml --cov-report=term
run: rye run pytest
19 changes: 8 additions & 11 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Publish to PyPI
on:
release:
types: [released]
workflow_dispatch:

jobs:
publish_to_pypi:
Expand All @@ -12,19 +13,15 @@ jobs:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install Dependencies
- name: Install Rye
run: |
python -m pip install --upgrade pip
pip install poetry poetry-dynamic-versioning
curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH

- name: Build
run: poetry build
run: rye build

- name: Publish
run: poetry publish -u $PYPI_USERNAME -p $PYPI_PASSWORD
run: rye publish -u $PYPI_USERNAME --token $PYPI_PASSWORD -y
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cog_download/
example/
output/
# example/
# output/
.vscode/

# Byte-compiled / optimized / DLL files
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.6
hooks:
- id: ruff
name: ruff lint check
types_or: [python, pyi]
args: [--fix]
- id: ruff-format
name: ruff format check
types_or: [python, pyi]
174 changes: 98 additions & 76 deletions README.md

Large diffs are not rendered by default.

18 changes: 0 additions & 18 deletions example/cogclassifier_example_api.py

This file was deleted.

70 changes: 0 additions & 70 deletions example/cogclassifier_example_run.sh

This file was deleted.

Binary file added example/example.zip
Binary file not shown.
28 changes: 0 additions & 28 deletions example/output/customize/classifier_count_add_no_classify.tsv

This file was deleted.

28 changes: 0 additions & 28 deletions example/output/customize/classifier_count_change_color.tsv

This file was deleted.

Loading