Skip to content

Conversation

poshul
Copy link

@poshul poshul commented Aug 11, 2025

Summary by CodeRabbit

  • Chores

    • Bumped version to 1.0.1.
    • Added official Python 3.13 support and broadened compatibility metadata (>=3.10, <=3.14).
    • Expanded CI to test on Python 3.12 and 3.13.
    • Updated hosted documentation build environment to newer OS/Python.
    • Refreshed dependencies for Python 3.13 compatibility; removed obsolete packages and a git-based dependency to simplify installation.
  • Documentation

    • Updated installation guidance to recommend Python 3.13 and reflect the new environment.

Copy link

coderabbitai bot commented Aug 11, 2025

Walkthrough

Repository-wide upgrade to Python 3.13: updated runtime declarations (Binder, RTD), CI workflows, and documentation. Read the Docs OS moved to ubuntu-24.04. Project metadata bumped to 1.0.1 with widened Python range. requirements.txt saw extensive dependency refreshes and removals, including dropping a git-based dependency.

Changes

Cohort / File(s) Summary
CI workflows
.github/workflows/ci.yml, .github/workflows/execute_notebooks.yml, .github/workflows/static.yml
Added Python 3.13 to CI; ci.yml matrix now 3.12 and 3.13 on ubuntu/windows; execute_notebooks/static switched setup-python to 3.13. No other logic changes.
Runtime/build envs
.binder/runtime.txt, .readthedocs.yaml
Binder runtime set to python-3.13. RTD updated to ubuntu-24.04 and Python 3.13; other RTD settings unchanged.
Documentation
README.md, docs/Installation.rst
Installation instructions updated to recommend/use Python 3.13; text otherwise unchanged.
Project metadata
pyproject.toml
Version bumped 1.0.0 → 1.0.1; classifiers include Python 3.12/3.13; requires-python widened to >=3.10, <=3.14.
Dependencies
requirements.txt
Regenerated for Python 3.13 with numerous upgrades/additions/removals. Notable: many package bumps (e.g., matplotlib, plotly, pytest), added extras (bleach[css]), new deps (asttokens, cssselect2, ipykernel/ipython stack, rdkit, narwhals, etc.), removed git-based pyopenms_viz, dropped tinycss2/tenacity. No code changes.

Sequence Diagram(s)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I twitch my ears at version signs,
Hop to 3.13 along the lines.
CI drums a double beat,
Docs and RTD keep it neat.
Dependencies trimmed and bright—
Carrot-commit tastes just right! 🥕🐇

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch poshul-patch-1

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

📖 Documentation Preview

The documentation for this PR has been built and is available at:
🔗 View Preview

This preview will be updated automatically when you push new commits to this PR.


Preview built from commit: dd18d40

github-actions bot added a commit that referenced this pull request Aug 11, 2025
Copy link
Contributor

📖 Documentation Preview

The documentation for this PR has been built and is available at:
🔗 View Preview

This preview will be updated automatically when you push new commits to this PR.


Preview built from commit: ea86dd8

github-actions bot added a commit that referenced this pull request Aug 11, 2025
Copy link
Contributor

📖 Documentation Preview

The documentation for this PR has been built and is available at:
🔗 View Preview

This preview will be updated automatically when you push new commits to this PR.


Preview built from commit: b2cd981

github-actions bot added a commit that referenced this pull request Aug 11, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🔭 Outside diff range comments (1)
.github/workflows/execute_notebooks.yml (1)

49-85: Missing “verify-changed-files” and no add/commit step — push will never happen

You reference steps.verify-changed-files.outputs.changed but never set it, and there’s no git add/commit before push. As written, this never pushes executed notebooks.

       - name: Configure git
         run: |
           git config --local user.email "action@github.com"
           git config --local user.name "GitHub Action"

+      - name: Detect changes
+        id: verify-changed-files
+        run: |
+          if [ -n "$(git status --porcelain)" ]; then
+            echo "changed=true" >> "$GITHUB_OUTPUT"
+          else
+            echo "changed=false" >> "$GITHUB_OUTPUT"
+          fi
+
+      - name: Commit executed notebooks
+        if: steps.verify-changed-files.outputs.changed == 'true' && github.event_name != 'pull_request'
+        run: |
+          git add -A
+          git commit -m "Execute notebooks [skip ci]" || echo "No changes to commit"
+
       - name: Push changes
         if: steps.verify-changed-files.outputs.changed == 'true' && github.event_name != 'pull_request'
         run: |
           git push origin ${{ github.ref_name }}
