state_utils
Utils for getting and setting the state.
StateObjectHandler
Handles operations around persisting the state.
Source code in dapla_team_cli/pr/state/state_utils.py
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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
__init__(bucket_name, user_project)
Initializes the class.
Source code in dapla_team_cli/pr/state/state_utils.py
26 27 28 29 30 31 32 |
|
fetch_state(state_object_name=None)
Fetch a state object and deserialize it.
Source code in dapla_team_cli/pr/state/state_utils.py
54 55 56 57 58 59 60 61 62 |
|
get_bucket()
Return a bucket object.
Source code in dapla_team_cli/pr/state/state_utils.py
40 41 42 43 44 |
|
get_client()
Return a GCS storage client.
Source code in dapla_team_cli/pr/state/state_utils.py
34 35 36 37 38 |
|
get_user_state()
Prompt the user to select a run from those available and return that run as a state object.
Source code in dapla_team_cli/pr/state/state_utils.py
46 47 48 49 50 51 52 |
|
list_blobs(show_other_users)
Fetch a list of blobs from a bucket.
Source code in dapla_team_cli/pr/state/state_utils.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
set_state(state)
Serialize the state object and write it to a json file in persistent storage.
Source code in dapla_team_cli/pr/state/state_utils.py
64 65 66 67 68 |
|
user_select_run(show_other_users=False)
Prompt the user to select a run from a list of available options.
Source code in dapla_team_cli/pr/state/state_utils.py
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|