Skip to content

Commit 0673b4f

Browse files
authored
Merge pull request #2412 from Esri/update_item_properties_dataclass
Update guides to use type over item_type for 2.4.3
2 parents 0af87cc + d96963a commit 0673b4f

12 files changed

Lines changed: 62 additions & 29 deletions

File tree

.github/workflows/DockerBuild.NotebookImage.yaml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,27 @@ on:
1111
version:
1212
description: "Version of ArcGIS API for Python to install in the image"
1313
type: string
14-
default: "2.4.1"
14+
default: "2.4.2"
15+
arcgis_mapping_version:
16+
description: "Version of arcgis-mapping to install in the image (only used if version >= 2.4.0)"
17+
type: string
18+
default: "4.33.0"
1519
python_version:
1620
description: "Python version to base image on"
1721
type: string
18-
default: "3.11"
22+
default: "3.13"
1923
is_latest_release:
2024
description: "Version of ArcGIS API for Python is Latest current release"
2125
type: boolean
2226
default: false
27+
arcgis_wheel_url:
28+
description: "Use a custom version of ArcGIS API for Python from this wheel URL, if empty, use pypi.org; if provided, `-prerelease` will be appended to the image tag"
29+
type: string
30+
default: ""
31+
arcgis_mapping_wheel_url:
32+
description: "Use a custom version of arcgis-mapping from this wheel URL, if empty, install from pypi.org; if provided, `-prerelease` will be appended to the image tag"
33+
type: string
34+
default: ""
2335
is_default_supported_python:
2436
description: "Python version is default supported version (i.e. python used by Pro and Enterprise)"
2537
type: boolean
@@ -52,10 +64,10 @@ jobs:
5264
images: |
5365
ghcr.io/esri/arcgis-python-api-notebook
5466
tags: |
55-
type=raw,value=${{ inputs.version }}-python${{ inputs.python_version }}
56-
type=raw,value=${{ inputs.version }},enable=${{ inputs.is_default_supported_python && github.ref_name == github.event.repository.default_branch }}
57-
type=raw,value=latest,enable=${{ inputs.is_latest_release && inputs.is_default_supported_python && github.ref_name == github.event.repository.default_branch }}
58-
type=schedule,pattern={{date 'YY.MM'}},enable=${{ inputs.is_latest_release && inputs.is_default_supported_python && github.ref_name == github.event.repository.default_branch }}
67+
type=raw,value=${{ inputs.version }}-python${{ inputs.python_version }}${{ inputs.arcgis_wheel_url != '' && '-prerelease' || '' }}
68+
type=raw,value=${{ inputs.version }},enable=${{ inputs.is_default_supported_python && inputs.arcgis_wheel_url == '' && github.ref_name == github.event.repository.default_branch }}
69+
type=raw,value=latest,enable=${{ inputs.arcgis_wheel_url == '' && inputs.is_latest_release && inputs.is_default_supported_python && github.ref_name == github.event.repository.default_branch }}
70+
type=schedule,pattern={{date 'YY.MM'}},enable=${{ inputs.arcgis_wheel_url == '' && inputs.is_latest_release && inputs.is_default_supported_python && github.ref_name == github.event.repository.default_branch }}
5971
6072
- id: docker_build
6173
name: Build image and push to GitHub Container Registry
@@ -67,6 +79,9 @@ jobs:
6779
build-args: |
6880
python_version=${{ inputs.python_version }}
6981
arcgis_version=${{ inputs.version }}
82+
arcgis_mapping_version=${{ inputs.arcgis_mapping_version }}
83+
arcgis_wheel_url=${{ inputs.arcgis_wheel_url }}
84+
arcgis_mapping_wheel_url=${{ inputs.arcgis_mapping_wheel_url }}
7085
tags: ${{ steps.meta.outputs.tags }}
7186
provenance: false
7287
platforms: linux/amd64

docker/NotebookImage.Dockerfile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
ARG python_version="3.11"
1+
ARG python_version="3.13"
22
FROM quay.io/jupyter/minimal-notebook:python-${python_version}
33

