Make Rust-backed Mokume the default and introduce the Mokume Plugin - #81
Draft
Shen-YuFei wants to merge 44 commits into
Draft
Make Rust-backed Mokume the default and introduce the Mokume Plugin#81Shen-YuFei wants to merge 44 commits into
Shen-YuFei wants to merge 44 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 1580 |
| Duplication | 79 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This was
linked to
issues
Aug 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR consolidates Mokume around a Rust-first distribution and execution model.
With this change,
mokumebecomes the default Rust-backed Python distribution, while the pure-Python implementation moves to the separatemokume-pydistribution. The PR also introduces the installable Mokume Plugin, routes piBAQ through the runtime pyOpenMS protease catalog and native Rust core, expands differential-expression workflows, and adds streaming TissueMap loading for TMT data.Breaking changes
pip install mokumenow installs the Rust-backed distribution.mokume-py.mokume; they must not be installed in the same environment.mokume-clibinary is removed.mokumeconsole command now dispatches through the in-process PyO3 extension.mokume-commandand remainspublish = false.ibaqinputs remain compatibility aliases where supported.Distribution and packaging
Rust-backed distribution
The default distribution includes:
mokume._mokumePyO3 extension;The extension uses an
abi3-py39build and supports Python 3.9 or newer.Pure-Python distribution
mokume-pypreserves the pure-Python workflows and requires Python 3.10 or newer. pyOpenMS and piBAQ are included in its base dependencies rather than a separatepibaqextra.Because both distributions provide the same
mokumeimport package, installing both in one environment is unsupported. Import-time checks warn when the sibling distribution is detected.Native computation and Python bindings
The Rust-backed wheel now exposes native, in-process APIs for:
The Python API preserves the established DataFrame and file-oriented entry points while routing compute-heavy operations through the same Rust implementation used by the console command.
mokume-commandprovides the shared command parsing and dispatch library. It is an internal workspace crate and is not intended for standalone Cargo installation.piBAQ and runtime pyOpenMS digestion
piBAQ is now a base capability of both distributions.
The Rust-backed workflow:
ProteaseDB;ProteaseDigestion;This removes the self-maintained Rust cleavage-rule catalog and supports pyOpenMS rules that could not be represented by the former simplified Rust rule structure, including context-dependent, unspecific, and no-cleavage behavior.
The runtime logs the pyOpenMS version, canonical enzyme name, catalog hash, peptide-length limits, and missed-cleavage setting used for digestion.
The retained compute and file-oriented Python compatibility APIs are native-backed wrappers. They are not separate enzyme fallbacks and do not require the
allextra.Mokume Plugin and MCP service
This PR adds an installable Mokume Plugin for Codex and Claude Code.
The architecture separates responsibilities as follows:
The service does not require a separate model API key.
Install the local Mokume service
The following release installation commands apply after this change reaches
mainand the corresponding Python packages are published.Install the Rust-backed distribution with the Plugin and MCP dependencies:
pip install "mokume[agentic]" mokume --versionThe Plugin requires Python 3.10 or newer. The
mokumeexecutable must be available on thePATHinherited by Codex or Claude Code.Do not install
mokume-pyin the same environment because both distributions provide the samemokumeimport package and console command.Install in Codex
Add the BigBio marketplace and install the Mokume Plugin:
Confirm that the Plugin is installed:
In the Codex app, the same setup is available under Plugins → Add marketplace. Use the following Git source:
Leave the sparse path empty, install Mokume from the BigBio marketplace, and start a new task so Codex loads the bundled skill and MCP server.
Installation is complete when Codex exposes:
The bundled workflow can then be invoked as:
Install in Claude Code
Add the same repository as a Claude Code marketplace and install the Plugin:
If Claude Code is already running, reload its installed plugins:
Alternatively, start a new Claude Code session.
The bundled workflow can then be invoked as:
Test this draft PR
To test the exact PR checkout before it reaches
main, install the wheel and marketplace from the local checkout:Install the local marketplace in Codex:
codex plugin marketplace add . codex plugin add mokume@bigbioOr install the same local marketplace in Claude Code:
claude plugin marketplace add . claude plugin install mokume@bigbioStart a new Codex task or run
/reload-pluginsin Claude Code after installation.MCP startup
Both Plugin manifests start the bundled local stdio MCP server automatically.
No separate MCP registration is required, and users should not manually run:
The Plugin includes:
analyze-proteomicsskill;The former Python package-owned LLM client, proposer, reflector, optimizer, and reporting loop are removed.
Differential expression
The differential-expression workflow is expanded and aligned across the Rust and Python implementations.
Changes include:
These changes preserve missing or ineligible results as explicit non-tested outcomes instead of silently treating them as significant or coercing them into ordinary p-values.
TissueMap
The TissueMap TMT loader now streams reporter-ion intensities through DuckDB rather than materializing and exploding the complete feature table in pandas.
The loader adds:
Regression tests compare the streaming implementation with the previous in-memory behavior and cover canonical, numeric, conflicting, GIS, and LFQ cases.
Pipeline and API consolidation
Additional changes include:
Documentation
The documentation is updated to cover:
mokumeandmokume-pydistribution model;mokumedistribution;Python requirements are distribution-specific:
mokume: Python 3.9 or newer;mokume-py: Python 3.10 or newer;mokume[agentic]: Python 3.10 or newer.CI and publishing
The CI and release workflows now build and test the two distributions independently.
Validation includes:
cargo audit;abi3wheels for Linux x86_64/aarch64, macOS x86_64/arm64, and Windows x64;The release workflows publish:
mokumefrom the Rust/maturin project;mokume-pyfrom the hatchling project.