Skip to content

Commit

Permalink
Merge pull request #15 from moshi4/develop
Browse files Browse the repository at this point in the history
Bump to v0.5.0
  • Loading branch information
moshi4 authored Sep 14, 2024
2 parents b540ae7 + 25f2aff commit 50e287a
Show file tree
Hide file tree
Showing 14 changed files with 540 additions and 3,048 deletions.
31 changes: 14 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,26 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["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
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
- name: Install Dependencies
run: poetry install -n
curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
- name: Run black format check
run: poetry run black src tests --check --diff --verbose
- name: Setup Python ${{matrix.python-version}} & Dependencies
run: |
rye pin ${{ matrix.python-version }}
rye sync --update-all --all-features
- 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
18 changes: 8 additions & 10 deletions .github/workflows/publish_mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@ 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
with:
python-version: 3.9

- name: Install MkDocs & Plugins
- name: Install Rye
run: |
pip install .
pip install mkdocs mkdocs-material mkdocs-jupyter mkdocstrings[python] black
curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
- name: Install Python & MkDocs & Plugins
run: rye sync

- name: Publish document
run: mkdocs gh-deploy --force
run: rye run mkdocs gh-deploy --force
17 changes: 6 additions & 11 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,15 @@ 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
with:
python-version: 3.9

- 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: 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
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.6.4
hooks:
- id: ruff
name: ruff lint check
args: [--fix]
- id: ruff-format
name: ruff format check
47 changes: 26 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ More detailed documentation is available [here](https://moshi4.github.io/pyMSAvi

## Installation

`Python 3.8 or later` is required for installation.
`Python 3.9 or later` is required for installation.

**Install PyPI package:**

Expand Down Expand Up @@ -110,28 +110,33 @@ pyMSAviz provides simple MSA visualization CLI.

### Options

-i I, --infile I Input MSA file
-o O, --outfile O Output MSA visualization file (*.png|*.jpg|*.svg|*.pdf)
--format MSA file format (Default: 'fasta')
--color_scheme Color scheme (Default: 'Zappo')
--start Start position of MSA visualization (Default: 1)
--end End position of MSA visualization (Default: 'MSA Length')
--wrap_length Wrap length (Default: None)
--wrap_space_size Space size between wrap MSA plot area (Default: 3.0)
--label_type Label type ('id'[default]|'description')
--show_grid Show grid (Default: OFF)
--show_count Show seq char count without gap on right side (Default: OFF)
--show_consensus Show consensus sequence (Default: OFF)
--consensus_color Consensus identity bar color (Default: '#1f77b4')
--consensus_size Consensus identity bar height size (Default: 2.0)
--sort Sort MSA order by NJ tree constructed from MSA distance matrix (Default: OFF)
--dpi Figure DPI (Default: 300)
-v, --version Print version information
-h, --help Show this help message and exit
$ pymsaviz --help
usage: pymsaviz [options] -i msa.fa -o msa_viz.png

MSA(Multiple Sequence Alignment) visualization CLI tool

optional arguments:
-i I, --infile I Input MSA file
-o O, --outfile O Output MSA visualization file (*.png|*.jpg|*.svg|*.pdf)
--format MSA file format (Default: 'fasta')
--color_scheme Color scheme (Default: 'Zappo')
--start Start position of MSA visualization (Default: 1)
--end End position of MSA visualization (Default: 'MSA Length')
--wrap_length Wrap length (Default: None)
--wrap_space_size Space size between wrap MSA plot area (Default: 3.0)
--label_type Label type ('id'[default]|'description')
--show_grid Show grid (Default: OFF)
--show_count Show seq char count without gap on right side (Default: OFF)
--show_consensus Show consensus sequence (Default: OFF)
--consensus_color Consensus identity bar color (Default: '#1f77b4')
--consensus_size Consensus identity bar height size (Default: 2.0)
--sort Sort MSA order by NJ tree constructed from MSA distance matrix (Default: OFF)
--dpi Figure DPI (Default: 300)
-v, --version Print version information
-h, --help Show this help message and exit

Available Color Schemes:
['Clustal', 'Zappo', 'Taylor', 'Flower', 'Blossom', 'Sunset', 'Ocean', 'Hydrophobicity', 'HelixPropensity',
'StrandPropensity', 'TurnPropensity', 'BuriedIndex', 'Nucleotide', 'Purine/Pyrimidine', 'Identity', 'None']
['Clustal', 'Zappo', 'Taylor', 'Flower', 'Blossom', 'Sunset', 'Ocean', 'Hydrophobicity', 'HelixPropensity', 'StrandPropensity', 'TurnPropensity', 'BuriedIndex', 'Nucleotide', 'Purine/Pyrimidine', 'Identity', 'None']

### CLI Example

Expand Down
45 changes: 25 additions & 20 deletions docs/cli-docs/pymsaviz.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,33 @@

### Options

-i I, --infile I Input MSA file
-o O, --outfile O Output MSA visualization file (*.png|*.jpg|*.svg|*.pdf)
--format MSA file format (Default: 'fasta')
--color_scheme Color scheme (Default: 'Zappo')
--start Start position of MSA visualization (Default: 1)
--end End position of MSA visualization (Default: 'MSA Length')
--wrap_length Wrap length (Default: None)
--wrap_space_size Space size between wrap MSA plot area (Default: 3.0)
--label_type Label type ('id'[default]|'description')
--show_grid Show grid (Default: OFF)
--show_count Show seq char count without gap on right side (Default: OFF)
--show_consensus Show consensus sequence (Default: OFF)
--consensus_color Consensus identity bar color (Default: '#1f77b4')
--consensus_size Consensus identity bar height size (Default: 2.0)
--sort Sort MSA order by NJ tree constructed from MSA distance matrix (Default: OFF)
--dpi Figure DPI (Default: 300)
-v, --version Print version information
-h, --help Show this help message and exit
$ pymsaviz --help
usage: pymsaviz [options] -i msa.fa -o msa_viz.png

MSA(Multiple Sequence Alignment) visualization CLI tool

optional arguments:
-i I, --infile I Input MSA file
-o O, --outfile O Output MSA visualization file (*.png|*.jpg|*.svg|*.pdf)
--format MSA file format (Default: 'fasta')
--color_scheme Color scheme (Default: 'Zappo')
--start Start position of MSA visualization (Default: 1)
--end End position of MSA visualization (Default: 'MSA Length')
--wrap_length Wrap length (Default: None)
--wrap_space_size Space size between wrap MSA plot area (Default: 3.0)
--label_type Label type ('id'[default]|'description')
--show_grid Show grid (Default: OFF)
--show_count Show seq char count without gap on right side (Default: OFF)
--show_consensus Show consensus sequence (Default: OFF)
--consensus_color Consensus identity bar color (Default: '#1f77b4')
--consensus_size Consensus identity bar height size (Default: 2.0)
--sort Sort MSA order by NJ tree constructed from MSA distance matrix (Default: OFF)
--dpi Figure DPI (Default: 300)
-v, --version Print version information
-h, --help Show this help message and exit

Available Color Schemes:
['Clustal', 'Zappo', 'Taylor', 'Flower', 'Blossom', 'Sunset', 'Ocean', 'Hydrophobicity', 'HelixPropensity',
'StrandPropensity', 'TurnPropensity', 'BuriedIndex', 'Nucleotide', 'Purine/Pyrimidine', 'Identity', 'None']
['Clustal', 'Zappo', 'Taylor', 'Flower', 'Blossom', 'Sunset', 'Ocean', 'Hydrophobicity', 'HelixPropensity', 'StrandPropensity', 'TurnPropensity', 'BuriedIndex', 'Nucleotide', 'Purine/Pyrimidine', 'Identity', 'None']

### Example Command

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pyMSAviz was developed inspired by [Jalview](https://www.jalview.org/) and [ggms

## Installation

`Python 3.8 or later` is required for installation.
`Python 3.9 or later` is required for installation.

**Install PyPI package:**

Expand Down
Loading

0 comments on commit 50e287a

Please sign in to comment.