Skip to content

Commit 50e287a

Browse files
authored
Merge pull request #15 from moshi4/develop
Bump to v0.5.0
2 parents b540ae7 + 25f2aff commit 50e287a

File tree

14 files changed

+540
-3048
lines changed

14 files changed

+540
-3048
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,26 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest, macos-latest]
17-
python-version: ["3.8", "3.9", "3.10", "3.11"]
17+
python-version: ["3.9", "3.10", "3.11", "3.12"]
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

22-
- name: Setup Python ${{ matrix.python-version}}
23-
uses: actions/setup-python@v4
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
27-
- name: Install Poetry
22+
- name: Install Rye
2823
run: |
29-
curl -sSL https://install.python-poetry.org | python3 -
30-
echo "$HOME/.local/bin" >> $GITHUB_PATH
31-
32-
- name: Install Dependencies
33-
run: poetry install -n
24+
curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash
25+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
3426
35-
- name: Run black format check
36-
run: poetry run black src tests --check --diff --verbose
27+
- name: Setup Python ${{matrix.python-version}} & Dependencies
28+
run: |
29+
rye pin ${{ matrix.python-version }}
30+
rye sync --update-all --all-features
3731
3832
- name: Run ruff lint check
39-
run: poetry run ruff .
33+
run: rye run ruff check --diff
34+
35+
- name: Run ruff format check
36+
run: rye run ruff format --check --diff
4037

4138
- name: Run pytest
42-
run: poetry run pytest tests --tb=line --cov=src --cov-report=xml --cov-report=term
39+
run: rye run pytest

.github/workflows/publish_mkdocs.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

15-
- name: Setup Python 3.9
16-
uses: actions/setup-python@v4
17-
with:
18-
python-version: 3.9
19-
20-
- name: Install MkDocs & Plugins
15+
- name: Install Rye
2116
run: |
22-
pip install .
23-
pip install mkdocs mkdocs-material mkdocs-jupyter mkdocstrings[python] black
17+
curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash
18+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
19+
20+
- name: Install Python & MkDocs & Plugins
21+
run: rye sync
2422

2523
- name: Publish document
26-
run: mkdocs gh-deploy --force
24+
run: rye run mkdocs gh-deploy --force

.github/workflows/publish_to_pypi.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,15 @@ jobs:
1313
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717

18-
- name: Setup Python 3.9
19-
uses: actions/setup-python@v4
20-
with:
21-
python-version: 3.9
22-
23-
- name: Install Poetry
18+
- name: Install Rye
2419
run: |
25-
curl -sSL https://install.python-poetry.org | python3 -
26-
echo "$HOME/.local/bin" >> $GITHUB_PATH
20+
curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash
21+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
2722
2823
- name: Build
29-
run: poetry build
24+
run: rye build
3025

3126
- name: Publish
32-
run: poetry publish -u $PYPI_USERNAME -p $PYPI_PASSWORD
27+
run: rye publish -u $PYPI_USERNAME --token $PYPI_PASSWORD -y

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/astral-sh/ruff-pre-commit
5+
rev: v0.6.4
6+
hooks:
7+
- id: ruff
8+
name: ruff lint check
9+
args: [--fix]
10+
- id: ruff-format
11+
name: ruff format check

