Skip to content

Commit 7ffcd1e

Browse files
author
Atma Mani
committed
Merge branch 'dev_site_current' of https://github.com/esri/arcgis-python-api into dev_site_current
2 parents 6ea614b + 283139e commit 7ffcd1e

File tree

61 files changed

+10957
-2417
lines changed

Some content is hidden

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

61 files changed

+10957
-2417
lines changed

CODE_OF_CONDUCT.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Code of conduct
2+
3+
**TL;DR**<br>
4+
We expect folks that participate in both our online and [IRL](www.urbandictionary.com/define.php?term=IRL) communities to be kind and considerate of others at all times.
5+
6+
Esri's official CoC text can be found at http://www.esri.com/events/code-of-conduct

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing). Please expect any pull requests to go through a peer review before being accepted.
2+
3+
### Before filing an issue
4+
5+
Please take a look at [previous issues](https://github.com/Esri/arcgis-python-api/issues?q=is%3Aissue+is%3Aclosed) that resolve common problems.
6+
7+
If you're just looking for help, you'll probably attract the most eyes if you post in the [GeoNet Forums](https://community.esri.com/groups/arcgis-python-api/).
8+
9+
If you think you're encountering a new bug, please feel free to log an [issue](https://github.com/Esri/arcgis-python-api/issues/new) and include the steps to reproduce the problem.
10+
11+
**Please include the following in your issue:**
12+
* Your conda or pip environment (run `conda list` or `pip freeze` and copy/paste the output into the issue)
13+
* Any code (or notebook) you executed that made you run into this issue
14+
15+
# Updating errors in existing notebooks
16+
17+
Do you see an error in an existing notebook? Is there a typo, a misnamed variable, and do you know how to fix it?
18+
* Make the fix in the notebook
19+
* If you made code changes, re-run the appropriate cells in the notebook (Don't re-run every cell in the notebook unless necessary)
20+
* Make a copy of the `dev_site_current` branch on your local fork
21+
* Add the updated notebook to your branch on your fork
22+
* [Open a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) from your fork's branch to this repository's `dev_site_current` branch
23+
24+
# Adding new sample notebooks
25+
26+
Do you have a notebook that shows off functionality of the API? Do you want to see that notebook released with the next version of the ArcGIS API for Python? We welcome your notebooks and workflows as it will benefit a large audience.
27+
28+
* Create a new notebook, make sure it runs consistently on its own on a few systems
29+
* Make sure the notebook filename is in an `all_lowercase_underscore_delimiter_convention.ipynb`
30+
* Make a copy of the `dev_site_next_release` branch on your local fork
31+
* Place the notebook in the correct folder in the `samples/` folder on your fork
32+
* Add the notebook to your branch on your fork
33+
* [Open a pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) from your fork's branch to this repository's `dev_site_current` branch

guide/01-getting-started/install-and-set-up.ipynb

Lines changed: 68 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@
1212
" - [Try the API live in a sandbox](#Try-it-live)\n",
1313
" - Step 1: [Get Conda](#Step-1:-Get-Conda)\n",
1414
" - [Get Conda with ArcGIS Pro](#Get-Conda-with-ArcGIS-Pro)\n",
15-
" - [ArcGIS Pro 2.1](#Pro2.1)\n",
15+
" - [ArcGIS Pro 2.1 and later](#Pro2.1)\n",
1616
" - [ArcGIS Pro 1.4 and 2.0.x](#Pro1.4)\n",
1717
" - [ArcGIS Pro 1.3](#Pro1.3)\n",
1818
" - [Get Conda with Anaconda for Python Distribution](#Get-Conda-with-Anaconda-for-Python-Distribution)\n",
1919
" - Step 2: [Install the `arcgis` package](#Step:-2-Install-the-arcgis-package)\n",
2020
" - [Install Using ArcGIS Pro Python Package Manager](#Install-using-ArcGIS-Pro-Python-Package-Manager)\n",
2121
" - [Install Using the Python Command Prompt](#Install-using-Python-Command-Prompt)\n",
2222
" - [Install Using Anaconda for Python Distribution](#Install-using-Anaconda-for-Python-Distribution)\n",
23-
" - [Install Using pip](#Install-using-pip)\n",
23+
" - [Install Using pip or pipenv](#Install-using-pipenv-or-pip)\n",
2424
" - [Install without Dependencies](#Install-without-Dependencies)\n",
2525
" - [Upgrade the `arcgis` package](#Upgrade-the-arcgis-package)\n",
26+
" - [ArcGIS Pro 2.2](#ArcGIS-Pro-2.2)\n",
2627
" - [ArcGIS Pro 2.1](#ArcGIS-Pro-2.1)\n",
2728
" - [ArcGIS Pro 1.4 and 2.0.x](#ArcGIS-Pro-1.4-and-2.0.x)\n",
2829
" - [Python Package Manager](#Python-Package-Manager)\n",
@@ -53,9 +54,9 @@
5354
"## Step 1: Get Conda\n",
5455
"\n",
5556
"### Get Conda with ArcGIS Pro\n",
56-
" - <a id=\"Pro2.1\" style=\"color:black\">ArcGIS Pro 2.1</a>\n",
57+
" - <a id=\"Pro2.1\" style=\"color:black\">ArcGIS Pro 2.1 and later</a>\n",
5758
" \n",
58-
" Proceed to [Using the API](#Using-the-API) for instructions. ArcGIS Pro 2.1 ships with conda and the `arcgis` package pre-installed.\n",
59+
" Proceed to [Using the API](#Using-the-API) for instructions. ArcGIS Pro 2.1 and later releases ship with conda and the `arcgis` package pre-installed.\n",
5960
" - <a id=\"Pro1.4\" style=\"color:black\">ArcGIS Pro 1.4 and 2.0.x</a>\n",
6061
"\n",
6162
" Proceed to [Install with ArcGIS Pro Python Package Manager](#Install-using-ArcGIS-Pro-Python-Package-Manager) for instructions on installing the `arcgis` package. ArcGIS Pro 1.4 ships with conda installed.\n",
@@ -75,7 +76,7 @@
7576
"## Step: 2 Install the `arcgis` package\n",
7677
"### Install using ArcGIS Pro [Python Package Manager](http://pro.arcgis.com/en/pro-app/arcpy/get-started/what-is-conda.htm)\n",
7778
"\n",
78-
" ArcGIS Pro 1.4 and later provides the Python Package Manager GUI to download and install any conda package. Access it through the ArcGIS Pro backstage area:\n",
79+
" ArcGIS Pro 1.4 and later provide the Python Package Manager GUI to download and install any conda package. Access it through the ArcGIS Pro backstage area:\n",
7980
" * Open ArcGIS Pro with a new blank Project\n",
8081
" * Select the Project tab to access the Pro backstage (see screen shot below)\n",
8182
" * Select the 'Python' menu option\n",
@@ -84,7 +85,7 @@
8485
" * Select the release you want to install\n",
8586
" * Click 'Install' and accept the terms and conditions\n",
8687
"\n",
87-
"![install using ArcGIS Pro](../../static/img/guide_getstarted_InstallAndSetup_03.png)\n",
88+
"![install using ArcGIS Pro](../../static/img/guide_getstarted_installandsetup_03.png)\n",
8889
"\n",
8990
"To use the API in different IDEs, proceed to **[Using the API](#Using-the-API)**\n",
9091
"\n",
@@ -98,7 +99,7 @@
9899
" conda install -c esri arcgis\n",
99100
" ```\n",
100101
"\n",
101-
"![python command prompt](../../static/img/Python_Command_Prompt.png)\n",
102+
"![python command prompt](../../static/img/python_command_prompt.png)\n",
102103
"\n",
103104
"To use the API in different IDEs, proceed to **[Using the API](#Using-the-API)**\n",
104105
"\n",
@@ -118,17 +119,33 @@
118119
"\n",
119120
"To use the API in different IDEs, proceed to **[Using the API](#Using-the-API)**\n",
120121
"\n",
121-
"### Install using pip\n",
122+
"### Install using pipenv or pip\n",
122123
"\n",
123-
"[Pip](https://pip.pypa.io/en/stable/) is a package management system used to install and manage software packages written in Python, similar to conda. Many pip packages can be found in the [Python Package Index (PyPI)](https://pypi.python.org/pypi), including the ArcGIS API for Python pip package. To install the API with pip, open a terminal and enter the following command:\n",
124+
"#### Pipenv\n",
125+
"[Pipenv](https://docs.pipenv.org/) is the official packaging tool for managing environments and installing packages from the [Python Package Index (PyPI)](https://pypi.python.org/pypi). To install the ArcGIS API for Python from PyPI in a new environment, create a new folder named `your-folder`. Open a terminal, and run `cd /path/to/your-folder` to change directories into `your-folder`. Then, enter the following command to simultaneously create a new environment and install the API in it:\n",
126+
"\n",
127+
"```\n",
128+
"pipenv install arcgis\n",
129+
"```\n",
130+
"\n",
131+
"After running this command, you will notice that a new file named `Pipfile` was created in `your-folder`. A [Pipfile](https://github.com/pypa/pipfile) contains package information that represents a python environment. Open your terminal and make sure you are still in the `your-folder` directory; then, run `pipenv shell`. You have now activated your python environment, the environment that contains the `arcgis` package! You can run `jupyter notebook` or `python` in this environment to start using the API.\n",
124132
" \n",
125-
"```python\n",
133+
"Pipenv differs from conda and other environment managers in that environments are specific to the folder that contains the Pipfile. In this way, pipenv's use of `Pipfile` is similar to how `npm` uses `package.json`. To learn more about installing and using pipenv, click [here](https://docs.pipenv.org/) or [here](http://docs.python-guide.org/en/latest/dev/virtualenvs/#installing-packages-for-your-project).\n",
134+
"\n",
135+
"> __Tip__: You can run any command in an environment without activating it by running `pipenv run {insert_command_here}` in a directory with a valid Pipfile.\n",
136+
"\n",
137+
"#### Pip\n",
138+
"\n",
139+
"[Pip](https://pip.pypa.io/en/stable/) is the predecessor of pipenv, and can also be used to install packages from PyPI (but you must manage environments with seperate tools like [virtualenv](https://virtualenv.pypa.io/en/stable/)). To install the API with pip, open a terminal and enter the following command:\n",
140+
" \n",
141+
"```\n",
126142
"pip install arcgis\n",
127143
"```\n",
128144
"\n",
129-
"Pip and conda are totally seperate package managers, and should avoid being used interchangeably. It is recommended you use conda to install the API if you are a beginner user. [Read more about the differences](https://stackoverflow.com/questions/20994716/what-is-the-difference-between-pip-and-conda).\n",
145+
"#### Disclaimer\n",
146+
"You should avoid mixing conda with pipenv/pip: they are completely seperate package managers. It is recommended that you use conda to install the API if you are a beginner user. Read more about the differences [here](https://stackoverflow.com/questions/20994716/what-is-the-difference-between-pip-and-conda) and [here](http://docs.python-guide.org/en/latest/dev/virtualenvs/).\n",
130147
"\n",
131-
"> Note: when installing the ArcGIS API for Python with pip, some dependencies may require Microsoft Visual C++ 14.0. If you see any errors related to this, either install the Microsoft Visual C++ tools or install the API without dependencies.\n",
148+
"> __Note__: when installing the ArcGIS API for Python with pipenv/pip, some dependencies may require Microsoft Visual C++ 14.0. If you see any errors related to this, either install the Microsoft Visual C++ tools or install the API without dependencies.\n",
132149
"\n",
133150
"### Install without Dependencies\n",
134151
"\n",
@@ -138,6 +155,40 @@
138155
"\n",
139156
"***\n",
140157
"## Upgrade the `arcgis` package\n",
158+
"#### ArcGIS Pro 2.2\n",
159+
"ArcGIS Pro 2.2 ships with the ArcGIS API for Python 1.4.1 installed. The initial ArcGIS Pro installation creates a default read-only conda environment named `arcgispro-py3`. To upgrade the ArcGIS API for Python package, use the [`Python Package Manager`](http://pro.arcgis.com/en/pro-app/arcpy/get-started/what-is-conda.htm) to create a new environment and then install the latest release of the ArcGIS API for Python:\n",
160+
" * Open ArcGIS Pro with a new blank Project\n",
161+
" * Select the Project tab to access the Pro backstage (see screenshot below)\n",
162+
" * Select the Python menu option\n",
163+
" * Click `Manage Environments`, then click `New`\n",
164+
" \n",
165+
" ![python package manager mng envts](../../static/img/ppm_mng_env.png)\n",
166+
" \n",
167+
" * Type a name for the new environment and click `Save`\n",
168+
" \n",
169+
" ![python packagemanager new](../../static/img/ppm_mng_env_new.png)\n",
170+
" * **Allow blue progress bar at the bottom of the dialog to complete.** Proceeding before this completes could result in an incomplete environment that may not perform properly.\n",
171+
" ![python package manager progress bar](../../static/img/ppm_env_create_progress.png)\n",
172+
" \n",
173+
" * Select the Active radio button to make the new enviroment active\n",
174+
" \n",
175+
" ![python_package_manager_active](../../static/img/ppm_active_env.png)\n",
176+
" \n",
177+
" * Close the Manage Environments dialog and close ArcGIS Pro\n",
178+
" * Open the Python Command Prompt: Start > All Programs > > ArcGIS > ArcGIS Pro > Python Command Prompt\n",
179+
" * Type the command below:\n",
180+
" `conda upgrade -c esri arcgis`\n",
181+
"\n",
182+
" ![upgrade_command_prompt](../../static/img/cmd_upgrade_pyapi.png)\n",
183+
"\n",
184+
"* Type `y` to Proceed:\n",
185+
"\n",
186+
" ![upgrade command](../../static/img/cmd_upgrade_y.png)\n",
187+
"* Type\n",
188+
" `conda list arcgis` to verify the upgrade:\n",
189+
" ![upgrade verification](../../static/img/cmd_upgrade_verify.png)\n",
190+
"\n",
191+
"\n",
141192
"#### ArcGIS Pro 2.1\n",
142193
"ArcGIS Pro 2.1 ships with the ArcGIS API for Python 1.2.5 installed. To update to the newest release, proceed to to run the command below from either a Terminal window with the arcgispro-py3 environment active, or the **Python Command Prompt**:\n",
143194
"\n",
@@ -208,9 +259,9 @@
208259
" \n",
209260
"You should see a map come up as shown below:\n",
210261
"\n",
211-
"![test your install](../../static/img/guide_getstarted_InstallAndSetup_02.PNG)\n",
262+
"![test your install](../../static/img/guide_getstarted_installandsetup_02.png)\n",
212263
"\n",
213-
"Learn more about the API using the [guide](https://developers.arcgis.com/python/guide/) and try out the [samples](https://developers.arcgis.com/python/sample-notebooks/)."
264+
"Learn more about the API using the [guide](../) and try out the [samples](../../sample-notebooks/)."
214265
]
215266
},
216267
{
@@ -233,7 +284,7 @@
233284
" \n",
234285
" `docker pull esridocker/arcgis-api-python-notebook`\n",
235286
" \n",
236-
" ![docker pull command](../../static/img/guide_getstarted_InstallAndSetup_04.PNG)\n",
287+
" ![docker pull command](../../static/img/guide_getstarted_installandsetup_04.png)\n",
237288
"\n",
238289
"\n",
239290
" * Then spin the image into a container using the following command in terminal. Replace the `<localport>` with an available port number, for instance `8889`. \n",
@@ -243,7 +294,7 @@
243294
"\n",
244295
" * When the container starts, it will provide a URL (with a one time token) to open your local Notebook instance. Copy the URL and paste it in your browser's address bar to use the notebooks.\n",
245296
" \n",
246-
"<h2><a name=\"Install-Offline\" style=\"color:black\"><strong>Install Offline</strong></a></h2>\n",
297+
"## Install-Offline\n",
247298
"\n",
248299
"Install the API on a machine without internet access or on a disconnected network with the following steps:\n",
249300
" \n",
@@ -261,13 +312,6 @@
261312
"<br>\n",
262313
"**NOTE:** For advanced users or those needing information on specific environments, see [Configuration](https://conda.io/docs/user-guide/configuration/use-condarc.html) for options to configure various aspects of conda"
263314
]
264-
},
265-
{
266-
"cell_type": "code",
267-
"execution_count": null,
268-
"metadata": {},
269-
"outputs": [],
270-
"source": []
271315
}
272316
],
273317
"metadata": {
@@ -287,7 +331,7 @@
287331
"name": "python",
288332
"nbconvert_exporter": "python",
289333
"pygments_lexer": "ipython3",
290-
"version": "3.5.5"
334+
"version": "3.6.5"
291335
},
292336
"varInspector": {
293337
"cols": {

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

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,37 @@
1515
"## Dependencies\n",
1616
"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 just the [`six`](https://pypi.python.org/pypi/six) package installed. See [Install without Dependencies](../install-and-set-up/#Install-without-Dependencies) to install the `arcgis` package in this manner.\n",
1717
"\n",
18-
"It is recommended to install the `arcgis` package the default way of either `conda install -c esri arcgis` or `pip install arcgis`. When installed in this manner, all the below dependencies are automatically installed. (Note that most of these packages have dependencies of their own.)\n",
18+
"It is recommended to install the `arcgis` package the default way of either `conda install -c esri arcgis` or `pipenv install arcgis`. When installed in this manner, all the below dependencies are automatically installed. Note that most of these packages have dependencies of their own.\n",
1919
"\n",
2020
"* [six](https://pypi.python.org/pypi/six)\n",
2121
"* [pandas](https://pandas.pydata.org/)\n",
2222
"* [numpy](http://www.numpy.org/)\n",
2323
"* [pyshp](https://pypi.python.org/pypi/pyshp/)\n",
2424
"* [matplotlib](https://matplotlib.org/)\n",
2525
"* [notebook](https://ipython.org/notebook.html)\n",
26-
"* [ipywidgets >=5.2.2,<7](https://ipywidgets.readthedocs.io/en/stable/)\n",
27-
"* [widgetsnbextension >=1.2.6,<3](https://pypi.python.org/pypi/widgetsnbextension)\n",
26+
"* [ipywidgets >=7](https://ipywidgets.readthedocs.io/en/stable/)\n",
27+
"* [widgetsnbextension >=3](https://pypi.python.org/pypi/widgetsnbextension)\n",
2828
"* [keyring](https://pypi.python.org/pypi/keyring/10.6.0)\n",
2929
"* [winkerberos](https://pypi.python.org/pypi/winkerberos/0.7.0) (Windows only)\n",
3030
"\n",
31-
"> Note: if `arcpy` is found in the current python environment, it may be used in various locations. Otherwise, `pyshp` will be used. See [SpatialDataFrame](https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html?highlight=spatialdataframe#spatialdataframe) for more information."
31+
"> Note: if `arcpy` is found in the current python environment, it may be used in various locations. Otherwise, `pyshp` will be used. See [SpatialDataFrame](https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.toc.html?highlight=spatialdataframe#spatialdataframe) for more information.\n",
32+
"\n",
33+
"### Optional Dependencies\n",
34+
"\n",
35+
"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 the below packages:\n",
36+
"\n",
37+
"* [beautifulsoup](https://www.crummy.com/software/BeautifulSoup/) - used when authenticating with OAuth2.\n",
38+
"* [dill](https://pypi.org/project/dill/#description) - used when creating a Python toolbox from a method."
3239
]
40+
},
41+
{
42+
"cell_type": "code",
43+
"execution_count": null,
44+
"metadata": {
45+
"collapsed": true
46+
},
47+
"outputs": [],
48+
"source": []
3349
}
3450
],
3551
"metadata": {
@@ -48,7 +64,7 @@
4864
"name": "python",
4965
"nbconvert_exporter": "python",
5066
"pygments_lexer": "ipython3",
51-
"version": "3.5.5"
67+
"version": "3.6.5"
5268
}
5369
},
5470
"nbformat": 4,

