phanotate-rs 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. phanotate_rs-0.1.3/.gitattributes +2 -0
  2. phanotate_rs-0.1.3/.github/workflows/bioconda.yml.disabled +151 -0
  3. phanotate_rs-0.1.3/.github/workflows/pypi.yml +143 -0
  4. phanotate_rs-0.1.3/.github/workflows/python-tests.yml +77 -0
  5. phanotate_rs-0.1.3/.github/workflows/release.yml +106 -0
  6. phanotate_rs-0.1.3/.github/workflows/rust-tests.yml +78 -0
  7. phanotate_rs-0.1.3/.gitignore +3 -0
  8. phanotate_rs-0.1.3/CHANGELOG.md +110 -0
  9. phanotate_rs-0.1.3/Cargo.lock +1317 -0
  10. phanotate_rs-0.1.3/Cargo.toml +43 -0
  11. phanotate_rs-0.1.3/LICENSE +703 -0
  12. phanotate_rs-0.1.3/PKG-INFO +7 -0
  13. phanotate_rs-0.1.3/README.md +387 -0
  14. phanotate_rs-0.1.3/VERSION +1 -0
  15. phanotate_rs-0.1.3/benches/README.md +94 -0
  16. phanotate_rs-0.1.3/benches/baseline.txt +12 -0
  17. phanotate_rs-0.1.3/benches/baseline_flamegraph.svg +1 -0
  18. phanotate_rs-0.1.3/benches/baseline_perf_report.txt +393 -0
  19. phanotate_rs-0.1.3/benches/phanotate_benchmark.rs +43 -0
  20. phanotate_rs-0.1.3/bump-version.sh +115 -0
  21. phanotate_rs-0.1.3/install.sh +135 -0
  22. phanotate_rs-0.1.3/memory/progress_2026-06-06.md +168 -0
  23. phanotate_rs-0.1.3/packaging/conda/bld.bat +3 -0
  24. phanotate_rs-0.1.3/packaging/conda/build.sh +7 -0
  25. phanotate_rs-0.1.3/packaging/conda/meta.yaml +57 -0
  26. phanotate_rs-0.1.3/packaging/homebrew/phanotate-rs.rb +17 -0
  27. phanotate_rs-0.1.3/pyproject.toml +13 -0
  28. phanotate_rs-0.1.3/src/bellman_ford.rs +258 -0
  29. phanotate_rs-0.1.3/src/codon_table.rs +452 -0
  30. phanotate_rs-0.1.3/src/detect_table.rs +1259 -0
  31. phanotate_rs-0.1.3/src/gcfp.rs +221 -0
  32. phanotate_rs-0.1.3/src/genome.rs +191 -0
  33. phanotate_rs-0.1.3/src/graph.rs +525 -0
  34. phanotate_rs-0.1.3/src/lib.rs +19 -0
  35. phanotate_rs-0.1.3/src/lib_python.rs +1091 -0
  36. phanotate_rs-0.1.3/src/main.rs +645 -0
  37. phanotate_rs-0.1.3/src/orf.rs +1263 -0
  38. phanotate_rs-0.1.3/src/output.rs +543 -0
  39. phanotate_rs-0.1.3/src/weights.rs +133 -0
  40. phanotate_rs-0.1.3/tests/cli_tests.rs +365 -0
  41. phanotate_rs-0.1.3/tests/data/100_genomes_accessions.txt +114 -0
  42. phanotate_rs-0.1.3/tests/detect_table_tests.rs +640 -0
  43. phanotate_rs-0.1.3/tests/golden/NC_000866.1.tabular +299 -0
  44. phanotate_rs-0.1.3/tests/golden/NC_001416.1.tabular +90 -0
  45. phanotate_rs-0.1.3/tests/golden/crass_BK025033.fa +1977 -0
  46. phanotate_rs-0.1.3/tests/golden/crass_infant_BK025033.fa +1977 -0
  47. phanotate_rs-0.1.3/tests/golden/lambda_NC001416.fa +694 -0
  48. phanotate_rs-0.1.3/tests/golden/phiX174.fasta_out +14 -0
  49. phanotate_rs-0.1.3/tests/golden/phiX174.genbank +108 -0
  50. phanotate_rs-0.1.3/tests/golden/phiX174.tabular +9 -0
  51. phanotate_rs-0.1.3/tests/golden/spv4_NC003438.fa +65 -0
  52. phanotate_rs-0.1.3/tests/test_python_bindings.py +451 -0