README.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ More detailed documentation is available [here](https://moshi4.github.io/pyMSAvi
3030

3131
## Installation
3232

33-
`Python 3.8 or later` is required for installation.
33+
`Python 3.9 or later` is required for installation.
3434

3535
**Install PyPI package:**
3636

@@ -110,28 +110,33 @@ pyMSAviz provides simple MSA visualization CLI.
110110

111111
### Options
112112

113-
-i I, --infile I Input MSA file
114-
-o O, --outfile O Output MSA visualization file (*.png|*.jpg|*.svg|*.pdf)
115-
--format MSA file format (Default: 'fasta')
116-
--color_scheme Color scheme (Default: 'Zappo')
117-
--start Start position of MSA visualization (Default: 1)
118-
--end End position of MSA visualization (Default: 'MSA Length')
119-
--wrap_length Wrap length (Default: None)
120-
--wrap_space_size Space size between wrap MSA plot area (Default: 3.0)
121-
--label_type Label type ('id'[default]|'description')
122-
--show_grid Show grid (Default: OFF)
123-
--show_count Show seq char count without gap on right side (Default: OFF)
124-
--show_consensus Show consensus sequence (Default: OFF)
125-
--consensus_color Consensus identity bar color (Default: '#1f77b4')
126-
--consensus_size Consensus identity bar height size (Default: 2.0)
127-
--sort Sort MSA order by NJ tree constructed from MSA distance matrix (Default: OFF)
128-
--dpi Figure DPI (Default: 300)
129-
-v, --version Print version information
130-
-h, --help Show this help message and exit
113+
$ pymsaviz --help
114+
usage: pymsaviz [options] -i msa.fa -o msa_viz.png
115+
116+
MSA(Multiple Sequence Alignment) visualization CLI tool
117+
118+
optional arguments:
119+
-i I, --infile I Input MSA file
120+
-o O, --outfile O Output MSA visualization file (*.png|*.jpg|*.svg|*.pdf)
121+
--format MSA file format (Default: 'fasta')
122+
--color_scheme Color scheme (Default: 'Zappo')
123+
--start Start position of MSA visualization (Default: 1)
124+
--end End position of MSA visualization (Default: 'MSA Length')
125+
--wrap_length Wrap length (Default: None)
126+
--wrap_space_size Space size between wrap MSA plot area (Default: 3.0)
127+
--label_type Label type ('id'[default]|'description')
128+
--show_grid Show grid (Default: OFF)
129+
--show_count Show seq char count without gap on right side (Default: OFF)
130+
--show_consensus Show consensus sequence (Default: OFF)
131+
--consensus_color Consensus identity bar color (Default: '#1f77b4')
132+
--consensus_size Consensus identity bar height size (Default: 2.0)
133+
--sort Sort MSA order by NJ tree constructed from MSA distance matrix (Default: OFF)
134+
--dpi Figure DPI (Default: 300)
135+
-v, --version Print version information
136+
-h, --help Show this help message and exit
131137

132138
Available Color Schemes:
133-
['Clustal', 'Zappo', 'Taylor', 'Flower', 'Blossom', 'Sunset', 'Ocean', 'Hydrophobicity', 'HelixPropensity',
134-
'StrandPropensity', 'TurnPropensity', 'BuriedIndex', 'Nucleotide', 'Purine/Pyrimidine', 'Identity', 'None']
139+
['Clustal', 'Zappo', 'Taylor', 'Flower', 'Blossom', 'Sunset', 'Ocean', 'Hydrophobicity', 'HelixPropensity', 'StrandPropensity', 'TurnPropensity', 'BuriedIndex', 'Nucleotide', 'Purine/Pyrimidine', 'Identity', 'None']
135140

136141
### CLI Example
137142

docs/cli-docs/pymsaviz.md

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,33 @@
88

99
### Options
1010

11-
-i I, --infile I Input MSA file
12-
-o O, --outfile O Output MSA visualization file (*.png|*.jpg|*.svg|*.pdf)
13-
--format MSA file format (Default: 'fasta')
14-
--color_scheme Color scheme (Default: 'Zappo')
15-
--start Start position of MSA visualization (Default: 1)
16-
--end End position of MSA visualization (Default: 'MSA Length')
17-
--wrap_length Wrap length (Default: None)
18-
--wrap_space_size Space size between wrap MSA plot area (Default: 3.0)
19-
--label_type Label type ('id'[default]|'description')
20-
--show_grid Show grid (Default: OFF)
21-
--show_count Show seq char count without gap on right side (Default: OFF)
22-
--show_consensus Show consensus sequence (Default: OFF)
23-
--consensus_color Consensus identity bar color (Default: '#1f77b4')
24-
--consensus_size Consensus identity bar height size (Default: 2.0)
25-
--sort Sort MSA order by NJ tree constructed from MSA distance matrix (Default: OFF)
26-
--dpi Figure DPI (Default: 300)
27-
-v, --version Print version information
28-
-h, --help Show this help message and exit
11+
$ pymsaviz --help
12+
usage: pymsaviz [options] -i msa.fa -o msa_viz.png
13+
14+
MSA(Multiple Sequence Alignment) visualization CLI tool
15+
16+
optional arguments:
17+
-i I, --infile I Input MSA file
18+
-o O, --outfile O Output MSA visualization file (*.png|*.jpg|*.svg|*.pdf)
19+
--format MSA file format (Default: 'fasta')
20+
--color_scheme Color scheme (Default: 'Zappo')
21+
--start Start position of MSA visualization (Default: 1)
22+
--end End position of MSA visualization (Default: 'MSA Length')
23+
--wrap_length Wrap length (Default: None)
24+
--wrap_space_size Space size between wrap MSA plot area (Default: 3.0)
25+
--label_type Label type ('id'[default]|'description')
26+
--show_grid Show grid (Default: OFF)
27+
--show_count Show seq char count without gap on right side (Default: OFF)
28+
--show_consensus Show consensus sequence (Default: OFF)
29+
--consensus_color Consensus identity bar color (Default: '#1f77b4')
30+
--consensus_size Consensus identity bar height size (Default: 2.0)
31+
--sort Sort MSA order by NJ tree constructed from MSA distance matrix (Default: OFF)
32+
--dpi Figure DPI (Default: 300)
33+
-v, --version Print version information
34+
-h, --help Show this help message and exit
2935

3036
Available Color Schemes:
31-
['Clustal', 'Zappo', 'Taylor', 'Flower', 'Blossom', 'Sunset', 'Ocean', 'Hydrophobicity', 'HelixPropensity',
32-
'StrandPropensity', 'TurnPropensity', 'BuriedIndex', 'Nucleotide', 'Purine/Pyrimidine', 'Identity', 'None']
37+
['Clustal', 'Zappo', 'Taylor', 'Flower', 'Blossom', 'Sunset', 'Ocean', 'Hydrophobicity', 'HelixPropensity', 'StrandPropensity', 'TurnPropensity', 'BuriedIndex', 'Nucleotide', 'Purine/Pyrimidine', 'Identity', 'None']
3338

3439
### Example Command
3540

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pyMSAviz was developed inspired by [Jalview](https://www.jalview.org/) and [ggms
2525

2626
## Installation
2727

28-
`Python 3.8 or later` is required for installation.
28+
`Python 3.9 or later` is required for installation.
2929

3030
**Install PyPI package:**
3131

0 commit comments

Comments
 (0)