🧹 Nitpick comments (4)
.github/workflows/execute_notebooks.yml (1)

30-35: Use actions/setup-python v5 for Python 3.13 and future-proofing

setup-python@v5 is the current major and provides updated toolcache handling and Node20 runtime. Recommend bumping.

-      - name: Set up Python
-        uses: actions/setup-python@v4
+      - name: Set up Python
+        uses: actions/setup-python@v5
         with:
           python-version: '3.13'
           cache: 'pip'
.github/workflows/static.yml (1)

38-43: Upgrade to setup-python v5 and enable pip cache

Align with other workflows and speed builds.

-      - name: Set up python
-        uses: actions/setup-python@v4
+      - name: Set up python
+        uses: actions/setup-python@v5
         with:
           python-version: '3.13'
+          cache: 'pip'
.readthedocs.yaml (1)

4-7: RTD Py3.13 on Ubuntu 24.04 is fine; check heavy deps compatibility

With Python 3.13 on RTD, some heavy packages (e.g., rdkit) may lack wheels and fail the build.

Mitigations:

  • Use rdkit-pypi as a first attempt in docs/requirements.txt.
  • Mock optional imports in conf.py to avoid installing heavy libs.
  • Gate notebooks that depend on RDKit or pre-execute and include outputs.
requirements.txt (1)

29-33: CairoSVG stack may require system libraries on RTD/CI.

cairocffi/cairosvg/tinycss2 often need system packages (cairo, pango, libffi, freetype). With RTD OS set to ubuntu-24.04, confirm build images have these preinstalled or add apt packages in RTD config.

I can propose an RTD v2 config snippet with apt_packages if builds fail.

Also applies to: 267-272, 299-303

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c9e0c07 and c9fe996.

📒 Files selected for processing (9)
  • .binder/runtime.txt (1 hunks)
  • .github/workflows/ci.yml (1 hunks)
  • .github/workflows/execute_notebooks.yml (1 hunks)
  • .github/workflows/static.yml (1 hunks)
  • .readthedocs.yaml (1 hunks)
  • README.md (1 hunks)
  • docs/Installation.rst (1 hunks)
  • pyproject.toml (2 hunks)
  • requirements.txt (6 hunks)
🧰 Additional context used
🪛 LanguageTool
.binder/runtime.txt

[grammar] ~1-~1: Passe das Symbol an
Context: python-3.13

(QB_NEW_DE_OTHER_ERROR_IDS_REPLACEMENT_OTHER)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: execute-notebooks
🔇 Additional comments (14)
.github/workflows/execute_notebooks.yml (1)

46-47: RDKit via pip on Python 3.13 is brittle; add a resilient install or alternative source

Manylinux wheels for rdkit on Py3.13 lag. Builds often fail in CI. Add a fallback to rdkit-pypi, or consider excluding it from this workflow if not strictly required.

-          pip install ipykernel rdkit cairosvg pymzml
+          # RDKit can be problematic on Py3.13; try prebuilt wheels first, fallback, or skip if optional
+          pip install ipykernel cairosvg pymzml
+          pip install rdkit-pypi || pip install rdkit || echo "RDKit unavailable on Py3.13; skipping"

Please confirm notebooks do not hard-require RDKit execution for this workflow; if they do, consider pinning a known-good version or switching to conda for this job.

.github/workflows/static.yml (1)

44-49: Add apt-get update and harden RDKit install for Py3.13

Ensure apt indices are fresh, and make RDKit install resilient.

       - name: Install dependencies
         run: |
-          sudo apt install pandoc
-          pip install -r requirements.txt 
-          pip install ipykernel rdkit cairosvg pymzml
+          sudo apt-get update
+          sudo apt-get install -y pandoc
+          pip install -r requirements.txt
+          pip install ipykernel cairosvg pymzml
+          # RDKit wheels for 3.13 may be missing; try alternatives or skip if docs don't require it
+          pip install rdkit-pypi || pip install rdkit || echo "RDKit unavailable on Py3.13; continuing without it"
           pip install .

