Skip to content

Commit 6a913c2

Browse files
committed
Update git integration example with new function calls
1 parent b74c719 commit 6a913c2

File tree

1 file changed

+78
-47
lines changed

1 file changed

+78
-47
lines changed

examples/pzmmGitIntegrationExample.ipynb renamed to examples/pzmm_git_integration_example.ipynb

Lines changed: 78 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Using GIT with SASCLT/PZMM\n",
7+
"# Using Git with python-sasctl\n",
88
"[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",
99
"***\n",
1010
"## Getting Started\n",
@@ -22,7 +22,12 @@
2222
{
2323
"cell_type": "code",
2424
"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+
},
2631
"outputs": [],
2732
"source": [
2833
"from sasctl import Session, pzmm\n",
@@ -40,14 +45,13 @@
4045
{
4146
"cell_type": "code",
4247
"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"
4952
}
50-
],
53+
},
54+
"outputs": [],
5155
"source": [
5256
"path = input('Local Git Repo Path: ')\n",
5357
"gPath = Path(path)"
@@ -62,15 +66,14 @@
6266
},
6367
{
6468
"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"
7274
}
73-
],
75+
},
76+
"outputs": [],
7477
"source": [
7578
"server = input('Server Name: ')\n",
7679
"username = input('Username: ')\n",
@@ -89,8 +92,13 @@
8992
},
9093
{
9194
"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+
},
94102
"outputs": [],
95103
"source": [
96104
"GI = pzmm.GitIntegrate()"
@@ -105,18 +113,17 @@
105113
},
106114
{
107115
"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"
115121
}
116-
],
122+
},
123+
"outputs": [],
117124
"source": [
118125
"modelUUID = input('Model UUID: ')\n",
119-
"GI.pullViyaModel(modelUUID, gPath)"
126+
"GI.pull_viya_model(modelUUID, gPath)"
120127
]
121128
},
122129
{
@@ -128,18 +135,17 @@
128135
},
129136
{
130137
"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"
138143
}
139-
],
144+
},
145+
"outputs": [],
140146
"source": [
141147
"projectName = input('Project Name: ')\n",
142-
"GI.pullMMProject(gPath, projectName)"
148+
"GI.pull_mm_project(gPath, projectName)"
143149
]
144150
},
145151
{
@@ -151,18 +157,33 @@
151157
},
152158
{
153159
"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+
},
156167
"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+
},
157176
{
158177
"name": "stdout",
159178
"output_type": "stream",
160-
"text": []
179+
"text": [
180+
"A new project named GitMM was created.\n"
181+
]
161182
}
162183
],
163184
"source": [
164185
"localModel = input('Local Model: ')\n",
165-
"GI.pushGitModel(gPath / localModel)"
186+
"GI.push_git_model(gPath / localModel)"
166187
]
167188
},
168189
{
@@ -174,11 +195,16 @@
174195
},
175196
{
176197
"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+
},
179205
"outputs": [],
180206
"source": [
181-
"GI.gitRepoPull(gPath)"
207+
"GI.git_repo_pull(gPath)"
182208
]
183209
},
184210
{
@@ -190,11 +216,16 @@
190216
},
191217
{
192218
"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+
},
195226
"outputs": [],
196227
"source": [
197-
"GI.gitRepoPush(gPath, 'Pushing Local Changes to Remote Repo')"
228+
"GI.git_repo_push(gPath, 'Pushing Local Changes to Remote Repo')"
198229
]
199230
},
200231
{

0 commit comments

Comments
 (0)