You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RHOAIENG-11216: Add script to automate the creation of a new Python-based image from an existing one (#672)
* Add script to automate the creation of a new Python-based image from an existing one
* Add type annotations to function args
* Add missing folders to blocklist
* Removing redundant comment
* Use dataclass in the Args class
* Use context manager for logged_execution
* Set encoding prop on subprocess.run
* Improve log level help message
* Return non-zero code for non-happy scenarios
* Add type annotations to function return
* Final adjustments
* Code review request
This Python script generates a new folder structure for a Python-based project by copying an existing one and updating Python version references. It performs the following steps:
24
+
25
+
1. Copy Folder: Duplicates the specified folder structure.
26
+
1. Update Python Versions: Replaces occurrences of the source Python version with the target version throughout the folder.
27
+
1. Update Lock Files: Executes `pipenv lock` to regenerate lock files based on the new Python version.
28
+
29
+
If `pipenv lock` encounters errors, manual intervention is required to resolve compatibility issues between dependencies. Review the errors reported by `pipenv` and adjust the dependencies as needed.
30
+
31
+
### Examples
32
+
33
+
Create a Python 3.12 version based on the Python 3.9 version for each one that is in the `./base` directory:
0 commit comments