If documentation sections require RDKit (e.g., nbsphinx runs), consider gating those pages or mocking imports to avoid build failures on RTD/GHA.

docs/Installation.rst (1)

13-14: LGTM: Update to Python 3.13

The installation snippet now matches the repo-wide Python 3.13 target.

README.md (1)

41-44: LGTM: Conda environment updated to Python 3.13

Matches other tooling updates in this PR.

.binder/runtime.txt (1)

1-1: Verify Binder supports python-3.13 for this repo

Binder base images can lag new Python versions. If 3.13 isn’t available, launches will fail.

Please try launching the Binder link and, if it fails, temporarily revert to python-3.12 or supply a full environment.yml to guarantee solver availability.

.github/workflows/ci.yml (1)

10-12: Matrix addition looks good; align with requires-python upper bound

You advertise requires-python <=3.14 in pyproject, but CI doesn’t test 3.14. Either add 3.14 (or 3.14-dev) to the matrix or change requires-python to "<3.14" until supported.

       matrix:
         os: [ubuntu-latest, windows-latest] # note mac-latest tests fail due to slight differences in images
-        python-version: ["3.12", "3.13"]
+        python-version: ["3.12", "3.13"] # add "3.14-dev" when wheels available, or tighten requires-python to "<3.14"
pyproject.toml (2)

10-10: Version bump to 1.0.1 — OK

No issues spotted with the metadata increment.


22-24: Classifiers updated — OK

Adding 3.12 and 3.13 classifiers matches the rest of the PR.

requirements.txt (6)

2-2: Header correctly targets Python 3.13.

Autogenerated note aligns with the PR’s goal. No action needed.


25-26: bleach[css] extras and css/tinycss2 pins look consistent.

Using bleach[css] and pinning cssselect2/tinycss2/webencodings is expected with pip-compile. No issues spotted.

Also applies to: 267-272, 299-303


72-83: Jupyter/IPython/Plotly stack versions look coherent for Python 3.13.

ipykernel/ipython/prompt-toolkit pins align; pydata-sphinx-theme and pygments also consistent. Proceed.

Also applies to: 174-176, 188-199


113-116: Manual Verification Required: Confirm cp313 Wheels for Compiled Dependencies
I attempted to run the automated wheel-availability check, but the output was incomplete and inconclusive. Please manually verify on PyPI that the exact pinned versions in requirements.txt include Python 3.13 (cp313) wheels (or abi3 wheels) for all key compiled dependencies. Without these, installs will fall back to source builds and are likely to fail.

Packages to check (with their pinned versions from requirements.txt):

  • numpy == 2.1.2
  • matplotlib == 3.10.5
  • pillow
  • psutil
  • pyzmq
  • cffi
  • regex
  • rdkit

This also applies to the same groups of lines elsewhere in requirements.txt (lines 138–145, 165–171, 180–181, 216–220, 226–227, 272–276, 35–36). Ensure each one ships a cp313 wheel (or compatible abi3 wheel) for all supported platforms.


174-176: Plotly v6 Upgrade: Sanity‐check all downstream usages

Plotly 6.x introduces breaking changes vs 5.x. Your codebase includes many Plotly references—please review and update as needed:

• In pyopenms_viz/_plotly/core.py:

  • plotly.graph_objects as go
  • plotly.graph_objs.Figure
  • plotly.subplots.make_subplots
    • In pyopenms_viz/testing/PlotlySnapshotExtension.py:
  • plotly.io.to_json
    • In docs/conf.py and gallery scripts:
  • import plotly.io as pio
  • references to plotly.js v2.x in notebooks under nbs/
    • In notebooks (*.ipynb) and Sphinx galleries:
  • ensure Figure.show(), default templates, and I/O methods still work

Check for renamed functions, changed defaults, removed APIs (e.g., template behavior, write_html options), and adjust imports or call signatures accordingly.


228-229: No security advisories affecting pinned versions

