Skip to content

Test with python 3.13#561

Merged
jan-janssen merged 3 commits intomainfrom
py313
Oct 1, 2025
Merged

Test with python 3.13#561
jan-janssen merged 3 commits intomainfrom
py313

Conversation

@jan-janssen
Copy link
Copy Markdown
Member

@jan-janssen jan-janssen commented Oct 1, 2025

Summary by CodeRabbit

  • Chores
    • Expanded official Python compatibility to include Python 3.13 in project metadata and package requirements.
    • Updated CI workflows to use and test against Python 3.13; one workflow entry remains on Python 3.12 and should be aligned.
    • Refreshed package classifiers to list Python 3.13 support.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 1, 2025

Walkthrough

Updated CI workflow Python matrices and setup entries from 3.12 to 3.13 (one ubuntu matrix entry remains 3.12). Updated packaging metadata to allow Python <3.14 and added the Python 3.13 classifier. No other functional or control-flow changes.

Changes

Cohort / File(s) Summary
CI workflow Python version updates
.github/workflows/pipeline.yml
Replaced most python-version: '3.12' occurrences with 3.13 in setup and matrix entries; one ubuntu-latest matrix item still lists 3.12.
Packaging metadata
pyproject.toml
Changed requires-python from ">=3.9, <3.13" to ">=3.9, <3.14" and added classifier Programming Language :: Python :: 3.13.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I hop from twelve up to thirteen's gate,
Nudge CI pins and update the crate.
One shy twelve peeks from under a leaf,
I twitch my nose and leave it a brief relief.
New classifier thumps — a joyous little trait.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “Test with python 3.13” clearly conveys the primary change of updating testing to Python 3.13 in a concise, single-sentence format without extraneous details.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch py313

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 and usage tips.

Copy link
Copy Markdown
Contributor

@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: 0

Caution

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

⚠️ Outside diff range comments (1)
.github/workflows/pipeline.yml (1)

20-20: black_fix job never triggers as intended.

if: failure() at the job level doesn’t reference the result of the black job. Use the needs context.

Apply this diff:

   black_fix:  # in most cases pre-commit is faster
     needs: [black]
-    if: failure()
+    if: ${{ needs.black.result == 'failure' }}
🧹 Nitpick comments (2)
.github/workflows/pipeline.yml (2)

35-37: Guard commit when no changes after formatting.

Avoid failing the job if Black produces no diff (rare but safe). Replace the commit block with a no-op guard.

-        git config --local user.email "pyiron@mpie.de"
-        git config --local user.name "pyiron-runner"
-        git commit -m "Format black" -a
+        git config --local user.email "pyiron@mpie.de"
+        git config --local user.name "pyiron-runner"
+        if ! git diff --quiet; then
+          git commit -m "Format black" -a
+        else
+          echo "No changes to commit"
+        fi

56-63: Reduce duplication in setup-miniconda steps.

Consider YAML anchors or a small reusable workflow for the 3.13 conda setup to DRY repeated blocks.

Example with an anchor:

# Define once (e.g., near the top of the workflow file)
conda-313: &conda-313
  uses: conda-incubator/setup-miniconda@v3
  with:
    python-version: '3.13'
    miniforge-version: latest
    channels: conda-forge
    conda-remove-defaults: "true"
    environment-file: environment.yml

# Use in jobs:
- name: Setup Mambaforge
  <<: *conda-313

Also applies to: 86-94, 111-118, 137-144, 212-219, 240-247, 266-273, 290-297, 317-324, 366-373, 396-403

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 997a87a and 3958255.

📒 Files selected for processing (1)
  • .github/workflows/pipeline.yml (12 hunks)
⏰ 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). (13)
  • GitHub Check: unittest_siesta
  • GitHub Check: unittest_old
  • GitHub Check: unittest_qe
  • GitHub Check: unittest_matrix (ubuntu-latest, 3.13)
  • GitHub Check: unittest_matrix (ubuntu-latest, 3.11)
  • GitHub Check: coverage
  • GitHub Check: unittest_sphinxdft
  • GitHub Check: unittest_matrix (windows-latest, 3.13)
  • GitHub Check: unittest_matrix (macos-latest, 3.13)
  • GitHub Check: unittest_matrix (ubuntu-latest, 3.12)
  • GitHub Check: unittest_mace
  • GitHub Check: unittest_gpaw
  • GitHub Check: notebooks
🔇 Additional comments (3)
.github/workflows/pipeline.yml (3)

58-63: 3.13 rollout looks consistent across jobs.

The version bumps to Python 3.13 in these jobs are coherent and align with the PR objective. LGTM.

Also applies to: 89-94, 113-118, 139-144, 160-161, 163-164, 166-167, 212-219, 240-247, 266-273, 290-297, 317-324, 366-373, 396-403


343-347: Intentional 3.12 for unittest_grace?

All other DFT/ASE jobs are on 3.13. If 3.12 is not required for the Grace toolchain, consider updating to 3.13 for parity; otherwise, a brief comment explaining the pin would prevent future “drift” changes.


39-41: Pin GitHub push-action to v1.0.0
In .github/workflows/pipeline.yml (lines 39–41), replace

uses: ad-m/github-push-action@master

with

uses: ad-m/github-push-action@v1.0.0

to lock to the latest stable release and reduce supply-chain risk.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.71%. Comparing base (847dc1b) to head (3958255).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #561   +/-   ##
=======================================
  Coverage   85.71%   85.71%           
=======================================
  Files          43       43           
  Lines        2591     2591           
=======================================
  Hits         2221     2221           
  Misses        370      370           

☔ View full report in Codecov by Sentry.
📢 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.

@jan-janssen jan-janssen merged commit ebe57cd into main Oct 1, 2025
28 checks passed
@jan-janssen jan-janssen deleted the py313 branch October 1, 2025 12:28
This was referenced Oct 21, 2025
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