sc_versioning#
Functions for checking and saving versioning information, such as Python package versions, git versions, etc.
- Highlights:
sc.freeze()
: programmatically store “pip freeze” outputsc.require()
: require a specific version of a packagesc.gitinfo()
: gets the git information (if available) of a given filesc.compareversions()
: easy way to compare version numberssc.metadata()
: collects relevant metadata into a dictionarysc.savearchive()
: saves data as a zip file including versioning metadata
Functions
Alias for pip freeze. |
|
Check whether environment requirements are met. |
|
Retrieve git info |
|
Function to compare versions, expecting both arguments to be a string of the format 1.2.3, but numeric works too. |
|
Try to get information on the calling function, but fail gracefully. |
|
Collect common metadata: useful for exactly recreating (or remembering) the environment at a moment in time. |
|
Read metadata from a saved image; currently only PNG and SVG are supported. |
|
Save any object as a pickled zip file, including metadata as a separate JSON file. |
|
Load a zip file saved with |