44
ARG python_version
5-
ARG arcgis_version="2.4.1"
6-
ARG gdal_version="3.10.2"
5+
ARG arcgis_version="2.4.2"
6+
ARG arcgis_mapping_version="4.33.0"
7+
ARG gdal_version="3.11.4"
8+
# If arcgis_wheel_url is provided, the Dockerfile will attempt to install the ArcGIS API for Python from that URL
9+
ARG arcgis_wheel_url=""
10+
ARG arcgis_mapping_wheel_url=""
11+
712
ARG sampleslink="https://github.com/Esri/arcgis-python-api/releases/download/v${arcgis_version}/samples.zip"
813
ARG githubfolder="arcgis-python-api"
914
ARG env_name=arcgis
@@ -25,17 +30,20 @@ RUN conda install -n ${env_name} -c conda-forge gdal=${gdal_version} -y --quiet
2530
&& conda clean --all -f -y \
2631
&& find /opt/conda -name __pycache__ -type d -exec rm -rf {} +
2732

33+
RUN echo "${arcgis_wheel_url:-arcgis==${arcgis_version}.*}" > /tmp/arcgis_source.txt
34+
2835
# Install ArcGIS API for Python from pypi
2936
RUN . activate ${env_name} \
30-
# adding .* ensures the latest patch version is installed
31-
&& python -m pip install "arcgis==${arcgis_version}.*" \
37+
&& python -m pip install "$(cat /tmp/arcgis_source.txt)" \
3238
&& conda clean --all -f -y \
3339
&& find /opt/conda -name __pycache__ -type d -exec rm -rf {} +
3440

41+
RUN echo "${arcgis_mapping_wheel_url:-arcgis-mapping==${arcgis_mapping_version}.*}" > /tmp/arcgis_mapping_source.txt
42+
3543
# Install arcgis-mapping if arcgis_version >= 2.4.0
3644
RUN (dpkg --compare-versions $arcgis_version ge 2.4.0 \
3745
&& . activate ${env_name} \
38-
&& python -m pip install arcgis-mapping \
46+
&& python -m pip install "$(cat /tmp/arcgis_mapping_source.txt)" \
3947
&& conda clean --all -f -y \
4048
&& find /opt/conda -name __pycache__ -type d -exec rm -rf {} +;) \
4149
|| echo "[INFO] Skipped installing arcgis-mapping for version $arcgis_version (>= 2.4.0 required for arcgis-mapping)"

guide/02-api-overview/release_notes_242.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
" * [Working with Branch Versioning](../guide/working-with-branch-versioning/) \n",
1717
"* [Deep Learning](../)\n",
1818
" * [3D Computer Vision](../)\n",
19-
" * [Point cloud object detection using SECOND](../guide/point-cloud-classification-using-second)\n",
19+
" * [Point cloud object detection using SECOND](../guide/point-cloud-object-detection-using-second)\n",
2020
" * [Point cloud classification using Point Transformer](../guide/point-cloud-classification-using-point-transformer/)\n",
2121
"* [Content Management](../)\n",
2222
" * **Note:** Available since July '25\n",
@@ -32,7 +32,7 @@
3232
"* [Deep Learning](/python/samples)\n",
3333
" * [2D Computer Vision](/python/samples)\n",
3434
" * [Object Detection](/python/samples)\n",
35-
" * [Detecting airplanes in satellite imagery using deep learning](/python/latest/samples/detecting-airplanes-on-satellite-imagery-using-deep-learning/\") \n",
35+
" * [Detecting airplanes in satellite imagery using deep learning](/python/latest/samples/detecting-airplanes-on-satellite-imagery-using-deep-learning/) \n",
3636
" * [Tabular Data Forecasting](/python/samples)\n",
3737
" * [Leveraging TabPFN for Human Activity Recognition Using Mobile Dataset](/python/latest/samples/classifying-human-activity-using-tabPFN-classifier) \n",
3838
"\n",

