Skip to content

docs: fix installation version conflicts and remove duplicate section - #180

Merged
YaoYinYing merged 7 commits into
mainfrom
docs/fix-installation-discrepancies-and-duplicates
Jul 6, 2026
Merged

docs: fix installation version conflicts and remove duplicate section#180
YaoYinYing merged 7 commits into
mainfrom
docs/fix-installation-discrepancies-and-duplicates

Conversation

@YaoYinYing

@YaoYinYing YaoYinYing commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Changes

  • Align Python version to 3.12 across installation.md and getting-started.md
  • Add pyqt=5 to conda install command in installation.md (matching CLAUDE.md)
  • Unify conda env name to revodesign
  • Remove duplicate section 3 from getting-started.md (was identical to section 2)
  • Add Package Manager figure before First Launch section
  • Fix figure caption: recipe mechanism, not YAML/JSON config
  • Fix Python version (3.11→3.12), add pyqt=5, fix env name in .docx manual

Test results

make fast-test: 606 passed, 39 failed, 75 skipped, 67 errors — all failures are pre-existing (cfg_group, called_citations, setFont) and unrelated to docs.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added clearer English-language guidance for the app’s AI-assisted rules and workflow.
    • Updated onboarding content with a new installation illustration and refreshed step ordering.
  • Bug Fixes

    • Improved startup and configuration handling to prevent cache and setup issues when prerequisites aren’t ready.
    • Clarified API key conflict behavior, including better guidance when an existing key is detected.
  • Documentation

    • Updated installation requirements to recommend Python 3.12 and refine setup instructions.
  • Tests

    • Strengthened test dependencies for tab-related setup flows.

- Align Python version to 3.12 across installation.md and getting-started.md
- Add pyqt=5 to conda install command in installation.md (matching CLAUDE.md)
- Unify conda env name to revodesign
- Remove duplicate section 3 (Install the PyMOL Plugin) from getting-started.md
- Add Package Manager figure before First Launch section
- Fix figure caption: recipe mechanism, not YAML/JSON config
- Fix Python version (3.11→3.12), add pyqt=5, fix env name in .docx manual

[skip ci]
Add English rule file and enrich OpenKinetics client with comprehensive docstrings, improved API-key persistence (process env + ConfigBus fallback), better error handling and validation, CSV/tempfile handling, request/result polling comments, and small clarifications. Update tests to add missing test dependencies (pocket/surface sessions) and add a bootstrap/dependency marker for surface in prepare tests.
Changes:

1. **SingletonAbstract**: Convert `initialized` from an attribute to a @Property that checks `_instance is not None`, eliminating manual tracking.

2. **set_cache_dir()**: Add validation to check if ConfigBus is initialized before accessing configuration, raising UnexpectedWorkflowError if not.

3. **Documentation**: Enhance docstrings for `decide()` and `set_cache_dir()` with detailed Args, Returns, and usage examples.
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@YaoYinYing, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c6c942d3-0c2a-406f-949d-443a814a8be9

📥 Commits

Reviewing files that changed from the base of the PR and between 6cf1114 and 0e137d7.

📒 Files selected for processing (1)
  • README.md
📝 Walkthrough

Walkthrough

Updates documentation (onboarding steps, installation requirements), adds an initialized property to SingletonAbstract replacing instance-attribute tracking, adds a ConfigBus readiness guard to set_cache_dir, expands docstrings/comments and error handling in the OpenKinetics client, updates pytest dependency chains across tab tests, and adds a new Lingma rule file.

Changes

Documentation and configuration rules

Layer / File(s) Summary
Getting started guide updates
docs/getting-started.md
Adds an installer figure and renumbers onboarding step headers (First Launch, Configuration, Basic Workflow, Keyboard Shortcuts).
Installation guide updates
docs/user-guide/installation.md
Recommends Python 3.12, renames conda environment to revodesign, and adds explicit pyqt=5 install step.
New Lingma rule
.lingma/rules/lan.md
Adds an always-on rule instructing English usage for all tasks.

Singleton and config bootstrap logic

Layer / File(s) Summary
SingletonAbstract initialized property
src/REvoDesign/basic/abc_singleton.py
Replaces self.initialized = True instance attribute with a class-level initialized property based on _instance, and documents singleton_init usage pattern.
set_cache_dir ConfigBus guard
src/REvoDesign/bootstrap/set_config.py
Expands decide and set_cache_dir docstrings; adds a guard requiring ConfigBus.initialized (raising UnexpectedWorkflowError) before validating cache-dir config, which still raises ValueError if neither home-dir nor customized mode is set.

