pyopenms_viz icon indicating copy to clipboard operation
pyopenms_viz copied to clipboard

Sync Config & Docs: Updated Parameters & Auto-Generated Docs

Open Imama-Kainat opened this issue 9 months ago • 9 comments

In this update, I streamlined the documentation update process by integrating automation for detecting configuration changes and updating TSV files accordingly.

📌 Branch: ParameterDocUpdation

Here's what I did:

1️⃣ Updated TSV Files: Refactored the tables in the documentation to match the latest changes in the config file. This ensures that the documentation stays accurate and up to date.

2️⃣ Testing & Verification: I checked the updates by reading the rendered docs to confirm that everything displays correctly after the changes.

3️⃣ Automation Script:

  • Created a Scripts/ folder and added update_tsv_docs.py to automatically detect config file changes.
  • The script updates TSV files based on the modified classes:
    • BasePlot
    • Chromatogram
    • Mobilogram
    • PeakMap
    • Spectrum
  • This ensures that whenever a parameter is modified, the corresponding TSV files are adjusted dynamically.

4️⃣ Git Pre-Commit Hook:

  • Wrote a pre-commit hook to trigger the script whenever _config.py is modified.
  • This means that any future changes to the config file will automatically update the TSV files before committing.

5️⃣ Final Testing:

  • Successfully tested the entire workflow and will attach screenshots to demonstrate that the pre-commit hook and script function as expected.

Files Added:

.git/hooks/pre-commit → Ensures automatic documentation updates before every commit.
Scripts/update_tsv_docs.py → Detects config changes and updates TSV files accordingly.

What This Script Can Handle?

  • Detects changes in _config.py
  • Automatically updates TSV files in docs/Parameters/
  • Supports parameter updates for multiple visualization classes
  • Ensures that documentation always reflects the latest code changes

This approach removes the need for manual TSV updates, making the process smoother and error-free. 🚀

Summary by CodeRabbit

  • New Features

    • Introduced an automated tool to update documentation content, ensuring improved accuracy and consistency.
  • Documentation

    • Enhanced and expanded explanations for visual data plots, including ion mobility data.
    • Refined documentation formatting and corrected grammatical issues for better readability.
    • Updated documentation configuration to support interactive plotting features.
  • Refactor

    • Streamlined the underlying plot configuration system for consistent behavior and improved usability.
  • Chores

    • Adjusted version control settings to ignore temporary files.

Imama-Kainat avatar Mar 08 '25 17:03 Imama-Kainat