cookiecutter-spatial-data-science
cookiecutter-spatial-data-science copied to clipboard
A project template for spatial data science projects marrying best practices from the respective disciplines of Geography and Artificial Intelligence.
Cookiecutter-Spatial-Data-Science
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.
Requirements
- ArcGIS Pro 2.9
- Conda (Anaconda or miniconda)
- Cookiecutter >= 1.4.0
> conda install -c conda-forge cookiecutter
To start a new project, run:
> cookiecutter https://github.com/esri/cookiecutter-spatial-data-science
Using Make - common commands
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.ymland 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-py3environment. Otherwise, it still installs the packages listed inenvironment_dev.ymland installs the local package usingpipas described above. -
make docs- builds Sphinx docs based on files in./docsrc/sourceand places them in./docs. This enables easy publishing in the master branch in GitHub. -
make test- activates the environment created by themake envormake env_cloneand runs all the tests in the./testingdirectory using PyTest. Alternately, if you prefer to use TOX for testing (my preference), there is atox.inifile included as well. The dependencies (toxandtox-conda) for using TOX are included in the default requirements. By default, the TOX file creates an environment from theenvironment.ymlfile using much fewer dependencies than the*_dev.ymlfiles.
BumpVersion Cliff Notes
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
Issues
Find a bug or want to request a new feature? Please let us know by submitting an issue.
Contributing
Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.
Licensing
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.