@@ -0,0 +1,2 @@
1
+ # SCM syntax highlighting & preventing 3-way merges
2
+ pixi.lock merge=binary linguist-language=YAML linguist-generated=true
@@ -0,0 +1,151 @@
1
+ name: Bioconda Recipe Update
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+ workflow_dispatch:
8
+ inputs:
9
+ version:
10
+ description: 'Version to publish (e.g., 0.1.2)'
11
+ required: true
12
+ type: string
13
+
14
+ permissions:
15
+ contents: write
16
+
17
+ jobs:
18
+ update-bioconda-recipe:
19
+ name: Update Bioconda Recipe
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+
24
+ - name: Determine version
25
+ id: version
26
+ run: |
27
+ if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
28
+ VERSION="${{ inputs.version }}"
29
+ else
30
+ VERSION="${GITHUB_REF_NAME#v}"
31
+ fi
32
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
33
+ echo "Publishing version: $VERSION"
34
+
35
+ - name: Compute SHA256 of release tarball
36
+ id: sha256
37
+ run: |
38
+ VERSION="${{ steps.version.outputs.version }}"
39
+ URL="https://github.com/Yasas1994/PHANOTATE-rs/archive/refs/tags/v${VERSION}.tar.gz"
40
+ echo "Downloading $URL ..."
41
+ SHA256=$(curl -sL "$URL" | sha256sum | cut -d' ' -f1)
42
+ echo "sha256=$SHA256" >> "$GITHUB_OUTPUT"
43
+ echo "SHA256: $SHA256"
44
+
45
+ - name: Update packaging files with computed SHA256
46
+ run: |
47
+ VERSION="${{ steps.version.outputs.version }}"
48
+ SHA256="${{ steps.sha256.outputs.sha256 }}"
49
+
50
+ # Update conda recipe
51
+ sed -i "s/{% set version = \"[^\"]*\" %}/{% set version = \"$VERSION\" %}/" packaging/conda/meta.yaml
52
+ sed -i "s/sha256: .*/sha256: $SHA256/" packaging/conda/meta.yaml
53
+
54
+ # Update Homebrew formula
55
+ sed -i "s|refs/tags/v[^/]*\.tar\.gz|refs/tags/v${VERSION}.tar.gz|" packaging/homebrew/phanotate-rs.rb
56
+ sed -i "s/sha256 \"[^\"]*\"/sha256 \"$SHA256\"/" packaging/homebrew/phanotate-rs.rb
57
+
58
+ echo "Updated packaging files:"
59
+ grep -E "version|sha256|url" packaging/conda/meta.yaml
60
+ grep -E "url|sha256" packaging/homebrew/phanotate-rs.rb
61
+
62
+ - name: Upload recipe artifacts
63
+ uses: actions/upload-artifact@v4
64
+ with:
65
+ name: bioconda-recipe-${{ steps.version.outputs.version }}
66
+ path: packaging/conda/
67
+
68
+ - name: Create Pull Request to bioconda-recipes
69
+ env:
70
+ GH_TOKEN: ${{ secrets.BIOCONDA_PR_TOKEN }}
71
+ run: |
72
+ VERSION="${{ steps.version.outputs.version }}"
73
+ SHA256="${{ steps.sha256.outputs.sha256 }}"
74
+
75
+ if [ -z "$GH_TOKEN" ]; then
76
+ echo "⚠️ BIOCONDA_PR_TOKEN not set. Skipping automated PR creation."
77
+ echo ""
78
+ echo "To enable automatic PRs:"
79
+ echo " 1. Create a Personal Access Token with 'repo' scope"
80
+ echo " 2. Add it as a repository secret named BIOCONDA_PR_TOKEN"
81
+ echo ""
82
+ echo "Manual submission instructions:"
83
+ echo " 1. Fork https://github.com/bioconda/bioconda-recipes"
84
+ echo " 2. Create branch: recipes/phanotate-rs"
85
+ echo " 3. Copy packaging/conda/meta.yaml to recipes/phanotate-rs/meta.yaml"
86
+ echo " 4. Submit PR with title: 'Update phanotate-rs to $VERSION'"
87
+ exit 0
88
+ fi
89
+
90
+ # Clone bioconda-recipes fork
91
+ git clone "https://x-access-token:${GH_TOKEN}@github.com/Yasas1994/bioconda-recipes.git" /tmp/bioconda-recipes
92
+ cd /tmp/bioconda-recipes
93
+ git remote add upstream https://github.com/bioconda/bioconda-recipes.git
94
+ git fetch upstream
95
+
96
+ # Create or update branch
97
+ BRANCH="update-phanotate-rs-${VERSION}"
98
+ git checkout -b "$BRANCH" upstream/master || git checkout -b "$BRANCH"
99
+
100
+ # Create/update recipe directory
101
+ mkdir -p recipes/phanotate-rs
102
+ cp "$GITHUB_WORKSPACE/packaging/conda/meta.yaml" recipes/phanotate-rs/meta.yaml
103
+
104
+ # Commit and push
105
+ git config user.name "github-actions[bot]"
106
+ git config user.email "github-actions[bot]@users.noreply.github.com"
107
+ git add recipes/phanotate-rs/meta.yaml
108
+ git commit -m "Update phanotate-rs to ${VERSION}
109
+
110
+ Update recipe for phanotate-rs ${VERSION}.
111
+
112
+ Changes:
113
+ - Version: ${VERSION}
114
+ - SHA256: ${SHA256}
115
+
116
+ Auto-generated by GitHub Actions."
117
+ git push -f origin "$BRANCH"
118
+
119
+ # Create PR
120
+ gh pr create \
121
+ --repo bioconda/bioconda-recipes \
122
+ --head "Yasas1994:${BRANCH}" \
123
+ --base master \
124
+ --title "Update phanotate-rs to ${VERSION}" \
125
+ --body "Update phanotate-rs from ${VERSION}.
126
+
127
+ **Changes:**
128
+ - Version bump to ${VERSION}
129
+ - SHA256: \`${SHA256}\`
130
+
131
+ **Checklist:**
132
+ - [x] Recipe updated with new version and SHA256
133
+ - [x] Uses existing build script (cargo install)
134
+ - [x] License: GPL-3.0
135
+
136
+ cc: @yasaswijesekara"
137
+
138
+ - name: Summary
139
+ run: |
140
+ echo ""
141
+ echo "========================================"
142
+ echo " Bioconda Recipe Update Summary"
143
+ echo "========================================"
144
+ echo "Version: ${{ steps.version.outputs.version }}"
145
+ echo "SHA256: ${{ steps.sha256.outputs.sha256 }}"
146
+ echo ""
147
+ echo "Recipe artifact uploaded."
148
+ echo ""
149
+ echo "If BIOCONDA_PR_TOKEN is configured, a PR was"
150
+ echo "automatically created to bioconda-recipes."
151
+ echo "========================================"
@@ -0,0 +1,143 @@
1
+ name: Build and Publish Python Wheels
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+ workflow_dispatch:
8
+ inputs:
9
+ publish:
10
+ description: 'Publish to PyPI (true/false)'
11
+ required: false
12
+ default: 'false'
13
+ type: string
14
+
15
+ permissions:
16
+ contents: read
17
+
18
+ env:
19
+ # macOS deployment target — must be high enough for modern systems
20
+ # while keeping backward compatibility. 14.0 covers macOS Sonoma+.
21
+ MACOSX_DEPLOYMENT_TARGET: "14.0"
22
+
23
+ jobs:
24
+ # ---------------------------------------------------------------------------
25
+ # Build wheels for all platforms using maturin-action
26
+ # ---------------------------------------------------------------------------
27
+ build-wheels:
28
+ name: Build wheels (${{ matrix.target }})
29
+ runs-on: ${{ matrix.os }}
30
+ strategy:
31
+ fail-fast: false
32
+ matrix:
33
+ include:
34
+ # Linux
35
+ - os: ubuntu-latest
36
+ target: x86_64
37
+ manylinux: auto
38
+ # macOS
39
+ - os: macos-latest
40
+ target: universal2-apple-darwin
41
+ manylinux: ''
42
+ # Windows
43
+ - os: windows-latest
44
+ target: x86_64-pc-windows-msvc
45
+ manylinux: ''
46
+
47
+ steps:
48
+ - uses: actions/checkout@v4
49
+
50
+ - name: Build wheels
51
+ uses: PyO3/maturin-action@v1
52
+ env:
53
+ # macOS runners may have Python 3.14 which PyO3 0.22 doesn't support.
54
+ # This tells PyO3 to use the stable ABI and build anyway.
55
+ PYO3_USE_ABI3_FORWARD_COMPATIBILITY: 1
56
+ with:
57
+ target: ${{ matrix.target }}
58
+ manylinux: ${{ matrix.manylinux || '' }}
59
+ args: --release --out dist
60
+
61
+ - name: Upload wheels
62
+ uses: actions/upload-artifact@v4
63
+ with:
64
+ name: wheels-${{ matrix.os }}-${{ matrix.target }}
65
+ path: dist/*.whl
66
+
67
+ # ---------------------------------------------------------------------------
68
+ # Build source distribution
69
+ # ---------------------------------------------------------------------------
70
+ build-sdist:
71
+ name: Build source distribution
72
+ runs-on: ubuntu-latest
73
+ steps:
74
+ - uses: actions/checkout@v4
75
+
76
+ - name: Install Rust
77
+ uses: dtolnay/rust-toolchain@stable
78
+
79
+ - name: Set up Python
80
+ uses: actions/setup-python@v5
81
+ with:
82
+ python-version: '3.12'
83
+
84
+ - name: Install maturin
85
+ run: pip install maturin
86
+
87
+ - name: Build sdist
88
+ run: maturin sdist --out dist
89
+
90
+ - name: Upload sdist
91
+ uses: actions/upload-artifact@v4
92
+ with:
93
+ name: sdist
94
+ path: dist/*.tar.gz
95
+
96
+ # ---------------------------------------------------------------------------
97
+ # Publish to PyPI (only on tag pushes or explicit workflow dispatch)
98
+ # Uses trusted publishing (OIDC) — no API token needed.
99
+ #
100
+ # Setup required on PyPI:
101
+ # 1. Go to https://pypi.org/manage/project/phanotate-rs/settings/publishing/
102
+ # 2. Add a new pending publisher:
103
+ # Owner: Yasas1994
104
+ # Repository: PHANOTATE-rs
105
+ # Workflow: pypi.yml
106
+ # Environment: pypi
107
+ # ---------------------------------------------------------------------------
108
+ publish-pypi:
109
+ name: Publish to PyPI
110
+ needs: [build-wheels, build-sdist]
111
+ runs-on: ubuntu-latest
112
+ if: |
113
+ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) ||
114
+ (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true')
115
+ environment:
116
+ name: pypi
117
+ url: https://pypi.org/p/phanotate-rs
118
+ permissions:
119
+ id-token: write # Required for trusted publishing (OIDC)
120
+
121
+ steps:
122
+ - name: Download wheel artifacts
123
+ uses: actions/download-artifact@v4
124
+ with:
125
+ path: dist
126
+ pattern: 'wheels-*'
127
+ merge-multiple: true
128
+
129
+ - name: Download sdist artifact
130
+ uses: actions/download-artifact@v4
131
+ with:
132
+ path: dist
133
+ name: sdist
134
+ merge-multiple: true
135
+
136
+ - name: List distributions
137
+ run: find dist -type f -ls
138
+
139
+ - name: Publish to PyPI
140
+ uses: pypa/gh-action-pypi-publish@release/v1
141
+ with:
142
+ packages-dir: dist/
143
+ skip-existing: true
@@ -0,0 +1,77 @@
1
+ name: Python Bindings Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - 'src/**'
8
+ - 'tests/test_python_bindings.py'
9
+ - 'Cargo.toml'
10
+ - 'pyproject.toml'
11
+ - '.github/workflows/python-tests.yml'
12
+ pull_request:
13
+ branches: [main]
14
+ paths:
15
+ - 'src/**'
16
+ - 'tests/test_python_bindings.py'
17
+ - 'Cargo.toml'
18
+ - 'pyproject.toml'
19
+ - '.github/workflows/python-tests.yml'
20
+
21
+ permissions:
22
+ contents: read
23
+
24
+ jobs:
25
+ test-python-bindings:
26
+ name: Test Python bindings (${{ matrix.os }}, Python ${{ matrix.python }})
27
+ runs-on: ${{ matrix.os }}
28
+ strategy:
29
+ fail-fast: false
30
+ matrix:
31
+ os: [ubuntu-latest, macos-latest, windows-latest]
32
+ python: ['3.9', '3.12']
33
+ include:
34
+ - os: macos-latest
35
+ python: '3.13'
36
+
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+
40
+ - name: Install Rust
41
+ uses: dtolnay/rust-toolchain@stable
42
+
43
+ - name: Set up Python ${{ matrix.python }}
44
+ uses: actions/setup-python@v5
45
+ with:
46
+ python-version: ${{ matrix.python }}
47
+
48
+ - name: Install dependencies
49
+ run: |
50
+ python -m pip install --upgrade pip
51
+ pip install pytest maturin
52
+
53
+ - name: Build and install Python bindings
54
+ run: |
55
+ # Create a virtualenv for maturin develop
56
+ python -m venv .venv
57
+ if [ "${{ matrix.os }}" = "windows-latest" ]; then
58
+ source .venv/Scripts/activate
59
+ else
60
+ source .venv/bin/activate
61
+ fi
62
+ pip install pytest
63
+ maturin develop
64
+ shell: bash
65
+
66
+ - name: Run Python tests
67
+ run: |
68
+ if [ "${{ matrix.os }}" = "windows-latest" ]; then
69
+ source .venv/Scripts/activate
70
+ else
71
+ source .venv/bin/activate
72
+ fi
73
+ pytest tests/test_python_bindings.py -v
74
+ shell: bash
75
+
76
+ - name: Run Rust tests (unit tests only)
77
+ run: cargo test --lib -- --skip debug_ --skip regression_ --skip lambda_ --skip table4_
@@ -0,0 +1,106 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ build:
13
+ name: Build ${{ matrix.target }}
14
+ runs-on: ${{ matrix.os }}
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ include:
19
+ - target: x86_64-unknown-linux-gnu
20
+ os: ubuntu-latest
21
+ - target: x86_64-unknown-linux-musl
22
+ os: ubuntu-latest
23
+ - target: aarch64-unknown-linux-gnu
24
+ os: ubuntu-latest
25
+ - target: x86_64-apple-darwin
26
+ os: macos-latest
27
+ - target: aarch64-apple-darwin
28
+ os: macos-latest
29
+ - target: x86_64-pc-windows-msvc
30
+ os: windows-latest
31
+
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+
35
+ - name: Install Rust
36
+ uses: dtolnay/rust-toolchain@stable
37
+ with:
38
+ targets: ${{ matrix.target }}
39
+
40
+ - name: Install cross-compilation tools (Linux)
41
+ if: matrix.target == 'aarch64-unknown-linux-gnu'
42
+ run: |
43
+ sudo apt-get update
44
+ sudo apt-get install -y gcc-aarch64-linux-gnu
45
+
46
+ - name: Build release binary
47
+ run: cargo build --release --target ${{ matrix.target }}
48
+ env:
49
+ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
50
+
51
+ - name: Package (Unix)
52
+ if: matrix.os != 'windows-latest'
53
+ run: |
54
+ cd target/${{ matrix.target }}/release
55
+ tar czf ../../../phanotate-rs-${{ matrix.target }}.tar.gz phanotate-rs
56
+ cd ../../..
57
+
58
+ - name: Package (Windows)
59
+ if: matrix.os == 'windows-latest'
60
+ run: |
61
+ cd target/${{ matrix.target }}/release
62
+ 7z a ../../../phanotate-rs-${{ matrix.target }}.zip phanotate-rs.exe
63
+ cd ../../..
64
+
65
+ - name: Upload artifact
66
+ uses: actions/upload-artifact@v4
67
+ with:
68
+ name: phanotate-rs-${{ matrix.target }}
69
+ path: |
70
+ phanotate-rs-*.tar.gz
71
+ phanotate-rs-*.zip
72
+
73
+ release:
74
+ name: Create GitHub Release
75
+ needs: build
76
+ runs-on: ubuntu-latest
77
+ steps:
78
+ - uses: actions/checkout@v4
79
+
80
+ - name: Download all artifacts
81
+ uses: actions/download-artifact@v4
82
+ with:
83
+ path: artifacts
84
+ merge-multiple: true
85
+
86
+ - name: Create Release
87
+ uses: softprops/action-gh-release@v2
88
+ with:
89
+ files: artifacts/*
90
+ generate_release_notes: true
91
+
92
+ - name: Release Summary
93
+ run: |
94
+ echo "========================================"
95
+ echo " Release ${{ github.ref_name }} Complete"
96
+ echo "========================================"
97
+ echo ""
98
+ echo "Artifacts published to GitHub Release:"
99
+ ls -la artifacts/
100
+ echo ""
101
+ echo "Other workflows triggered:"
102
+ echo " • PyPI wheels: .github/workflows/pypi.yml"
103
+ echo " • Bioconda recipe: .github/workflows/bioconda.yml"
104
+ echo ""
105
+ echo "PyPI package: https://pypi.org/project/phanotate-rs/"
106
+ echo "========================================"
@@ -0,0 +1,78 @@
1
+ name: Rust Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - 'src/**'
8
+ - 'tests/**'
9
+ - 'Cargo.toml'
10
+ - 'Cargo.lock'
11
+ - '.github/workflows/rust-tests.yml'
12
+ pull_request:
13
+ branches: [main]
14
+ paths:
15
+ - 'src/**'
16
+ - 'tests/**'
17
+ - 'Cargo.toml'
18
+ - 'Cargo.lock'
19
+ - '.github/workflows/rust-tests.yml'
20
+
21
+ permissions:
22
+ contents: read
23
+
24
+ env:
25
+ CARGO_TERM_COLOR: always
26
+
27
+ jobs:
28
+ test:
29
+ name: Test (${{ matrix.os }})
30
+ runs-on: ${{ matrix.os }}
31
+ strategy:
32
+ fail-fast: false
33
+ matrix:
34
+ os: [ubuntu-latest, macos-latest, windows-latest]
35
+
36
+ steps:
37
+ - uses: actions/checkout@v4
38
+
39
+ - name: Install Rust
40
+ uses: dtolnay/rust-toolchain@stable
41
+
42
+ - name: Cache cargo registry
43
+ uses: actions/cache@v4
44
+ with:
45
+ path: ~/.cargo/registry
46
+ key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
47
+
48
+ - name: Cache cargo index
49
+ uses: actions/cache@v4
50
+ with:
51
+ path: ~/.cargo/git
52
+ key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
53
+
54
+ - name: Cache cargo build
55
+ uses: actions/cache@v4
56
+ with:
57
+ path: target
58
+ key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
59
+
60
+ - name: Run unit tests
61
+ run: cargo test --lib -- --skip debug_ --skip regression_ --skip lambda_ --skip table4_
62
+
63
+ - name: Run integration tests
64
+ # Skip tests that require files from the external PHANOTATE repo
65
+ shell: bash
66
+ run: |
67
+ cargo test --test cli_tests -- \
68
+ --skip phix174 --skip sco --skip lambda --skip table4 --skip regression \
69
+ --skip flag_f_gbk --skip flag_f_gff --skip flag_f_sco --skip flag_g_table \
70
+ --skip flag_a_protein --skip flag_d_nucleotide --skip flag_i_stdin
71
+ cargo test --test detect_table_tests -- \
72
+ --skip batch --skip pipe --skip confidence --skip table11 --skip yes_flag
73
+
74
+ - name: Check formatting
75
+ run: cargo fmt -- --check
76
+
77
+ - name: Run Clippy
78
+ run: cargo clippy -- -D warnings
@@ -0,0 +1,3 @@
1
+ /target
2
+ /tests/test_genomes
3
+
@@ -0,0 +1,110 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ - **Python bindings** via PyO3 — `import phanotate_rs` from Python
13
+ - `phanotate()` — full gene-calling pipeline with all CLI options exposed as kwargs
14
+ - `find_orfs()` — low-level ORF finder returning structured `Orf` objects
15
+ - `detect_table()` — automatic translation-table detection returning `TableScore` objects
16
+ - `translate()` — DNA-to-protein translation using NCBI tables
17
+ - `score_rbs()` — Shine-Dalgarno scoring
18
+ - `supported_tables()`, `stop_codons()`, `start_codons()`, `table_name()` — codon-table utilities
19
+ - Python classes: `Orf`, `Gene`, `TableScore` with full attribute access
20
+ - `pyproject.toml` — maturin configuration for Python wheel builds
21
+ - `src/lib_python.rs` — PyO3 module implementation
22
+ - `tests/test_python_bindings.py` — 51 Python tests covering all bindings
23
+ - `.github/workflows/pypi.yml` — automated PyPI publishing via trusted publishing (OIDC)
24
+ - `.github/workflows/python-tests.yml` — CI for Python bindings across platforms
25
+ - `bump-version.sh` now bumps `pyproject.toml` version and documents PyPI setup steps
26
+
27
+ ### Changed
28
+
29
+ - `.github/workflows/release.yml` — added release summary mentioning PyPI and bioconda workflows
30
+ - `src/lib.rs` — includes `lib_python` module for PyO3 bindings
31
+ - `Cargo.toml` — added `pyo3` dependency and `cdylib` crate-type for Python extension builds
32
+
33
+ ## [0.1.3] — 2025-06-08
34
+
35
+ ### Added
36
+
37
+ - GitHub Actions workflow for PyPI publishing (`pypi.yml`)
38
+ - GitHub Actions workflow for Python bindings CI testing (`python-tests.yml`)
39
+ - Python test suite (`tests/test_python_bindings.py`)
40
+
41
+ ### Fixed
42
+
43
+ - macOS wheel deployment target set to `14.0` for modern system compatibility
44
+
45
+ ## [0.1.2] — 2026-06-02
46
+
47
+ ### Added
48
+
49
+ - `bump-version.sh` — automated version bumper for all packaging files
50
+ - `VERSION` file — single source of truth for version number
51
+ - `.github/workflows/bioconda.yml` — automated bioconda recipe update PRs
52
+ - `packaging/conda/` — Conda recipe template
53
+ - `packaging/homebrew/` — Homebrew formula template
54
+ - `cargo-bundle-licenses` integration for compliance
55
+
56
+ ### Changed
57
+
58
+ - README badges and documentation improvements
59
+ - Benchmark results split into single-thread vs multi-thread comparisons
60
+ - Added Prodigal-gv to large-scale benchmark comparison
61
+
62
+ ## [0.1.1] — 2026-06-02
63
+
64
+ ### Added
65
+
66
+ - Large-scale benchmark results (100 phage genomes)
67
+ - 100-genome benchmark dataset accession list
68
+ - Intersection and unique predictions analysis in benchmark table
69
+
70
+ ### Fixed
71
+
72
+ - Bioconda recipe: removed standalone cargo dependency, added build scripts
73
+
74
+ ## [0.1.0] — 2026-06-02
75
+
76
+ ### Added
77
+
78
+ - Initial Rust implementation of PHANOTATE gene caller
79
+ - Automatic genetic-code detection (`--detect-table`, `--detect-table-batch`)
80
+ - Support for 6 NCBI translation tables: 1, 4, 6, 11, 15, 25
81
+ - Multi-threaded processing via Rayon
82
+ - Three output formats: GenBank (`gbk`), GFF3 (`gff`), SCO (`sco`)
83
+ - Protein (`-a`) and nucleotide (`-d`) FASTA side outputs
84
+ - Closed ends (`-c`) and N-mask (`-m`) options
85
+ - Progress bar (`--progress`) for batch processing
86
+ - Overlapping gene detection (`--find-overlaps`)
87
+ - GitHub Actions release workflow with cross-platform binaries
88
+ - Integration tests and golden file comparisons
89
+ - Benchmark suite with Criterion
90
+
91
+ ### Performance
92
+
93
+ - ~10× faster than original Python PHANOTATE
94
+ - Single-thread and multi-thread benchmarks against Prodigal and Prodigal-gv
95
+
96
+ ---
97
+
98
+ ## Release Checklist
99
+
100
+ When cutting a new release:
101
+
102
+ 1. Run `./bump-version.sh X.Y.Z`
103
+ 2. Review `git diff`
104
+ 3. Commit: `git add -A && git commit -m "chore: bump version to X.Y.Z"`
105
+ 4. Tag: `git tag vX.Y.Z`
106
+ 5. Push: `git push origin main && git push origin vX.Y.Z`
107
+ 6. GitHub Actions will automatically:
108
+ - Build binaries for all platforms (`release.yml`)
109
+ - Build and publish Python wheels to PyPI (`pypi.yml`)
110
+ - Update bioconda recipe (`bioconda.yml`)