Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the project to the latest copier template version (v2.0.5 → v2.1.1), which includes several modernization changes. The most significant change is dropping Python 3.9 support and adding Python 3.13 support, shifting the default Python version from 3.10 to 3.11 across all CI/CD workflows.
Key changes:
- Python version support updated: removed 3.9, added 3.13, with 3.11 as the new default for workflows
- Modernized package installer: workflows now use
uvinstead ofpipfor faster dependency installation - Enhanced bash scripting:
.setup_dev.shupdated with unofficial strict mode for better error handling
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .copier-answers.yml | Updated copier template version and Python version list |
| .github/ISSUE_TEMPLATE/1-bug_report.md | Enhanced bug report template with environment information section |
| .github/workflows/asv-main.yml | Updated to Python 3.11 and ASV 0.6.5 |
| .github/workflows/asv-nightly.yml | Updated to Python 3.11 and ASV 0.6.5 |
| .github/workflows/asv-pr.yml | Updated to Python 3.11 and ASV 0.6.5 |
| .github/workflows/build-documentation.yml | Updated to Python 3.11 |
| .github/workflows/pre-commit-ci.yml | Updated to Python 3.11 and added uv installer |
| .github/workflows/publish-to-pypi.yml | Updated to Python 3.11 |
| .github/workflows/smoke-test.yml | Updated Python version matrix and added uv installer |
| .github/workflows/testing-and-coverage.yml | Updated Python version matrix and added uv installer |
| .pre-commit-config.yaml | Updated validate-pyproject hook to v0.24.1 |
| .readthedocs.yml | Updated to Python 3.11 |
| .setup_dev.sh | Added bash strict mode and updated virtual environment detection (contains version parsing bug) |
| LICENSE | Updated copyright year to 2025 |
| benchmarks/asv.conf.json | Updated default Python version to 3.11 |
| docs/conf.py | Updated copyright year to 2025 |
| pyproject.toml | Modernized license format, updated Python requirement to >=3.10, updated ruff target, removed black/isort config, updated asv dependency |
| tests/hyrax/test_packaging.py | Added new test to verify package version attribute |
| echo "Checking pip version" | ||
| MINIMUM_PIP_VERSION=22 | ||
| pipversion=( $(python -m pip --version | awk '{print $2}' | sed 's/\./ /g') ) | ||
| pipversion=( $(python -m pip --version | awk '{print $2}' | sed 's/\./\n\t/g') ) |
There was a problem hiding this comment.
The version parsing on this line is broken due to the IFS change on line 8. The new strict mode sets IFS=$'\n\t' (newline and tab only), which means array splitting won't happen on spaces anymore. The sed replacement pattern 's/\./\n\t/g' attempts to replace dots with newline+tab, but:
- In sed's replacement string,
\nis not universally supported (it's GNU sed specific and version-dependent). It may produce literal characters instead of actual newlines. - Even if it works, the mixed newline+tab delimiter is unusual and fragile.
The original code used 's/\./ /g' to replace dots with spaces and relied on the default IFS (which includes spaces) for array splitting. To fix this, either:
- Temporarily reset IFS before the array assignment:
IFS=' ' pipversion=( ... ) - Or use a different approach that works with the new IFS, such as:
IFS=$'\n' pipversion=( $(python -m pip --version | awk '{print $2}' | sed 's/\./\n/g') )
| pipversion=( $(python -m pip --version | awk '{print $2}' | sed 's/\./\n\t/g') ) | |
| IFS='.' read -ra pipversion <<< "$(python -m pip --version | awk '{print $2}')" |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #545 +/- ##
==========================================
- Coverage 55.31% 55.28% -0.03%
==========================================
Files 52 52
Lines 5055 5052 -3
==========================================
- Hits 2796 2793 -3
Misses 2259 2259 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Click here to view all benchmarks. |
aritraghsh09
left a comment
There was a problem hiding this comment.
This looks good to me. No comments!
This PR is the result of running
copier update ..Note that the biggest change I made was to remove support for 3.9 and add support for 3.13. Due to this change, the "average" python version we use for github workflows is now 3.11 instead of 3.10.