Skip to content

Commit 2230556

Browse files
authored
Add branch versioning draft (#2309)
* Add branch versioning draft * Fix wording in differences * remove identifying info * Add title and description * Add title and description saved * Remove private object call * Use correct import
1 parent 04f4b76 commit 2230556

File tree

2 files changed

+636
-86
lines changed

2 files changed

+636
-86
lines changed

guide/04-feature-data-and-analysis/part2_branch_versioning_with_parcel_fabrics.ipynb

Lines changed: 29 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -51,87 +51,69 @@
5151
},
5252
{
5353
"cell_type": "code",
54-
"execution_count": 3,
54+
"execution_count": 1,
5555
"id": "3b5328c1",
5656
"metadata": {},
5757
"outputs": [],
5858
"source": [
5959
"from arcgis import GIS\n",
60-
"from arcgis.features import _version"
60+
"from arcgis.features import FeatureLayerCollection"
6161
]
6262
},
6363
{
6464
"cell_type": "code",
65-
"execution_count": 5,
65+
"execution_count": 7,
6666
"id": "abdf9cc2",
6767
"metadata": {},
68-
"outputs": [
69-
{
70-
"name": "stderr",
71-
"output_type": "stream",
72-
"text": [
73-
"Setting `verify_cert` to False is a security risk, use at your own risk.\n"
74-
]
75-
}
76-
],
68+
"outputs": [],
7769
"source": [
7870
"base_server_url = (\n",
79-
" \"https://rextapilnx02eb.mysite.com/server/rest/services/WashingtonCounty/\"\n",
71+
" \"https://example.server.com/server/rest/services/WashingtonCountyLSA/\"\n",
8072
")\n",
8173
"gis = GIS(\n",
82-
" \"https://myenterprisesite.com/portal/\",\n",
83-
" \"my_user_name\",\n",
84-
" \"my_secure_password\",\n",
85-
" verify_cert=False,\n",
74+
" \"https://example.server.com/portal/\",\n",
75+
" \"admin\",\n",
76+
" \"esri.agp\",\n",
8677
")"
8778
]
8879
},
8980
{
9081
"cell_type": "markdown",
91-
"id": "522387ea",
82+
"id": "903d406b-e96b-4f8f-92f9-064930d5cd70",
9283
"metadata": {},
9384
"source": [
94-
"### Access branch versions via Version Management Server"
85+
"### Access the Version Management Server through the Parcel Fabric `FeatureLayerCollection` object\n",
86+
"\n",
87+
"The `versions` property in a parcel fabric `FeatureLayerCollection` (FLC) creates a `VersionManager` object to create, update and use versions. \n",
88+
"\n",
89+
"The `FeatureServer` endpoint is used to create a `FeatureLayerCollection`."
9590
]
9691
},
9792
{
9893
"cell_type": "code",
99-
"execution_count": 11,
100-
"id": "bf7b899c",
94+
"execution_count": 10,
95+
"id": "db6cc7e3-76de-4fdf-bbb2-006159e7df1c",
10196
"metadata": {},
10297
"outputs": [
10398
{
10499
"data": {
105100
"text/plain": [
106-
"{\n",
107-
" \"name\": \"Version Management Server\",\n",
108-
" \"type\": \"Map Server Extension\",\n",
109-
" \"defaultVersionName\": \"sde.DEFAULT\",\n",
110-
" \"defaultVersionGuid\": \"{BD3F4817-9A00-41AC-B0CC-58F78DBAE0A1}\",\n",
111-
" \"capabilities\": {\n",
112-
" \"supportsConflictDetectionByAttribute\": true,\n",
113-
" \"supportsPartialPost\": true,\n",
114-
" \"supportsDifferencesFromMoment\": true,\n",
115-
" \"supportsDifferencesWithLayers\": true,\n",
116-
" \"supportsAsyncReconcile\": true,\n",
117-
" \"supportsAsyncPost\": true,\n",
118-
" \"supportsAsyncDifferences\": true,\n",
119-
" \"supportsOutSR\": true\n",
120-
" }\n",
121-
"}"
101+
"< VersionManager @ https://example.server.com/server/rest/services/WashingtonCountyLSA/VersionManagementServer >"
122102
]
123103
},
124-
"execution_count": 11,
104+
"execution_count": 10,
125105
"metadata": {},
126106
"output_type": "execute_result"
127107
}
128108
],
129109
"source": [
130-
"from arcgis.features._version import VersionManager\n",
110+
"from arcgis.features.layer import FeatureLayerCollection\n",
111+
"\n",
112+
"parcel_fabric_feature_server_url = f\"{base_server_url}/FeatureServer\"\n",
113+
"parcel_fabric_flc = FeatureLayerCollection(parcel_fabric_feature_server_url, gis)\n",
131114
"\n",
132-
"version_management_server_url = f\"{base_server_url}/VersionManagementServer\"\n",
133-
"vms = VersionManager(version_management_server_url, gis)\n",
134-
"vms.properties"
115+
"vms = parcel_fabric_flc.versions\n",
116+
"vms"
135117
]
136118
},
137119
{
@@ -144,18 +126,19 @@
144126
},
145127
{
146128
"cell_type": "code",
147-
"execution_count": 12,
129+
"execution_count": 11,
148130
"id": "31fcaff3",
149131
"metadata": {},
150132
"outputs": [
151133
{
152134
"data": {
153135
"text/plain": [
154136
"[<Version sde.DEFAULT @ {BD3F4817-9A00-41AC-B0CC-58F78DBAE0A1}>,\n",
155-
" <Version mycreator.merge_version_1 @ {D1FDA18B-7B15-4773-9D7D-814092D88171}>]"
137+
" <Version user.Editor1 @ {7FC9DF13-6E04-46D2-A1A4-19410463B696}>,\n",
138+
" <Version user.QA_Editor @ {3860EB29-81C8-4B50-BBE3-9C8DA823B307}>]"
156139
]
157140
},
158-
"execution_count": 12,
141+
"execution_count": 11,
159142
"metadata": {},
160143
"output_type": "execute_result"
161144
}
@@ -219,46 +202,6 @@
219202
"version # view the version's properties"
220203
]
221204
},
222-
{
223-
"cell_type": "markdown",
224-
"id": "325394fc",
225-
"metadata": {},
226-
"source": [
227-
"### Access the Version Management Server through the Parcel Fabric `FeatureLayerCollection` object\n",
228-
"\n",
229-
"The `versions` property in a parcel fabric `FeatureLayerCollection` (FLC) creates a `VersionManager` object to create, update and use versions. \n",
230-
"\n",
231-
"The `FeatureServer` endpoint is used to create a `FeatureLayerCollection`."
232-
]
233-
},
234-
{
235-
"cell_type": "code",
236-
"execution_count": 14,
237-
"id": "e77b0221",
238-
"metadata": {},
239-
"outputs": [
240-
{
241-
"data": {
242-
"text/plain": [
243-
"['sde.DEFAULT', 'my_user_name.fabric_editor_1', 'mycreator.merge_version_1']"
244-
]
245-
},
246-
"execution_count": 14,
247-
"metadata": {},
248-
"output_type": "execute_result"
249-
}
250-
],
251-
"source": [
252-
"from arcgis.features.layer import FeatureLayerCollection\n",
253-
"\n",
254-
"parcel_fabric_feature_server_url = f\"{base_server_url}/FeatureServer\"\n",
255-
"parcel_fabric_flc = FeatureLayerCollection(parcel_fabric_feature_server_url, gis)\n",
256-
"\n",
257-
"# print the version names from the FLC's versions property:\n",
258-
"vms_from_flc = parcel_fabric_flc.versions\n",
259-
"[v.properties.versionName for v in vms_from_flc.all]"
260-
]
261-
},
262205
{
263206
"cell_type": "markdown",
264207
"id": "fb52f011",
@@ -377,7 +320,7 @@
377320
"name": "python",
378321
"nbconvert_exporter": "python",
379322
"pygments_lexer": "ipython3",
380-
"version": "3.11.0"
323+
"version": "3.13.5"
381324
},
382325
"toc": {
383326
"base_numbering": 1,

0 commit comments

Comments
 (0)