-
Notifications
You must be signed in to change notification settings - Fork 14
Update linting tools and and workflows #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
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. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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 |
Summary
Updates GitHub Actions workflows with modernized configurations and dependency updates:
Changes
.github/workflows/python-publish.yml: Enable trusted publishing withid-token: writepermission, remove deprecatedpasswordparameter.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
🤖 Generated with Claude Code