guide/01-getting-started/understanding-conda.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@
111111
"\n",
112112
"`conda info --envs`\n",
113113
"\n",
114-
"![conda_info_envs Image](../../static/img/guide_getstarted_UnderstandingConda01.png)\n",
114+
"![conda_info_envs Image](../../static/img/guide_getstarted_understandingconda01.png)\n",
115115
"\n",
116116
"Enter the directory name and add python.exe to set the correct path to the Python interpreter for a specific environment. For example, the correct interpreter for the arcgispro-py3 environment in an IDE based on the screenshot above would be:\n",
117117
"\n",
118118
"`C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\python.exe`\n",
119119
"\n",
120-
"![conda environment interpreter in PyCharm IDE](../../static/img/guide_getstarted_UnderstandingConda_pycharm.png)\n",
120+
"![conda environment interpreter in PyCharm IDE](../../static/img/guide_getstarted_understandingconda_pycharm.png)\n",
121121
"\n",
122122
"See [Finding your Anaconda Python interpreter path](https://docs.anaconda.com/anaconda/user-guide/tasks/integration/python-path) for more detailed instructions on different systems.\n",
123123
"\n",
@@ -174,7 +174,7 @@
174174
"name": "python",
175175
"nbconvert_exporter": "python",
176176
"pygments_lexer": "ipython3",
177-
"version": "3.6.4"
177+
"version": "3.6.1"
178178
},
179179
"varInspector": {
180180
"cols": {

0 commit comments

Comments
 (0)