Update Python scripts and enhance dependency management#1412
Update Python scripts and enhance dependency management#1412socketz wants to merge 7 commits intomandiant:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR improves Python scripts for package management by fixing regex patterns, adding functions to dynamically retrieve package versions from common.vm and nodejs.vm, and introducing a new method to update metapackage dependencies.
- Enhanced regex pattern in
update_dependenciesto handle optional whitespace - Added
update_metapackage_dependenciesfunction for packages with single dependencies - Created dynamic version retrieval functions for
common.vmandnodejs.vmpackages
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/utils/update_package.py | Fixed regex pattern and added metapackage dependency update functionality |
| scripts/utils/create_package_template.py | Added dynamic version retrieval functions and updated templates to use dynamic versions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| for line in f: | ||
| if "<version>" in line: | ||
| return line.split("<version>")[1].split("</version>")[0].strip() | ||
| return "0.0.0.20250206" # Default version if version tag is not found |
There was a problem hiding this comment.
The hardcoded default version should be a constant or configuration value to avoid magic numbers and ensure consistency across the codebase.
| for line in f: | ||
| if "<version>" in line: | ||
| return line.split("<version>")[1].split("</version>")[0].strip() | ||
| return "0.0.0.20250219" # Default version if version tag is not found |
There was a problem hiding this comment.
The hardcoded default version should be a constant or configuration value to avoid magic numbers and ensure consistency across the codebase.
Improve Python scripts by fixing issues and adding functions to retrieve package versions from
common.vmandnodejs.vm. Introduce a new method to update metapackage dependencies based on the latest available versions.