OpenKinetics client docstrings and error handling

Layer / File(s) Summary
API key persistence, fetch, and resolution
src/REvoDesign/magician/designers/openkinetics/_client.py
Expands docstrings for persist_openkinetics_api_key, fetch_openkinetics_api_key, and resolve_api_key; refines error branches raising OpenKineticsConfigurationError or OpenKineticsAPIError for 409/≥400 responses.
Method metadata and data helpers
src/REvoDesign/magician/designers/openkinetics/_client.py
Adds docstrings to build_openkinetics_data_rows and get_method_metadata, plus a "Dead code ?" comment in result normalization.
Client method docstrings (list, validate, submit)
src/REvoDesign/magician/designers/openkinetics/_client.py
Adds docstrings/comments to list_methods, validate_file, validate, check_health, check_quota, and submit.
Result retrieval and polling docstrings
src/REvoDesign/magician/designers/openkinetics/_client.py
Adds docstrings/comments to get_result, poll_until_complete, and _normalize_score_variants_input.

Tab test dependency wiring

Layer / File(s) Summary
Session dependency chain across tab tests
tests/cases/tabs/test_prepare.py, tests/cases/tabs/test_cluster.py, tests/cases/tabs/test_mutate.py
Adds a tabs_prepare_surface_session dependency mark and updates existing dependency lists to chain pocket/surface session prerequisites across cluster and mutate tests.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • YaoYinYing/REvoDesign#164: Both PRs modify the same pytest tab-test dependency wiring across test_cluster.py, test_mutate.py, and test_prepare.py.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main documentation fixes: installation version alignment and removal of a duplicate section.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/fix-installation-discrepancies-and-duplicates

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

codacy-production Bot commented Jul 6, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 6 minor

Alerts:
⚠ 6 issues (≤ 0 issues of at least minor severity)

Results:
6 new issues

Category Results
BestPractice 2 minor
Documentation 4 minor

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

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.

@deepsource-io

deepsource-io Bot commented Jul 6, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in df2db4c...46b513f on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Python Jul 6, 2026 7:00a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6cf1114d8f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/REvoDesign/basic/abc_singleton.py Outdated
Comment on lines +147 to +148
@property
def initialized(cls) -> bool:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore singleton initialization

When any SingletonAbstract subclass is instantiated, this added initialized property makes hasattr(self, "initialized") in __init__ return true before singleton_init() has ever run, so every singleton is returned without its required attributes (for example ConfigBus() never creates cfg_group). It also is not a class property, so ConfigBus.initialized evaluates to the truthy property object rather than a boolean.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/REvoDesign/basic/abc_singleton.py (1)

147-189: 🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win

Make initialized a real boolean flag. @property makes ConfigBus.initialized truthy on class access, and hasattr(self, "initialized") in __init__ is already true before singleton_init() runs, so new singleton instances skip initialization. Store a real flag on the class or instance instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/REvoDesign/basic/abc_singleton.py` around lines 147 - 189, The singleton
initialization guard in `abc_singleton.py` is broken because `initialized` is
defined as a property, which makes class-level access truthy and causes
`__init__` to skip `singleton_init()` due to `hasattr(self, "initialized")`
already succeeding. Update `initialized` to be a real boolean flag managed on
the singleton instance or class, and adjust `__init__`, `__new__`, and the
`initialized` accessor so initialization runs exactly once and correctly
reflects whether the singleton has been set up.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/REvoDesign/magician/designers/openkinetics/_client.py`:
- Around line 68-69: The fallback persistence path in OpenKineticsClient does
not match the documented OpenKineticsConfigurationError contract, because direct
file writes can throw raw I/O or OmegaConf exceptions instead of the wrapped
error. Update the fallback branch in the OpenKinetics client’s configuration
save flow to catch persistence failures the same way the ConfigBus branch does,
and re-raise them as OpenKineticsConfigurationError with the original exception
attached. Keep the behavior consistent with the existing API key validation and
environment persistence logic so callers can reliably handle one exception type.

---

