environment
This module reads in environment variables.
_local_file_contains_remote_lines(local_file_path, remote_file_path)
Compares the contents of two files, one local and one remote.
Returns True if the contents of the local file include all lines in the remote file, False otherwise.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
local_file_path
|
str
|
The path to the local file to compare. |
required |
remote_file_path
|
str
|
The path to the remote file to compare. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if the contents of the local file include all lines in the remote file, False otherwise. |
Source code in ssb_project_cli/ssb_project/build/environment.py
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 |
|
reset_global_gitconfig()
Reset the global gitconfig using 'kvakk-git-tools' module.
This function attempts to configure the global gitconfig using the 'kvakk-git-tools' module. If the configuration fails, an error message is printed indicating the platform's support status.
Source code in ssb_project_cli/ssb_project/build/environment.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
running_onprem(image_spec)
Are we running in Jupyter on-prem?
Parameters:
Name | Type | Description | Default |
---|---|---|---|
image_spec
|
str
|
Value of the JUPYTER_IMAGE_SPEC environment variable |
required |
Returns:
Type | Description |
---|---|
bool
|
True if running on-prem, else False. |
Source code in ssb_project_cli/ssb_project/build/environment.py
15 16 17 18 19 20 21 22 23 24 |
|
verify_local_config(template_repo_url, checkout, cwd='')
Verifies that the local configuration files contains all lines from the files in the remote repository.
Returns True if local config is following SSB recommendations otherwise False.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
template_repo_url
|
str
|
Template repository url |
required |
checkout
|
str | None
|
The git reference to check against. Supports branches, tags and commit hashes. |
required |
cwd
|
str
|
Current working directory |
''
|
Source code in ssb_project_cli/ssb_project/build/environment.py
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|