Skip to content

Conversation

@jmmshn
Copy link
Collaborator

@jmmshn jmmshn commented Jul 21, 2025

Summary

Updates GitHub Actions workflows with modernized configurations and dependency updates:

  • Python publishing: Switch to trusted publishing using OIDC tokens instead of API tokens
  • Testing workflow: Add Python 3.12 support and update action versions (codecov v4, gh-pages v4)
  • Pre-commit updates: Modernize workflow with latest action versions and Python 3.11 default

Changes

  • .github/workflows/python-publish.yml: Enable trusted publishing with id-token: write permission, remove deprecated password parameter
  • .github/workflows/testing.yml: Add Python 3.12 to test matrix, update codecov action to v4, update gh-pages action to v4
  • .github/workflows/update-precommit.yml: Update all actions to latest versions (checkout v4, setup-python v5, create-pull-request v6)

Benefits

  • More secure package publishing using OpenID Connect
  • Extended Python version support (3.10, 3.11, 3.12)
  • Latest GitHub Actions with improved security and features

🤖 Generated with Claude Code

@codecov
Copy link

codecov bot commented Jul 21, 2025

Codecov Report

Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.94%. Comparing base (a3bb39b) to head (52e203c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pymatgen/analysis/defects/plotting/thermo.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #217   +/-   ##
=======================================
  Coverage   90.94%   90.94%           
=======================================
  Files          14       14           
  Lines        2264     2265    +1     
  Branches      287      287           
=======================================
+ Hits         2059     2060    +1     
  Misses        118      118           
  Partials       87       87           

☔ 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.

@jmmshn jmmshn requested a review from Copilot July 21, 2025 19:45
@jmmshn jmmshn changed the title [WIP] Update linting tools and fixes [WIP] Update linting tools and and workflows Jul 21, 2025

This comment was marked as outdated.

@jmmshn jmmshn requested a review from Copilot July 21, 2025 20:16

This comment was marked as outdated.

@jmmshn jmmshn requested a review from Copilot July 21, 2025 20:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modernizes linting tools and GitHub Actions workflows while also cleaning up code quality issues identified by updated linters. The changes improve code maintainability, security, and Python version support.

Key changes:

  • Updates GitHub Actions workflows with modern security practices (OIDC tokens) and Python 3.12 support
  • Updates pre-commit hook versions for ruff, mypy, and codespell
  • Fixes various code quality issues including deprecated NumPy functions, import organization, and string formatting

Reviewed Changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/workflows/python-publish.yml Adds OIDC token support for secure package publishing
.github/workflows/testing.yml Adds Python 3.12 support and updates action versions
.github/workflows/update-precommit.yml Updates action versions and Python version
.pre-commit-config.yaml Updates ruff, mypy, and codespell to latest versions
pyproject.toml Adds new lint rule ignores and notebook-specific exceptions
pymatgen/analysis/defects/utils.py Removes unnecessary int() casting
pymatgen/analysis/defects/recombination.py Replaces deprecated np.trapz with np.trapezoid
Various Python files Import organization, string formatting, and logging improvements
Notebook files Removes unused imports and improves code formatting

@jmmshn jmmshn changed the title [WIP] Update linting tools and and workflows Update linting tools and and workflows Jul 22, 2025
@jmmshn jmmshn merged commit a5427f7 into main Jul 22, 2025
8 checks passed
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