Skip to content

Commit 72773f4

Browse files
committed
updates from merge
2 parents 46fec5c + 1135e28 commit 72773f4

File tree

77 files changed

+32970
-6343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+32970
-6343
lines changed

docker/NotebookImage.Dockerfile

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
ARG python_version="3.11"
2-
FROM quay.io/jupyter/base-notebook:python-${python_version}
2+
FROM quay.io/jupyter/minimal-notebook:python-${python_version}
33

44
ARG python_version
5-
ARG arcgis_version="2.3.1"
5+
ARG arcgis_version="2.4.0"
66
ARG sampleslink="https://github.com/Esri/arcgis-python-api/releases/download/v${arcgis_version}/samples.zip"
77
ARG githubfolder="arcgis-python-api"
8-
ENV DOCKER_STACKS_JUPYTER_CMD="notebook"
8+
ARG env_name=arcgis
99

1010
LABEL org.opencontainers.image.authors="[email protected]"
11-
LABEL org.opencontainers.image.description="Jupyter Notebook with the latest version of the ArcGIS API for Python and its Linux dependencies preinstalled"
11+
LABEL org.opencontainers.image.description="Jupyter environment preconfigured for ArcGIS API for Python"
1212
LABEL org.opencontainers.image.licenses=Apache
1313
LABEL org.opencontainers.image.source=https://github.com/Esri/arcgis-python-api
1414

