Release mode
For publishing a data product, a release mode ensures reproducibility by associating the product with a specific Git commit hash. This commit hash serves as a unique identifier for the exact version of the EL-PASO code used to generate the data.
By linking the data to a precise point in the Git history, anyone can retrieve the identical code version and replicate the results, guaranteeing that the data product is traceable and verifiable.
Before release mode can be activated, the EL-PASO repository must not contain any changes which are not commited to the repository.
Under release mode, additional metadata of the author who processed the data is also storred as metadata.
el_paso.release_mode
Functions:
el_paso.release_mode.activate_release_mode
activate_release_mode
Activates the package's release mode and validates the repository state.
This function enables a special mode for data processing that records key
information about the execution environment. It checks if the package is
installed and validates that the Git repository is in a clean state (no
uncommitted changes) unless dirty_ok is set to True. Upon successful
activation, it stores metadata about the user, version, and commit hash.
This information is appended to the metadata of any processed variables.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_name
|
str
|
The name of the user activating release mode. |
required |
email_address
|
str
|
The email address of the user. |
required |
el_paso_repository_path
|
str | Path
|
The path to the EL-PASO Git repository. |
required |
dirty_ok
|
bool
|
If |
False
|
Raises:
| Type | Description |
|---|---|
PackageNotFoundError
|
If the 'el_paso' package is not found in the Python environment, indicating it's not properly installed. |
ValueError
|
If the Git repository is not clean and |
Source code in el_paso/release_mode.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |
el_paso.release_mode.get_release_msg
get_release_msg
Retrieves the message associated with the package's release mode.
This message contains metadata about the execution environment, including user information, version, and commit hash, if release mode is active.
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The release mode message if active, otherwise an empty string. |
Source code in el_paso/release_mode.py
79 80 81 82 83 84 85 86 87 88 | |
el_paso.release_mode.is_in_release_mode
is_in_release_mode
Checks if the package's release mode is currently active.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
bool
|
|
Source code in el_paso/release_mode.py
70 71 72 73 74 75 76 | |