Both pinned versions already include the relevant CVE fixes—no further action needed:

  • requests 2.32.4 contains the fix for CVE-2024-47081 and is not vulnerable.
  • urllib3 2.5.0 ships the patches for CVE-2025-50181 and CVE-2025-50182 and is not vulnerable.

"Topic :: Scientific/Engineering :: Chemistry",
]
requires-python = ">=3.10, <=3.13"
requires-python = ">=3.10, <=3.14"
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Re-evaluate requires-python upper bound vs CI coverage

You allow installation on 3.14 but do not test it in CI. Either:

  • Add 3.14 (or 3.14-dev) to CI matrices, or
  • Change to "<3.14" until you officially support it.
-requires-python = ">=3.10, <=3.14"
+# Option A: tighten until CI covers 3.14
+requires-python = ">=3.10, <3.14"

Alternatively, add Python 3.14 to classifiers and CI once available.


🏁 Script executed:

#!/bin/bash
# Search for python-version entries in GitHub Actions workflows to verify CI coverage
grep -R "python-version" -n .github/workflows

Length of output: 554


Re-evaluate requires-python upper bound vs CI coverage

Our GitHub Actions only run on Python 3.12 and 3.13, but pyproject.toml currently allows installation on 3.14. Please choose one of the following:

• Tighten the upper bound until we add CI for 3.14:

- requires-python = ">=3.10, <=3.14"
+ requires-python = ">=3.10, <3.14"

• Or add Python 3.14 (or 3.14-dev) to your CI matrices in:
.github/workflows/ci.yml (matrix.python-version)
.github/workflows/static.yml
.github/workflows/execute_notebooks.yml
– (and any other workflow using python-version)

Once CI passes on 3.14, don’t forget to update your PyPI classifiers to include it.

Comment on lines +220 to +222
rdkit==2025.3.5
# via pyopenms_viz (pyproject.toml)
referencing==0.36.2
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

High risk: rdkit pin may not have Python 3.13 wheels on PyPI.

RDKit wheels on PyPI have historically been limited/inconsistent across OS/architectures. If cp313 wheels aren’t published for 2025.3.5, installs will fail (CI/RTD/users).

Actions:

  • Verify the exact version exists on PyPI and ships cp313 wheels for Linux/macOS/Windows.
  • If not, consider: using conda for rdkit, switching to rdkit-pypi (community wheels), or gating rdkit behind an extra/optional dependency for pip-only installs.

I can help draft extras/platform markers or a docs note with conda-first guidance if needed.

🤖 Prompt for AI Agents
In requirements.txt around lines 220 to 222, the pinned rdkit==2025.3.5 may not
publish cp313 wheels on PyPI causing installs to fail for Python 3.13; verify on
PyPI that rdkit 2025.3.5 ships cp313 wheels for Linux/macOS/Windows and if it
does not, remove or replace the direct pip pin by one of these fixes: (1) remove
rdkit from the main requirements and document a conda-first installation (or add
a conda environment file) so users install RDKit via conda, (2) replace with
rdkit-pypi (community wheels) and test cp313 availability, or (3) make rdkit an
optional extra or use platform/marker-specific requirement lines so pip-only
installs don’t fail; update README/installation docs to reflect the chosen
approach and add CI matrix checks for Python 3.13 to ensure installs succeed.

@jcharkow
Copy link
Collaborator

In theory this should work however, the ci tests will likely have to be updated because they are all visual tests and thus very specific to all the versions that they were created with. I am ok if you want to update 3.13 to be supported however we should keep the testing at 3.12 for now.

Copy link
Collaborator

@jcharkow jcharkow left a comment

Choose a reason for hiding this comment

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

See note above. I am not sure if I am ready to bump everything to 3.13 yet since all the tests are specific for 3.12. Since these are visual snapshots they are very sensitive to version changes.

In theory 3.13 should work though so if we want to just bump that up on PyPI I'm fine with that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would keep this as is for testing purposes.

os: ubuntu-24.04
tools:
python: "3.12"
python: "3.13"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would keep testing at 3.12 for now, see above

matrix:
os: [ubuntu-latest, windows-latest] # note mac-latest tests fail due to slight differences in images
python-version: ["3.12"]
python-version: ["3.12", "3.13"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

would keep testing at 3.13 for now, see above

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.

2 participants