[OC-760] Module directory version freeze & install#397
Draft
cvaske wants to merge 2 commits into
Draft
Conversation
Outputs installed modules as a JSON array with name, version, and type fields, enabling environment snapshots (oc module freeze > modules.json).
Implements a pip-style freeze/restore workflow for OpenCRAVAT modules. `oc module freeze` outputs all installed modules as a JSON array with name, version, and type fields. Use `-i`/`--include-hidden` to include hidden modules. Output goes to stdout and can be redirected to a file. `oc module install-freeze` reads a freeze JSON file and installs the pinned versions. Analogous to `pip install -r requirements.txt`. Options for `oc module freeze`: -i, --include-hidden Include hidden modules in output --md MD Specify the root directory of OpenCRAVAT modules Options for `oc module install-freeze`: freeze_file Path to freeze JSON file, or - to read from stdin -f, --force Reinstall even if the correct version is already installed -y, --yes Proceed without prompt --skip-dependencies Skip installing dependencies --md MD Specify the root directory of OpenCRAVAT modules Example usage: # Save current module state oc module freeze > modules.json # Restore pinned modules on another system oc module install-freeze modules.json # Non-interactive restore oc module install-freeze -y modules.json # Pipe directly (no intermediate file) oc module freeze | oc module install-freeze - # Force reinstall of all pinned versions oc module install-freeze -f -y modules.json
Collaborator
|
Please change |
Collaborator
|
Remove --include-hidden and make it the default. Include all modules that are installed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
oc module freezeandoc module install-freezecommandsImplements a pip-style freeze/restore workflow for OpenCRAVAT modules.
oc module freezeoutputs all installed modules as a JSON array withname, version, and type fields. Use
-i/--include-hiddento includehidden modules. Output goes to stdout and can be redirected to a file.
oc module install-freezereads a freeze JSON file and installs thepinned versions. Analogous to
pip install -r requirements.txt.Options for
oc module freeze:-i,--include-hiddenInclude hidden modules in output--md MDSpecify the root directory of OpenCRAVAT modulesOptions for
oc module install-freeze:freeze_filePath to freeze JSON file, or - to read from stdin-f,--forceReinstall even if the correct version is already installed-y,--yesProceed without prompt--skip-dependenciesSkip installing dependencies--md MDSpecify the root directory of OpenCRAVAT modulesExample usage: