Skip to content

[213_01] Added Python to reproduce end-to-end examples of scientific research workflows#3074

Open
Uygniqoar wants to merge 3 commits intoMoganLab:mainfrom
Uygniqoar:main
Open

[213_01] Added Python to reproduce end-to-end examples of scientific research workflows#3074
Uygniqoar wants to merge 3 commits intoMoganLab:mainfrom
Uygniqoar:main

Conversation

@Uygniqoar
Copy link
Copy Markdown

@Uygniqoar Uygniqoar commented Mar 31, 2026

Summary

This PR adds a minimal end-to-end workflow entry for the Python plugin documentation.

The goal is not to introduce new Python runtime features, but to make the existing Python workflow easier to reproduce and validate for users and contributors.

What is included

  1. A new workflow document: TeXmacs/plugins/python/doc/workflow.zh.tmu

    • shows how to prepare a Conda environment
    • shows how to start a Python session from Plugins -> Sessions -> Python -> conda_xxx
    • demonstrates a minimal end-to-end workflow with:
      • Pandas
      • Matplotlib
      • SymPy
    • explains the expected result and how to reproduce it
  2. A new developer document: devel/python-research-workflow.md

    • explains why this workflow document is needed
    • explains its relationship with python.zh.tmu
    • provides manual validation steps for maintainers
  3. A minimal entry added to TeXmacs/plugins/python/doc/python.zh.tmu

    • links users from the existing Python documentation to the new workflow guide

Why this change

The current Python documentation already contains feature-specific examples, but it is still useful to have a single workflow-oriented entry that shows how to go from environment setup to visible outputs inside one document.

This PR is intended to provide that missing “first runnable path” for new users and future contributors.

Scope

This PR is intentionally small.

It does not:

  • change the Python plugin runtime
  • modify the plugin protocol
  • add notebook-style execution
  • introduce AI-related functionality
  • add a separate automated test file

Manual validation

  1. Create a Conda environment with the required packages:
    conda create -n mogan_research python=3.10 pandas matplotlib sympy
    

Closes #3073

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 31, 2026

Greptile Summary

This PR adds a minimal, documentation-only end-to-end Python scientific workflow guide for Mogan STEM. It introduces a new TMU document (workflow.zh.tmu) demonstrating Conda environment setup, Pandas data processing, Matplotlib visualization, and SymPy symbolic math — all within a single reproducible session — and links to it from the existing python.zh.tmu. A companion developer document (devel/python-research-workflow.md) explains the rationale and manual validation steps.

Key observations:

  • Previously flagged issues have been addressed: the new section in python.zh.tmu is now correctly placed before the tmdoc-copyright/tmdoc-license boilerplate, and workflow.zh.tmu now carries the full GFDL license text.
  • The copyright holder in workflow.zh.tmu uses the generic string MoganLab Developer rather than the actual contributor's name, inconsistent with every other document in the same directory.
  • workflow.zh.tmu still lacks a trailing newline at end-of-file.
  • No runtime code is changed; the scope is limited to documentation files, which keeps the risk very low.

Confidence Score: 4/5

Safe to merge after correcting the generic copyright holder name; no runtime changes are introduced.

All previously flagged structural issues (section placement, abbreviated license) have been resolved. The only remaining new concern is the placeholder 'MoganLab Developer' copyright name — a straightforward one-line fix. The missing trailing newline is a known carryover. Neither issue affects functionality, making this PR very close to merge-ready.

TeXmacs/plugins/python/doc/workflow.zh.tmu — generic copyright name and missing EOF newline.

Important Files Changed

Filename Overview
TeXmacs/plugins/python/doc/python.zh.tmu New '科研工作流示例' section correctly placed before tmdoc-copyright/tmdoc-license boilerplate; links to the new workflow document with hlink.
TeXmacs/plugins/python/doc/workflow.zh.tmu New end-to-end workflow document; full GFDL license text is present; copyright holder uses generic 'MoganLab Developer' name instead of a real contributor; file still lacks a trailing newline.
devel/python-research-workflow.md Developer notes document explaining the workflow's purpose and manual validation steps; the 'no independent test file' claim is now accurate for this PR's diff.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User opens python.zh.tmu] --> B[Reads feature-level Python docs]
    B --> C[Sees new 科研工作流示例 section]
    C --> D[Follows hlink to workflow.zh.tmu]
    D --> E[Section 1: Create Conda env]
    E --> F[Section 2: Launch Session via Plugins menu]
    F --> G[Section 3.1: Pandas - DataFrame rendering]
    G --> H[Section 3.2: Matplotlib - vector chart]
    H --> I[Section 3.3: SymPy - math formula]
    I --> J[Section 4: Verify all outputs]
Loading

Reviews (2): Last reviewed commit: "docs(python): align research workflow gu..." | Re-trigger Greptile

- Use full GFDL boilerplate in workflow.zh.tmu
- Synchronize conda environment naming to 'mogan_research'
- Restore trailing backslashes in TMU footers for consistency
- Link workflow guide from main python.zh.tmu documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[213_01] Add an end-to-end reproducible Python workflow example for Conda, Pandas, Matplotlib, and SymPy

1 participant