Cookiecutter-Spatial-Data-Science strives to streamline and promote use of best practices for projects combining Geography and Data Science through a logical, reasonably standardized, and flexible project structure.
Cookiecutter-Spatial-Data-Science project grew out of a need within the Advanced Analytics team at Esri to streamline project bootstrapping, encourage innovation, increase repeatability, encourage documentation, and encourage best practices.
- ArcGIS Pro 2.9
- Conda (Anaconda or miniconda)
- Cookiecutter >= 1.4.0
> conda install -c conda-forge cookiecutter
> cookiecutter https://github.com/esri/cookiecutter-spatial-data-science
Based on the pattern provided in the Cookiecutter Data Science template by Driven Data this template streamlines a number of commands using the make
command pattern.
-
make env
- builds the Conda environment with all the name and dependencies fromenvironment_dev.yml
and installs the local project package using the commandpython -m pip install -e ./src/src/<project_package>
so you can easily test against the package as you are developing it. -
make env_clone
- designed for environments using the default Conda instance installed with ArcGIS Pro. It is similar tomake env
, except this command clones thearcgispro-py3
environment. Otherwise, it still installs the packages listed inenvironment_dev.yml
and installs the local package usingpip
as described above. -
make docs
- builds Sphinx docs based on files in./docsrc/source
and places them in./docs
. This enables easy publishing in the master branch in GitHub. -
make test
- activates the environment created by themake env
ormake env_clone
and runs all the tests in the./testing
directory using PyTest. Alternately, if you prefer to use TOX for testing (my preference), there is atox.ini
file included as well. The dependencies (tox
andtox-conda
) for using TOX are included in the default requirements. By default, the TOX file creates an environment from theenvironment.yml
file using much fewer dependencies than the*_dev.yml
files.
Bump2Version is preconfigured based on hints from this article on Medium.
If you want to...
- apply a patch,
bumpversion patch
- update version with no breaking changes (minor version update),
bumpversion minor
- update version with breaking changes (major version update),
bumpversion major
- create a release (tagged in vesrion control - Git),
bumpversion --tag release
Find a bug or want to request a new feature? Please let us know by submitting an issue.
Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.
Copyright 2020 Esri
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
A copy of the license is available in the repository's LICENSE file.