Skip to content

Commit

Permalink
Major Upgrade v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
moshi4 committed May 18, 2024
1 parent 9f5d6f2 commit db2b314
Show file tree
Hide file tree
Showing 186 changed files with 133,763 additions and 21,308 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,30 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Install dependent tools for CLI workflow
run: |
sudo apt update -y
sudo apt install -y mummer progressivemauve
if: ${{ matrix.os=='ubuntu-latest'}}
- name: Install python dependencies
run: pip install -e . pytest pytest-cov ruff streamlit

- name: Install Poetry
- name: Install external dependencies
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install Dependencies
run: poetry install -n

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

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

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

- name: Run pytest
run: poetry run pytest tests --tb=line --cov=src --cov-report=xml --cov-report=term
run: pytest
8 changes: 4 additions & 4 deletions .github/workflows/publish_mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Install MkDocs & Plugins
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: Install Poetry
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Login to GHCR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker Build & Push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
push: true
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/stale_issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Close inactive issues
on:
schedule:
- cron: "0 0 * * *"

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
days-before-issue-stale: 14
days-before-issue-close: 14
exempt-issue-labels: "bug,documentation,enhancement"
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 14 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 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.4.3
hooks:
- id: ruff
name: ruff lint check
args: [--fix]
- id: ruff-format
name: ruff format check
13 changes: 13 additions & 0 deletions .streamlit/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[theme]
base = "dark"

[browser]
gatherUsageStats = false

[server]
runOnSave = true
maxUploadSize = 1

[logger]
messageFormat = "%(asctime)s | %(levelname)s | %(message)s"
level = "info"
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ authors:
- family-names: Shimoyama
given-names: Yuki
title: "pyGenomeViz: A genome visualization python package for comparative genomics"
date-released: 2022-06-20
date-released: 2024-05-18
url: https://github.com/moshi4/pyGenomeViz
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
FROM python:3.10-slim
FROM python:3.12-slim

# Install dependent aligner tools
RUN apt-get update && \
apt-get install -y mummer mmseqs2 progressivemauve
apt-get install -y ncbi-blast+ mummer mmseqs2 progressivemauve

# Install pyGenomeViz
RUN pip install -U pip && \
pip install pygenomeviz[gui] --no-cache-dir

# Download example dataset in advance
RUN pgv-download-dataset -n enterobacteria_phage
RUN pgv-download enterobacteria_phage --cache_only && \
pgv-download mycoplasma_mycoides --cache_only

CMD ["/bin/bash"]
Loading

0 comments on commit db2b314

Please sign in to comment.