Outside diff comments:
In `@src/REvoDesign/basic/abc_singleton.py`:
- Around line 147-189: The singleton initialization guard in `abc_singleton.py`
is broken because `initialized` is defined as a property, which makes
class-level access truthy and causes `__init__` to skip `singleton_init()` due
to `hasattr(self, "initialized")` already succeeding. Update `initialized` to be
a real boolean flag managed on the singleton instance or class, and adjust
`__init__`, `__new__`, and the `initialized` accessor so initialization runs
exactly once and correctly reflects whether the singleton has been set up.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f2d48682-0622-4129-b56d-37cda05057c7

📥 Commits

Reviewing files that changed from the base of the PR and between df2db4c and 6cf1114.

📒 Files selected for processing (9)
  • .lingma/rules/lan.md
  • docs/getting-started.md
  • docs/user-guide/installation.md
  • src/REvoDesign/basic/abc_singleton.py
  • src/REvoDesign/bootstrap/set_config.py
  • src/REvoDesign/magician/designers/openkinetics/_client.py
  • tests/cases/tabs/test_cluster.py
  • tests/cases/tabs/test_mutate.py
  • tests/cases/tabs/test_prepare.py

Comment on lines +68 to +69
OpenKineticsConfigurationError: If the API key is empty or if persistence to environ.yaml fails.
"""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Docstring promises exception wrapping the fallback path doesn't provide.

The docstring states OpenKineticsConfigurationError is raised "if persistence to environ.yaml fails," and the ConfigBus branch (lines 80-101) does wrap failures in OpenKineticsConfigurationError. However, the fallback direct-file-write path (lines 103-113, used when ConfigBus is unavailable/uninitialized) has no try/except — any I/O failure (OSError, OmegaConf errors, etc.) propagates as a raw exception, not the documented type. Callers relying on the documented contract to catch OpenKineticsConfigurationError will miss these failures.

🐛 Proposed fix to align fallback path with documented behavior
     from REvoDesign.bootstrap import REVODESIGN_CONFIG_DIR

     environ_path = Path(REVODESIGN_CONFIG_DIR) / "environ.yaml"
     logging.debug("ConfigBus is not initialized; writing OpenKinetics API key directly to %s.", environ_path)
-    environ_path.parent.mkdir(parents=True, exist_ok=True)
-    config = OmegaConf.load(environ_path) if environ_path.exists() else OmegaConf.create({"variables": {}})
-    OmegaConf.update(config, f"variables.{DEFAULT_OPENKINETICS_API_KEY_ENV}", api_key, force_add=True)
-    OmegaConf.save(config, environ_path)
+    try:
+        environ_path.parent.mkdir(parents=True, exist_ok=True)
+        config = OmegaConf.load(environ_path) if environ_path.exists() else OmegaConf.create({"variables": {}})
+        OmegaConf.update(config, f"variables.{DEFAULT_OPENKINETICS_API_KEY_ENV}", api_key, force_add=True)
+        OmegaConf.save(config, environ_path)
+    except Exception as exc:
+        raise OpenKineticsConfigurationError(f"Failed to persist OpenKinetics API key to {environ_path}.") from exc
     logging.info("OpenKinetics API key saved to %s and applied immediately.", environ_path)
     return api_key

Also applies to: 103-113

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/REvoDesign/magician/designers/openkinetics/_client.py` around lines 68 -
69, The fallback persistence path in OpenKineticsClient does not match the
documented OpenKineticsConfigurationError contract, because direct file writes
can throw raw I/O or OmegaConf exceptions instead of the wrapped error. Update
the fallback branch in the OpenKinetics client’s configuration save flow to
catch persistence failures the same way the ConfigBus branch does, and re-raise
them as OpenKineticsConfigurationError with the original exception attached.
Keep the behavior consistent with the existing API key validation and
environment persistence logic so callers can reliably handle one exception type.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.02%. Comparing base (6fb78c7) to head (46b513f).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #180      +/-   ##
==========================================
- Coverage   73.23%   73.02%   -0.21%     
==========================================
  Files         121      121              
  Lines       15002    15002              
==========================================
- Hits        10986    10955      -31     
- Misses       4016     4047      +31     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

[ci skip]
@YaoYinYing
YaoYinYing merged commit bdbc972 into main Jul 6, 2026
4 of 5 checks passed
@YaoYinYing
YaoYinYing deleted the docs/fix-installation-discrepancies-and-duplicates branch July 6, 2026 07:25
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.

1 participant