Refactor pixi tasks#6
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request refactors the pixi task definitions in pixi.toml to improve organization and maintainability. The main changes include:
Changes:
- Extracted complex inline Python commands into a dedicated script (
tools/nonpy_prettier_modified.py) for handling non-Python file formatting checks - Reorganized pixi.toml tasks with visual comment separators and cleaner task definitions
- Updated pre-commit hooks to pass filenames directly to underlying tools instead of using wrapper tasks
- Updated copier template version reference
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tools/nonpy_prettier_modified.py | New script that replaces inline Python commands for checking modified non-Python files with prettier |
| pixi.toml | Refactored task definitions with added section markers, simplified commands, and new pre-commit-specific tasks |
| .pre-commit-config.yaml | Updated hooks to use new pre-commit-specific tasks and enable filename passing for relevant hooks |
| .copier-answers.yml | Updated template version reference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ################## | ||
| # 🧪 Testing Tasks | ||
| ################### |
There was a problem hiding this comment.
The closing comment marker has an extra '#' character compared to the opening marker. The opening marker has 18 '#' characters while the closing has 19. For consistency, both should have the same number of characters.
| ################### | |
| ################## |
| entry: pixi run docs-format-check-pre | ||
| language: system | ||
| pass_filenames: false | ||
| pass_filenames: true |
There was a problem hiding this comment.
The pixi-docs-format-check hook should include a files filter to only run on Python files, similar to the py-lint-check and py-format-check hooks. Since docformatter is a Python docstring formatter, it should only run on .py files. Add 'files: .py$' to this hook configuration.
| pass_filenames: true | |
| pass_filenames: true | |
| files: \.py$ |
| dist-build = 'python -m build --wheel --outdir dist' | ||
|
|
||
| npm-config = 'npm config set registry https://registry.npmjs.org/' | ||
| prettier-install = 'npm install --no-save --no-audit --no-fund prettier prettier-plugin-toml' |
There was a problem hiding this comment.
The prettier-install task installs external npm packages prettier and prettier-plugin-toml in CI without any version pinning or integrity verification, creating a supply-chain risk. If either package or the npm registry is compromised, malicious code could execute in your GitHub Actions job with access to GITHUB_TOKEN and repository contents. Consider pinning these dependencies to specific versions (or using a lockfile or vendored tooling) and enabling integrity checks so that only trusted, immutable artifacts are used in CI.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
|
@AndrewSazonov I've opened a new pull request, #7, to work on those changes. Once the pull request is ready, I'll request review from you. |
No description provided.