|
4 | 4 | "cell_type": "markdown",
|
5 | 5 | "metadata": {},
|
6 | 6 | "source": [
|
7 |
| - "# Using GIT with SASCLT/PZMM\n", |
| 7 | + "# Using Git with python-sasctl\n", |
8 | 8 | "[Git](https://git-scm.com/) is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Many organizations use Git for tracking changes in files and collaborating on code. In this notebook, we will walk through how to leverage SASCTL/PZMM to move assets from [SAS Model Manager](https://www.sas.com/en_us/software/model-manager.html) to a Git Repository. \n",
|
9 | 9 | "***\n",
|
10 | 10 | "## Getting Started\n",
|
|
22 | 22 | {
|
23 | 23 | "cell_type": "code",
|
24 | 24 | "execution_count": 1,
|
25 |
| - "metadata": {}, |
| 25 | + "metadata": { |
| 26 | + "ExecuteTime": { |
| 27 | + "end_time": "2023-06-08T17:13:54.264991700Z", |
| 28 | + "start_time": "2023-06-08T17:13:52.475844400Z" |
| 29 | + } |
| 30 | + }, |
26 | 31 | "outputs": [],
|
27 | 32 | "source": [
|
28 | 33 | "from sasctl import Session, pzmm\n",
|
|
40 | 45 | {
|
41 | 46 | "cell_type": "code",
|
42 | 47 | "execution_count": 2,
|
43 |
| - "metadata": {}, |
44 |
| - "outputs": [ |
45 |
| - { |
46 |
| - "name": "stdout", |
47 |
| - "output_type": "stream", |
48 |
| - "text": [] |
| 48 | + "metadata": { |
| 49 | + "ExecuteTime": { |
| 50 | + "end_time": "2023-06-08T17:15:12.394135200Z", |
| 51 | + "start_time": "2023-06-08T17:15:09.678909400Z" |
49 | 52 | }
|
50 |
| - ], |
| 53 | + }, |
| 54 | + "outputs": [], |
51 | 55 | "source": [
|
52 | 56 | "path = input('Local Git Repo Path: ')\n",
|
53 | 57 | "gPath = Path(path)"
|
|
62 | 66 | },
|
63 | 67 | {
|
64 | 68 | "cell_type": "code",
|
65 |
| - "execution_count": 15, |
66 |
| - "metadata": {}, |
67 |
| - "outputs": [ |
68 |
| - { |
69 |
| - "name": "stdout", |
70 |
| - "output_type": "stream", |
71 |
| - "text": [] |
| 69 | + "execution_count": 3, |
| 70 | + "metadata": { |
| 71 | + "ExecuteTime": { |
| 72 | + "end_time": "2023-06-08T17:16:09.642790500Z", |
| 73 | + "start_time": "2023-06-08T17:15:48.911501800Z" |
72 | 74 | }
|
73 |
| - ], |
| 75 | + }, |
| 76 | + "outputs": [], |
74 | 77 | "source": [
|
75 | 78 | "server = input('Server Name: ')\n",
|
76 | 79 | "username = input('Username: ')\n",
|
|
89 | 92 | },
|
90 | 93 | {
|
91 | 94 | "cell_type": "code",
|
92 |
| - "execution_count": 8, |
93 |
| - "metadata": {}, |
| 95 | + "execution_count": 4, |
| 96 | + "metadata": { |
| 97 | + "ExecuteTime": { |
| 98 | + "end_time": "2023-06-08T17:16:18.907212700Z", |
| 99 | + "start_time": "2023-06-08T17:16:18.893051Z" |
| 100 | + } |
| 101 | + }, |
94 | 102 | "outputs": [],
|
95 | 103 | "source": [
|
96 | 104 | "GI = pzmm.GitIntegrate()"
|
|
105 | 113 | },
|
106 | 114 | {
|
107 | 115 | "cell_type": "code",
|
108 |
| - "execution_count": 9, |
109 |
| - "metadata": {}, |
110 |
| - "outputs": [ |
111 |
| - { |
112 |
| - "name": "stdout", |
113 |
| - "output_type": "stream", |
114 |
| - "text": [] |
| 116 | + "execution_count": 5, |
| 117 | + "metadata": { |
| 118 | + "ExecuteTime": { |
| 119 | + "end_time": "2023-06-08T17:17:02.066799Z", |
| 120 | + "start_time": "2023-06-08T17:16:59.640654900Z" |
115 | 121 | }
|
116 |
| - ], |
| 122 | + }, |
| 123 | + "outputs": [], |
117 | 124 | "source": [
|
118 | 125 | "modelUUID = input('Model UUID: ')\n",
|
119 |
| - "GI.pullViyaModel(modelUUID, gPath)" |
| 126 | + "GI.pull_viya_model(modelUUID, gPath)" |
120 | 127 | ]
|
121 | 128 | },
|
122 | 129 | {
|
|
128 | 135 | },
|
129 | 136 | {
|
130 | 137 | "cell_type": "code",
|
131 |
| - "execution_count": 10, |
132 |
| - "metadata": {}, |
133 |
| - "outputs": [ |
134 |
| - { |
135 |
| - "name": "stdout", |
136 |
| - "output_type": "stream", |
137 |
| - "text": [] |
| 138 | + "execution_count": 6, |
| 139 | + "metadata": { |
| 140 | + "ExecuteTime": { |
| 141 | + "end_time": "2023-06-08T17:17:16.252365900Z", |
| 142 | + "start_time": "2023-06-08T17:17:10.612062700Z" |
138 | 143 | }
|
139 |
| - ], |
| 144 | + }, |
| 145 | + "outputs": [], |
140 | 146 | "source": [
|
141 | 147 | "projectName = input('Project Name: ')\n",
|
142 |
| - "GI.pullMMProject(gPath, projectName)" |
| 148 | + "GI.pull_mm_project(gPath, projectName)" |
143 | 149 | ]
|
144 | 150 | },
|
145 | 151 | {
|
|
151 | 157 | },
|
152 | 158 | {
|
153 | 159 | "cell_type": "code",
|
154 |
| - "execution_count": 17, |
155 |
| - "metadata": {}, |
| 160 | + "execution_count": 7, |
| 161 | + "metadata": { |
| 162 | + "ExecuteTime": { |
| 163 | + "end_time": "2023-06-08T17:18:06.209073400Z", |
| 164 | + "start_time": "2023-06-08T17:17:30.912299900Z" |
| 165 | + } |
| 166 | + }, |
156 | 167 | "outputs": [
|
| 168 | + { |
| 169 | + "name": "stderr", |
| 170 | + "output_type": "stream", |
| 171 | + "text": [ |
| 172 | + "C:\\Users\\sclind\\Documents\\Python Scripts\\GitHub\\sassoftware\\python-sasctl\\src\\sasctl\\pzmm\\git_integration.py:144: UserWarning: No project with the name or UUID GitMM was found.\n", |
| 173 | + " warn(f\"No project with the name or UUID {project} was found.\")\n" |
| 174 | + ] |
| 175 | + }, |
157 | 176 | {
|
158 | 177 | "name": "stdout",
|
159 | 178 | "output_type": "stream",
|
160 |
| - "text": [] |
| 179 | + "text": [ |
| 180 | + "A new project named GitMM was created.\n" |
| 181 | + ] |
161 | 182 | }
|
162 | 183 | ],
|
163 | 184 | "source": [
|
164 | 185 | "localModel = input('Local Model: ')\n",
|
165 |
| - "GI.pushGitModel(gPath / localModel)" |
| 186 | + "GI.push_git_model(gPath / localModel)" |
166 | 187 | ]
|
167 | 188 | },
|
168 | 189 | {
|
|
174 | 195 | },
|
175 | 196 | {
|
176 | 197 | "cell_type": "code",
|
177 |
| - "execution_count": 19, |
178 |
| - "metadata": {}, |
| 198 | + "execution_count": 8, |
| 199 | + "metadata": { |
| 200 | + "ExecuteTime": { |
| 201 | + "end_time": "2023-06-08T17:18:28.802330500Z", |
| 202 | + "start_time": "2023-06-08T17:18:26.726258500Z" |
| 203 | + } |
| 204 | + }, |
179 | 205 | "outputs": [],
|
180 | 206 | "source": [
|
181 |
| - "GI.gitRepoPull(gPath)" |
| 207 | + "GI.git_repo_pull(gPath)" |
182 | 208 | ]
|
183 | 209 | },
|
184 | 210 | {
|
|
190 | 216 | },
|
191 | 217 | {
|
192 | 218 | "cell_type": "code",
|
193 |
| - "execution_count": 20, |
194 |
| - "metadata": {}, |
| 219 | + "execution_count": 9, |
| 220 | + "metadata": { |
| 221 | + "ExecuteTime": { |
| 222 | + "end_time": "2023-06-08T17:18:35.334301900Z", |
| 223 | + "start_time": "2023-06-08T17:18:33.248245600Z" |
| 224 | + } |
| 225 | + }, |
195 | 226 | "outputs": [],
|
196 | 227 | "source": [
|
197 |
| - "GI.gitRepoPush(gPath, 'Pushing Local Changes to Remote Repo')" |
| 228 | + "GI.git_repo_push(gPath, 'Pushing Local Changes to Remote Repo')" |
198 | 229 | ]
|
199 | 230 | },
|
200 | 231 | {
|
|
0 commit comments