15-
USER root
16-
17-
RUN apt-get update --yes && \
18-
apt-get install --yes --no-install-recommends unzip && \
19-
apt-get clean && rm -rf /var/lib/apt/lists/*
20-
2115
USER ${NB_UID}
2216

2317
# Install Python API from Conda
24-
RUN conda install -c esri arcgis=${arcgis_version} -y \
18+
RUN conda create -n ${env_name} -c esri -c defaults arcgis=${arcgis_version} python=${python_version} -y --quiet --override-channels \
2519
&& conda clean --all -f -y \
2620
&& find /opt/conda -name __pycache__ -type d -exec rm -rf {} +
2721

22+
# Install arcgis-mapping if arcgis_version >= 2.4.0
23+
RUN (dpkg --compare-versions $arcgis_version ge 2.4.0 \
24+
&& conda install -n ${env_name} -c esri -c defaults arcgis-mapping -y --quiet --override-channels \
25+
&& conda clean --all -f -y \
26+
&& find /opt/conda -name __pycache__ -type d -exec rm -rf {} +;) \
27+
|| echo "[INFO] Skipped installing arcgis-mapping for version $arcgis_version (>= 2.4.0 required for arcgis-mapping)"
28+
2829
# Fetch and extract samples from GitHub
2930
RUN mkdir /home/${NB_USER}/$githubfolder && \
3031
wget -O samples.zip $sampleslink \
@@ -36,7 +37,34 @@ RUN mkdir /home/${NB_USER}/$githubfolder && \
3637
work/ \
3738
talks/ \
3839
environment.yml\
40+
# remove .DS_Store and __MACOSX from home directory:
41+
&& find /home/${NB_USER} -name ".DS_Store" -delete \
42+
&& rm -rf /home/${NB_USER}/__MACOSX \
3943
&& fix-permissions /home/${NB_USER}
4044

41-
RUN rm /opt/conda/lib/python${python_version}/site-packages/notebook/static/base/images/logo.png
42-
COPY --chown=${NB_USER}:users jupyter_esri_logo.png /opt/conda/lib/python${python_version}/site-packages/notebook/static/base/images/logo.png
45+
# See https://jupyter-docker-stacks.readthedocs.io/en/latest/using/recipes.html#add-a-custom-conda-environment-and-jupyter-kernel
46+
# Create Python kernel and link it to jupyter
47+
RUN "${CONDA_DIR}/envs/${env_name}/bin/python" -m ipykernel install --user --name="${env_name}" && \
48+
fix-permissions "${CONDA_DIR}" && \
49+
fix-permissions "/home/${NB_USER}"
50+
51+
52+
# More information here: https://github.com/jupyter/docker-stacks/pull/2047
53+
USER root
54+
55+
# Set DOCKER_STACKS_JUPYTER_CMD to "notebook" for versions less than 2.4.0
56+
RUN \
57+
(dpkg --compare-versions $arcgis_version lt 2.4.0 \
58+
&& echo 'DOCKER_STACKS_JUPYTER_CMD="notebook"' >> /etc/environment \
59+
&& echo "[INFO] Set DOCKER_STACKS_JUPYTER_CMD to notebook for arcgis < 2.4.0") \
60+
|| echo "[INFO] Using default DOCKER_STACKS_JUPYTER_CMD (lab) for arcgis >= 2.4.0"
61+
62+
RUN \
63+
# This changes a startup hook, which will activate the custom environment for the process
64+
echo conda activate "${env_name}" >> /usr/local/bin/before-notebook.d/10activate-conda-env.sh && \
65+
# This makes the custom environment default in Jupyter Terminals for all users which might be created later
66+
echo conda activate "${env_name}" >> /etc/skel/.bashrc && \
67+
# This makes the custom environment default in Jupyter Terminals for already existing NB_USER
68+
echo conda activate "${env_name}" >> "/home/${NB_USER}/.bashrc"
69+
70+
USER ${NB_UID}

guide/01-getting-started/system-requirements.ipynb

Lines changed: 51 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -22,67 +22,73 @@
2222
"metadata": {},
2323
"source": [
2424
"## Operating System \n",
25-
"The ArcGIS API for Python 2.4.0 release is compatible with 64-bit versions of Windows, macOS, and Linux.\n",
25+
"The ArcGIS API for Python (2.4.0 and greater releases) is compatible with 64-bit versions of Windows, macOS (M-Series and Intel), and Linux.\n",
2626
"\n",
2727
"## Python Version\n",
28-
"Python 3.10.x to 3.12.x is required to use the ArcGIS API for Python 2.3.1.\n",
28+
"Python 3.10.x to 3.12.x is required to use the ArcGIS API for Python 2.3.1 and greater releases.\n",
2929
"\n",
3030
"## Dependencies\n",
3131
"The full power of the ArcGIS API for Python is best experienced when all its dependencies are installed. However, specific tasks such as GIS administration and content management can be accomplished with a subset of dependencies installed. See [Install with minimum Dependencies](../install-and-set-up#install-with-minimum-dependencies) to install the `arcgis` package in this manner.\n",
3232
"\n",
33-
"It is recommended to install the `arcgis` package the default way of either `conda install -c esri arcgis` or `pipenv install arcgis`. When version 2.3.1 is installed in this manner, all the below dependencies are automatically installed. \n",
33+
"It is recommended to install the `arcgis` package the default way of either `conda install -c esri arcgis arcgis-mapping` or `pip install arcgis arcgis-mapping`. When installed in this manner, all the below dependencies are automatically installed.\n",
3434
"\n",
3535
"> __Note__ Most of these packages have dependencies of their own. For a full list of packages installed:\n",
3636
" > * conda environment, type `conda list -n <environment_name>`. \n",
37-
" > * pipenv virtual environment: See [`Pipfile` and `Pipfile.lock`](https://pipenv.pypa.io/en/latest/pipfile/) for details. \n",
37+
" > * pip environment, type `pip list`.\n",
38+
" \n",
39+
"\n",
40+
"* [anywidget](https://anaconda.org/Esri/anywidget)\n",
41+
"* [cachetools](https://anaconda.org/anaconda/cachetools)\n",
42+
"* [certifi](hhttps://anaconda.org/anaconda/certifi) \n",
43+
"* [cryptography](https://anaconda.org/Esri/cryptography)\n",
44+
"* [dask >=2024.12.1,<2025.1.0](https://anaconda.org/Esri/dask)\n",
45+
"* [geomet](https://anaconda.org/Esri/geomet)\n",
46+
"* [ipywidgets >=8](https://anaconda.org/Esri/ipywidgets)\n",
47+
"* [jupyterlab >=4.0.7,<5](https://anaconda.org/Esri/jupyterlab)\n",
48+
"* [keyring >=23.3.0](https://anaconda.org/Esri/keyring)\n",
49+
"* [lxml](https://anaconda.org/Esri/lxml)\n",
50+
"* [matplotlib](https://anaconda.org/Esri/matplotlib)\n",
51+
"* [matplotlib-inline](https://anaconda.org/Esri/matplotlib-inline)\n",
52+
"* [networkx](https://anaconda.org/Esri/networkx)\n",
53+
"* [numpy >=1.21.6,<2](https://anaconda.org/Esri/numpy) \n",
54+
"* [pandas >=2.0.0,<2.3.0](https://anaconda.org/Esri/pandas) \n",
55+
"* [pillow](https://anaconda.org/Esri/pillow)\n",
56+
"* [puremagic >=1.15,<2](https://anaconda.org/Esri/puremagic)\n",
57+
"* [pyarrow >=14,<17](https://anaconda.org/Esri/pyarrow)\n",
58+
"* [pydantic >=2.8.2,<3](https://anaconda.org/Esri/pydantic)\n",
59+
"* [pylerc](https://anaconda.org/Esri/pylerc)\n",
60+
"* [pyspnego >=0.8.0](https://anaconda.org/Esri/pyspnego)\n",
61+
"* [requests >=2.32.3,<3](https://anaconda.org/anaconda/requests)\n",
62+
"* [requests-gssapi](https://anaconda.org/Esri/requests-gssapi)\n",
63+
"* [requests-kerberos](https://anaconda.org/Esri/requests-kerberos)\n",
64+
"* [requests-oauthlib](https://anaconda.org/anaconda/requests-oauthlib)\n",
65+
"* [requests-toolbelt](https://anaconda.org/Esri/requests-toolbelt)\n",
66+
"* [truststore](https://anaconda.org/Esri/truststore)\n",
67+
"* [ujson >=3](https://anaconda.org/anaconda/ujson)\n",
68+
"* [urllib3 >=2.1.0,<3](https://anaconda.org/anaconda/urllib3)\n",
69+
"* [websocket-client >=1.2.3,<2](https://anaconda.org/anaconda/websocket-client)\n",
70+
"\n",
3871
"\n",
39-
"* [pandas>=2.2.0](https://anaconda.org/Esri/pandas) \n",
40-
"* [numpy>=1.21.6,<2](https://anaconda.org/Esri/numpy) \n",
41-
"* [pyshp>=2](https://anaconda.org/conda-forge/pyshp/) \n",
42-
"* [matplotlib](https://anaconda.org/esri/matplotlib)\n",
43-
"* [matplotlib-inline](https://anaconda.org/anaconda/matplotlib-inline/)\n",
44-
"* [notebook](https://anaconda.org/esri/notebook)\n",
45-
"* [ipywidgets >=7,<8](https://anaconda.org/esri/ipywidgets)\n",
46-
"* [widgetsnbextension >=3](https://anaconda.org/esri/widgetsnbextension)\n",
47-
"* [keyring>=23.3.0](https://anaconda.org/esri/keyring)\n",
48-
"* [urllib3>=1.26.2,<3](https://anaconda.org/conda-forge/urllib3/)\n",
49-
"* [cachetools](https://anaconda.org/conda-forge/cachetools)\n",
50-
"* [lxml](https://anaconda.org/esri/lxml)\n",
51-
"* [cryptography](https://anaconda.org/esri/cryptography)\n",
52-
"* [jupyter-client<=6.1.12](https://anaconda.org/conda-forge/jupyter-client/)\n",
53-
"* [pylerc](https://anaconda.org/esri/pylerc)\n",
54-
"* [ujson>=3](https://anaconda.org/conda-forge/ujson/)\n",
55-
"* [geomet](https://anaconda.org/esri/geomet/)\n",
56-
"* [requests>=2.30.0,<2.32.0](https://anaconda.org/conda-forge/requests/)\n",
57-
"* [requests-oauthlib](https://anaconda.org/conda-forge/requests-oauthlib/)\n",
58-
"* [requests-toolbelt](https://anaconda.org/esri/requests-toolbelt/)\n",
59-
"* [requests_ntlm](https://anaconda.org/esri/requests_ntlm/)\n",
60-
"* [requests-gssapi](https://anaconda.org/esri/requests-gssapi/)\n",
61-
"* [requests-kerberos](https://anaconda.org/esri/requests-kerberos/)\n",
62-
"* [truststore](https://anaconda.org/esri/truststore/)\n",
63-
"* [dask>=2023.3.2](https://anaconda.org/esri/dask/)\n",
64-
"* [pyspnego>=0.8.0](https://anaconda.org/conda-forge/pyspnego/)\n",
65-
" * Python>=3.10\n",
6672
"* **Windows only:**\n",
67-
" * [python-certifi-win32](https://anaconda.org/esri/python-certifi-win32/)\n",
68-
" * Python < 3.10\n",
69-
" * [pywin32>=223](https://anaconda.org/conda-forge/pywin32/)\n",
70-
" * [requests-negotiate-sspi](https://anaconda.org/esri/requests-negotiate-sspi/)\n",
73+
" * [pywin32-security](https://anaconda.org/Esri/pywin32-security)\n",
74+
" * [requests-negotiate-sspi](https://anaconda.org/Esri/requests-negotiate-sspi)\n",
75+
"\n",
76+
"> Note: The dependencies above result from installing using `conda`. Versions may vary if `arcgis` is installed using `pip`.\n",
77+
"\n",
78+
"> Note: if `arcpy` is found in the current python environment, it may be used in various locations. Otherwise, `gdal` or `pyshp` will be used. See [Spatially Enabled DataFrame](https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html?highlight=geoaccessor#arcgis.features.GeoAccessor) for more information.\n",
7179
"\n",
7280
"\n",
73-
"> Note: if `arcpy` is found in the current python environment, it may be used in various locations. Otherwise, `pyshp` will be used. See [Spatially Enabled DataFrame](https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html?highlight=geoaccessor#arcgis.features.GeoAccessor) for more information.\n",
7481
"\n",
7582
"### Optional Dependencies\n",
7683
"\n",
77-
"There are some other python packages that may be required to use certain functionality in the API, but are __not__ automatically installed. To use that functionality, you must manually call `conda install {package_name}` or `pipenv install {package_name}` for such optional packages."
84+
"There are some other python packages that may be required to use certain functionality in the API, but are __not__ automatically installed. To use that functionality, you must manually call `conda install {package_name}` or `pip install {package_name}` for such optional packages.\n",
85+
"\n",
86+
"* [gdal](https://anaconda.org/Esri/gdal)\n",
87+
" - if installed, gdal may be used as a geometry engine for certain operations\n",
88+
" > Note: The gdal build on Esri anaconda channel is currently only compatible with environments configured with arcpy.\n",
89+
"* [pyshp](https://anaconda.org/anaconda/pyshp)\n",
90+
" - if installed, pyshp may be used as a geometry engine for certain operations"
7891
]
79-
},
80-
{
81-
"cell_type": "code",
82-
"execution_count": null,
83-
"metadata": {},
84-
"outputs": [],
85-
"source": []
8692
}
8793
],
8894
"metadata": {
@@ -101,7 +107,7 @@
101107
"name": "python",
102108
"nbconvert_exporter": "python",
103109
"pygments_lexer": "ipython3",
104-
"version": "3.11.0"
110+
"version": "3.11.11"
105111
},
106112
"toc": {
107113
"base_numbering": 1,

guide/02-api-overview/deprecation-notices.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"- `Swipe.edit` - deprecated in **2.4.0** removed in future major release. Use the `content` property setter instead.\n",
2929
"- `MapAction` - deprecated in **2.4.0** removed in future major release. Use the `MediaAction` class instead.\n",
3030
"- `JournalStoryMap` - deprecated in **2.0.0** removed in **2.4.0**. Template was removed from the ArcGIS platform.\n",
31+
"- `Hub.initiatives` - deprecated in **2.4.0** removed in a future release. Use `Hub.sites` instead.\n",
3132
"\n",
3233
"\n",
3334
"### `arcgis.learn` Module\n",
@@ -189,7 +190,7 @@
189190
"name": "python",
190191
"nbconvert_exporter": "python",
191192
"pygments_lexer": "ipython3",
192-
"version": "3.10.14"
193+
"version": "3.11.5"
193194
}
194195
},
195196
"nbformat": 4,

guide/02-api-overview/overview24.ipynb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@
2020
"Primary Python Support is for version 3.11. Secondary support is provided for Python 3.10 and 3.12. We have dropped Support for Python 3.9."
2121
]
2222
},
23+
{
24+
"cell_type": "markdown",
25+
"id": "ff163308-2526-4b3a-965b-5b430738c5f8",
26+
"metadata": {},
27+
"source": [
28+
"> **Note:** The ArcGIS API for Python 2.4.0 release is supported with:\n",
29+
"* ArcGIS Pro 3.4 and later cloned environments\n",
30+
"* ArcGIS Enterprise 11.4 and later\n",
31+
"* Stand-alone _conda_ and Python environments"
32+
]
33+
},
2334
{
2435
"cell_type": "markdown",
2536
"id": "3da4c48b-3c82-490f-9b76-d2063307b56c",
@@ -481,7 +492,7 @@
481492
"name": "python",
482493
"nbconvert_exporter": "python",
483494
"pygments_lexer": "ipython3",
484-
"version": "3.11.0"
495+
"version": "3.11.10"
485496
}
486497
},
487498
"nbformat": 4,

guide/02-api-overview/release_notes_240.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"source": [
88
"# What's new in version 2.4.0\n",
99
"\n",
10+
"> **Note:** The ArcGIS API for Python 2.4.0 release is supported with ArcGIS Pro 3.4 and later cloned environments for use with _arcpy_. The 2.4.0 _arcgis_ and _arcgis-mapping_ packages are incompatible with ArcGIS Pro 3.3.x and earlier cloned environments. The default ArcGIS Pro 3.3.x environment can be cloned and upgraded to _arcgis_ packages of 2.3.x.\n",
11+
"\n",
1012
"## New\n",
1113
"Reorganized modules and refactored functionality into new classes to incorporate the new Jupyter Lab and Notebook 7 architectures.\n",
1214
"* Deprecated modules:\n",

guide/03-the-gis/accessing-and-creating-content.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@
14251425
"source": [
14261426
"## Creating new content\n",
14271427
"\n",
1428-
"To create new items on your GIS, use the [`add()`](/api-reference/arcgis.gis.toc.html#arcgis.gis._impl._content_manager.Folder.add) method on a [`Folder`](/python/api-reference/arcgis.gis.toc.html#folder) instance. You can get an individual _folder_ using the [`Folders.get()`](/python/api-reference/arcgis.gis.toc.html#arcgis.gis._impl._content_manager.Folders.get) method.\n",
1428+
"To create new items on your GIS, use the [`add()`](https://developers.arcgis.com/python/latest/api-reference/arcgis.gis.toc.html#arcgis.gis._impl._content_manager.Folder.add) method on a [`Folder`](/python/api-reference/arcgis.gis.toc.html#folder) instance. You can get an individual _folder_ using the [`Folders.get()`](/python/api-reference/arcgis.gis.toc.html#arcgis.gis._impl._content_manager.Folders.get) method.\n",
14291429
"\n",
14301430
"The `add()` method accepts a dictionary containing the properties of the item to be created. The optional `file`, `text`, `url`, and `data_url` parameters accept input to add the actual content. \n",
14311431
"\n",
@@ -1472,7 +1472,7 @@
14721472
},
14731473
{
14741474
"cell_type": "code",
1475-
"execution_count": 12,
1475+
"execution_count": null,
14761476
"metadata": {},
14771477
"outputs": [],
14781478
"source": [
@@ -1485,7 +1485,7 @@
14851485
"root_folder = gis.content.folders.get()\n",
14861486
"earthquake_csv_item = root_folder.add(\n",
14871487
" item_properties=csv_properties, \n",
1488-
" data=csv_path,\n",
1488+
" file=csv_path,\n",
14891489
" thumbnail = thumbnail_path\n",
14901490
").result()"
14911491
]
@@ -2332,7 +2332,7 @@
23322332
"source": [
23332333
"**Note**: here, we used the `add()` method to add the `FeatureCollection` object in memory as an item on the GIS. Notice we used the `text` property to pass the JSON representation of the feature collection and the `type` property to indicate the item type. You can use the same method to publish web maps and web scenes.\n",
23342334
"\n",
2335-
"The [sample notebooks for content publishers](https://developers.arcgis.com/python/sample-notebooks/publishing-web-maps-and-web-scenes/) show how the concepts discussed here can be used to publish web maps and scenes to your GIS"
2335+
"The [sample notebooks for content publishers](/python/latest/samples/publishing-web-maps-and-web-scenes/) show how the concepts discussed here can be used to publish web maps and scenes to your GIS"
23362336
]
23372337
},
23382338
{
@@ -2582,7 +2582,7 @@
25822582
"name": "python",
25832583
"nbconvert_exporter": "python",
25842584
"pygments_lexer": "ipython3",
2585-
"version": "3.11.0"
2585+
"version": "3.11.11"
25862586
},
25872587
"toc": {
25882588
"base_numbering": 1,

guide/03-the-gis/cloning-content.ipynb

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,28 +1388,14 @@
13881388
"cell_type": "markdown",
13891389
"metadata": {},
13901390
"source": [
1391-
"### ArcGIS Dashboards"
1391+
"### ArcGIS Dashboards and ArcGIS StoryMaps"
13921392
]
13931393
},
13941394
{
13951395
"cell_type": "markdown",
13961396
"metadata": {},
13971397
"source": [
1398-
"See the [Cloning and Troubleshooting Complex Items](../cloning-complex-apps#dashboards-and-editing-item-data) guide for details on cloning ArcGIS Dashboards. "
1399-
]
1400-
},
1401-
{
1402-
"cell_type": "markdown",
1403-
"metadata": {},
1404-
"source": [
1405-
"### Story Maps"
1406-
]
1407-
},
1408-
{
1409-
"cell_type": "markdown",
1410-
"metadata": {},
1411-
"source": [
1412-
"See the [Cloning and Troubleshooting Complex Items](../cloning-complex-apps/#storymaps-web-scenes-and-item-remapping) guide for details on cloning ArcGIS StoryMaps. "
1398+
"See the [Cloning and Troubleshooting Complex Items](../cloning-complex-apps#dashboards-and-editing-item-data) guide for details on cloning ArcGIS Dashboards and ArcGIS StoryMaps. "
14131399
]
14141400
},
14151401
{
@@ -1438,7 +1424,7 @@
14381424
"name": "python",
14391425
"nbconvert_exporter": "python",
14401426
"pygments_lexer": "ipython3",
1441-
"version": "3.9.17"
1427+
"version": "3.11.10"
14421428
},
14431429
"toc": {
14441430
"base_numbering": 1,
@@ -1455,5 +1441,5 @@
14551441
}
14561442
},
14571443
"nbformat": 4,
1458-
"nbformat_minor": 2
1444+
"nbformat_minor": 4
14591445
}

guide/03-the-gis/managing-your-gis-servers.ipynb

Lines changed: 2126 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)