Conversation
Major changes including differential expression module
docs: add quantms shared theme CSS
Same deployment approach as pmultiqc and qpx. Deploys on push to main when docs/ or mkdocs.yml change. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ci: switch to GitHub Actions Pages deployment
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ne discoverability Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace [tool.poetry] with standard [project] table, hatchling build backend, and hatch-vcs for version management from git tags. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks 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 |
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Documentation | 94 minor |
| ErrorProne | 3 high |
| Security | 2 medium |
| CodeStyle | 1 minor |
🟢 Metrics 569 complexity · 4 duplication
Metric Results Complexity 569 Duplication 4
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.
PR Summary by QodoAdd QpxDataset pipeline core; modernize docs and Pages deployment
AI Description
Diagram
High-Level Assessment
Files changed (41)
|
Code Review by Qodo
1. Bad QuantificationMethod import
|
| from mokume.core.registry import PluginRegistry | ||
| from mokume.pipeline.config import PipelineConfig | ||
| from mokume.pipeline import flows | ||
| from mokume.quantification.base import QuantificationMethod |
There was a problem hiding this comment.
1. Bad quantificationmethod import 🐞 Bug ≡ Correctness
Several new modules import QuantificationMethod from mokume.quantification.base, but that module only defines ProteinQuantificationMethod, so importing mokume.pipeline.runner / mokume.pipeline.flows.* / mokume.quantification.median will raise ImportError.
Agent Prompt
## Issue description
New pipeline/flow code imports `QuantificationMethod` from `mokume.quantification.base`, but `base.py` defines `ProteinQuantificationMethod` only. This causes immediate `ImportError` when importing the new runner/flows/median module.
## Issue Context
This PR introduces `mokume/pipeline/runner.py`, `mokume/pipeline/flows/*`, and `mokume/quantification/median.py`, all of which currently import a non-existent symbol.
## Fix Focus Areas
- mokume/quantification/base.py[21-60]
- mokume/pipeline/runner.py[12-22]
- mokume/pipeline/flows/standard.py[16-32]
- mokume/pipeline/flows/ratio.py[16-26]
- mokume/pipeline/flows/directlfq.py[16-26]
- mokume/quantification/median.py[8-25]
## Suggested fix
- In `mokume/quantification/base.py`, either:
- Rename `ProteinQuantificationMethod` -> `QuantificationMethod`, or
- Add a backward-compatible alias: `QuantificationMethod = ProteinQuantificationMethod` (and consider exporting it in `__all__`).
- Update the new runner/flows/median modules to consistently import the correct base type (either the renamed class or the alias).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| method = PluginRegistry.get("quantification", quant_method_name) | ||
|
|
||
| # Select flow based on method's declared input_level | ||
| flow = FLOW_DISPATCH.get(method.input_level) |
There was a problem hiding this comment.
2. Input_level attribute missing 🐞 Bug ≡ Correctness
run_pipeline() dispatches with method.input_level, but neither the quantification base class nor the provided quantification implementations define input_level, so the runner will raise AttributeError before it can select a flow.
Agent Prompt
## Issue description
`mokume/pipeline/runner.py` dispatches flows via `method.input_level`, but quantification methods do not define this attribute/property, causing `AttributeError` at runtime.
## Issue Context
The registry currently validates `input_level` only if it exists (`hasattr(instance, "input_level")`), but the runner assumes it always exists.
## Fix Focus Areas
- mokume/pipeline/runner.py[49-67]
- mokume/quantification/base.py[25-80]
- mokume/core/registry.py[181-190]
- mokume/quantification/median.py[22-40]
## Suggested fix
- Make `input_level` part of the quantification method contract by adding it to the base class (e.g., abstract `@property def input_level(self) -> str` or a required class attribute).
- Update built-in/registered quantification plugins (at minimum `MedianQuantification`) to define `input_level` (likely `"peptides"`).
- Consider tightening `PluginRegistry.get()` validation for quantification plugins to always require `input_level` (remove the `hasattr` guard) so misconfigured plugins fail fast with a clear error message.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| # Use DuckDB's ability to query DataFrames directly | ||
| relation = connection.sql("SELECT * FROM df") | ||
| return cls(relation, connection, source="dataframe", owns_connection=owns) |
There was a problem hiding this comment.
3. Dataframe not registered 🐞 Bug ≡ Correctness
LazyFrame.from_dataframe() runs SELECT * FROM df without registering the passed DataFrame into DuckDB, so it will fail because the connection has no table named df. This makes the advertised constructor unusable.
Agent Prompt
## Issue description
`LazyFrame.from_dataframe()` claims it registers the DataFrame as a DuckDB temp table, but it never does; it just executes `SELECT * FROM df`. Unless DuckDB replacement-scan magically binds that local variable (not guaranteed and often not true for connection-scoped queries), this will raise a catalog/table-not-found error.
## Issue Context
Elsewhere in the codebase, DataFrames are explicitly registered into DuckDB connections before being used in SQL.
## Fix Focus Areas
- mokume/core/duckdb_backend.py[124-153]
- mokume/io/feature.py[263-279]
## Suggested fix
- In `LazyFrame.from_dataframe`, explicitly register the DataFrame with the connection, e.g.:
- `connection.register("_mokume_df", df)` then `relation = connection.sql("SELECT * FROM _mokume_df")`, or
- Use DuckDB’s DataFrame-to-relation API if available on the connection/version (and avoid relying on implicit variable binding).
- Optionally unregister/replace the temp name to avoid collisions if `from_dataframe` is called multiple times on the same connection.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
This pull request introduces significant improvements to the documentation, deployment workflow, and discoverability of the
mokumeproject. The changes include a complete overhaul of the documentation deployment pipeline, the addition of new overview and reference materials, enhancements for SEO and LLM discovery, and improved navigation and branding for the documentation site. Minor code formatting and docstring clarifications are also included.Documentation and Discoverability Enhancements
docs/llms.txt) and LLMs (docs/llms-full.txt), including installation, usage examples, method descriptions, and citation information. [1] [2]CITATION.cfffile to standardize citation information and aCNAMEfile to configure the custom documentation domain. [1] [2]robots.txtto allow web crawlers and LLMs to index the documentation and reference files, improving discoverability.Documentation Site Structure and Theming
mkdocs.ymlto reorganize navigation, add a custom theme, inject analytics, and include custom CSS for branding. [1] [2] [3]Deployment Workflow Improvements
main, with improved permissions and concurrency control.Minor Documentation and Code Updates
differential_expression.py. [1] [2] [3] [4] [5] [6] [7]References: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]