guide/04-feature-data-and-analysis/working-with-feature-layers-and-features.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,9 @@
490490
"source": [
491491
"<a id=\"querying-layers\"></a>\n",
492492
"## Querying feature layers\n",
493-
"Querying is a powerful operation that can be performed on a `FeatureLayer` object. Let's take a closer look here. To write meaningful queries, we need to know the names of fields present in the layer. This can be determined by calling the `fields` property:"
493+
"Querying is a powerful operation that can be performed on a [`FeatureLayer`](/python/latest/api-reference/arcgis.features.toc.html#arcgis.features.FeatureLayer) object. Let's take a closer look here. To write meaningful queries, we need to know the names of fields present in the layer. This can be determined by calling the `fields` property:\n",
494+
"\n",
495+
"> **Note:** When leveraging Esri hosted content, organizations should review the [ArcGIS Online terms of use](https://doc.arcgis.com/en/arcgis-online/reference/terms-of-use.htm), as well as the terms of use for the data layer to ensure they are in compliance with extracting data and/or making it available in other systems."
494496
]
495497
},
496498
{
@@ -1503,7 +1505,7 @@
15031505
"name": "python",
15041506
"nbconvert_exporter": "python",
15051507
"pygments_lexer": "ipython3",
1506-
"version": "3.11.0"
1508+
"version": "3.13.2"
15071509
},
15081510
"toc": {
15091511
"base_numbering": 1,

guide/05-working-with-the-spatially-enabled-dataframe/introduction-to-the-spatially-enabled-dataframe.ipynb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@
5252
"\n",
5353
"The SEDF integrates with Esri's [`ArcPy` site-package](http://pro.arcgis.com/en/pro-app/arcpy/get-started/what-is-arcpy-.htm) as well as the open source [`pyshp`](https://github.com/GeospatialPython/pyshp/), [`shapely`](https://github.com/Toblerity/Shapely) and [`fiona`](https://github.com/Toblerity/Fiona) packages. This means the ArcGIS API for Python SEDF can use either of these geometry engines to provide you options for easily working with geospatial data regardless of your platform. The SEDF transforms data into the formats you desire so you can use Python functionality to analyze and visualize geographic information.\n",
5454
"\n",
55-
"Data can be read and scripted to automate workflows and just as easily visualized on maps in [`Jupyter Lab notebooks`](../using-the-jupyter-notebook-environment/). The SEDF can export data as feature classes or publish them directly to servers for sharing according to your needs. Let's explore some of the different options available with the versatile `Spatial Enabled DataFrame` namespaces:\n"
55+
"Data can be read and scripted to automate workflows and just as easily visualized on maps in [`Jupyter Lab notebooks`](../using-the-jupyter-notebook-environment/). The SEDF can export data as feature classes or publish them directly to servers for sharing according to your needs. \n",
56+
"\n",
57+
"> **_Note:_** When leveraging Esri hosted content, organizations should review the [ArcGIS Online terms of use](https://doc.arcgis.com/en/arcgis-online/reference/terms-of-use.htm), as well as the terms of use for the data layer to ensure they are in compliance with extracting data and/or making it available in other systems.\n",
58+
"\n",
59+
"Let's explore some of the different options available with the versatile `Spatial Enabled DataFrame` namespaces:"
5660
]
5761
},
5862
{
@@ -1418,7 +1422,7 @@
14181422
"name": "python",
14191423
"nbconvert_exporter": "python",
14201424
"pygments_lexer": "ipython3",
1421-
"version": "3.11.0"
1425+
"version": "3.13.2"
14221426
},
14231427
"toc": {
14241428
"base_numbering": 1,

guide/05-working-with-the-spatially-enabled-dataframe/part1_introduction_to_sedf.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
"cell_type": "markdown",
4040
"metadata": {},
4141
"source": [
42-
"> _Note:_ Spatial Data Engineering using SeDF builds on top of core Data Engineering concepts in Python. If you are new to Pandas, NumPy and related libraries, we recommend you start with the [Introduction to Data Engineering](../part1-introduction-to-dataengineering) guide series and then come here.\n"
42+
"> _**Note:**_ Spatial Data Engineering using SeDF builds on top of core Data Engineering concepts in Python. If you are new to Pandas, NumPy and related libraries, we recommend you start with the [Introduction to Data Engineering](../part1-introduction-to-dataengineering) guide series and then come here.\n",
43+
"\n",
44+
"> **_Note:_** When leveraging Esri hosted content, organizations should review the [ArcGIS Online terms of use](https://doc.arcgis.com/en/arcgis-online/reference/terms-of-use.htm), as well as the terms of use for the data layer to ensure they are in compliance with extracting data and/or making it available in other systems."
4345
]
4446
},
4547
{
@@ -1543,7 +1545,7 @@
15431545
"name": "python",
15441546
"nbconvert_exporter": "python",
15451547
"pygments_lexer": "ipython3",
1546-
"version": "3.11.0"
1548+
"version": "3.13.2"
15471549
},
15481550
"toc": {
15491551
"base_numbering": 1,

guide/06-imagery-and-raster-analysis/using-raster-analysis.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"\n",
99
"Raster Analysis can be used to create and execute spatial analysis models and image processing chains which leverage distributed storage and analysis. This powerful capability is available with ArcGIS Enterprise, and enables scalable raster analysis including terrain analysis, suitability analysis, vegetation analysis as well as persistent imagery product generation.\n",
1010
"\n",
11-
"The `arcgis.raster.analytics` module provides the raster analysis functionality. This module contains functions that enable you to call raster analysis tools in your GIS."
11+
"The [`arcgis.raster.analytics`](/python/latest/api-reference/arcgis.raster.analytics.html) submodule provides the raster analysis functionality. This module contains functions that enable you to call raster analysis tools in your GIS.\n",
12+
"\n",
13+
"> _**Note:**_ When leveraging Esri hosted content, organizations should review the [ArcGIS Online terms of use](https://doc.arcgis.com/en/arcgis-online/reference/terms-of-use.htm), as well as the terms of use for the data layer to ensure they are in compliance with extracting data and/or making it available in other systems."
1214
]
1315
},
1416
{
@@ -414,7 +416,7 @@
414416
"name": "python",
415417
"nbconvert_exporter": "python",
416418
"pygments_lexer": "ipython3",
417-
"version": "3.11.0"
419+
"version": "3.13.2"
418420
},
419421
"toc": {
420422
"base_numbering": 1,

guide/13-managing-arcgis-applications/itemgraph_and_remap_data.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@
314314
],
315315
"source": [
316316
"# conversely, we can grab a dependent item and see what items immediately contain it and need it to exist\n",
317-
"result_flayer = graph.get_item(\"41dd3cca32914cc7ae8fd3a727f44e17\")\n",
317+
"result_flayer = graph.get_node(\"41dd3cca32914cc7ae8fd3a727f44e17\")\n",
318318
"result_flayer.item"
319319
]
320320
},
@@ -887,7 +887,7 @@
887887
"source": [
888888
"# so we can see that one of them is from our root item, and one is from a dependent item\n",
889889
"# let's see what that sub item is\n",
890-
"sub_node = graph2.get_item(\"7099b3c2e979415e975d00e58afed77e\")\n",
890+
"sub_node = graph2.get_node(\"7099b3c2e979415e975d00e58afed77e\")\n",
891891
"webmap = sub_node.item\n",
892892
"webmap"
893893
]
@@ -991,7 +991,7 @@
991991
"name": "python",
992992
"nbconvert_exporter": "python",
993993
"pygments_lexer": "ipython3",
994-
"version": "3.12.11"
994+
"version": "3.13.2"
995995
}
996996
},
997997
"nbformat": 4,

samples/03_org_administrators/clone_a_group.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@
328328
" target_item_properties = ItemProperties(title=item.title,\n",
329329
" tags=item.tags,\n",
330330
" text=item.get_data(try_json=True),\n",
331-
" item_type=item.type,\n",
331+
" type=item.type,\n",
332332
" snippet=item.snippet,\n",
333333
" description=item.description,\n",
334334
" thumbnail=thumbnail_file) \n",

samples/03_org_administrators/validate_user_profiles.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@
283283
"source": [
284284
"item_props = ItemProperties(\n",
285285
" title = out_file,\n",
286-
" item_type = ItemTypeEnum.CSV,\n",
286+
" type = ItemTypeEnum.CSV,\n",
287287
" tags = \"user_profile_report\",\n",
288288
" snippet = \"Report on user profile data from Python API\"\n",
289289
")\n",

0 commit comments

Comments
 (0)