-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e69cb7
commit 2d2f203
Showing
16 changed files
with
473 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
* PyLandStats version: | ||
* Python version: | ||
* Operating System: | ||
|
||
### Description | ||
|
||
Describe what you were trying to get done. | ||
Tell us what happened, what went wrong, and what you expected to happen. | ||
|
||
### What I Did | ||
|
||
``` | ||
Paste the command(s) you ran and the output. | ||
If there was a crash, please include the traceback here. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Contributing | ||
|
||
Contributions are always greatly appreciated and credit will always be given. | ||
|
||
## Types of contributions | ||
|
||
### Report Bugs | ||
|
||
Report bugs at https://github.com/martibosch/pylandstats/issues. | ||
|
||
If you are reporting a bug, please include: | ||
|
||
* Your operating system name and version. | ||
* Any details about your local setup that might be helpful in troubleshooting. | ||
* Detailed steps to reproduce the bug. | ||
|
||
### Fix bugs | ||
|
||
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it. | ||
|
||
#### If you have a "how-to" question rather than a bug report or new feature proposal: | ||
|
||
- please ask your question on [StackOverflow](https://stackoverflow.com/search?q=osmnx) | ||
|
||
#### If you've found an error: | ||
|
||
- read the error message and [documentation](https://osmnx.readthedocs.io/) | ||
- search through the [open issues](https://github.com/gboeing/osmnx/issues?q=is%3Aopen+is%3Aissue) and [closed issues](https://github.com/gboeing/osmnx/issues?q=is%3Aissue+is%3Aclosed) first | ||
- if the problem is with a dependency of this project, open an issue on the dependency's repo | ||
- if the problem is with OSMnx and you can fix it simply, please submit a PR | ||
- if the problem persists, please open an issue in the [issue tracker](https://github.com/gboeing/osmnx/issues) filling out all sections of the template, including a minimal working example so others can independently and completely reproduce the problem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.PHONY: docs help | ||
.DEFAULT_GOAL := help | ||
|
||
docs: ## generate Sphinx HTML documentation, including API docs | ||
rm -f docs/pylandstats.rst | ||
rm -f docs/modules.rst | ||
# sphinx-apidoc -o docs pylandstats | ||
$(MAKE) -C docs clean | ||
$(MAKE) -C docs html | ||
$(BROWSER) docs/_build/html/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SPHINXPROJ = pylandstats | ||
SOURCEDIR = src | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=python -msphinx | ||
) | ||
set SOURCEDIR=. | ||
set BUILDDIR=_build | ||
set SPHINXPROJ=pylandstats | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The Sphinx module was not found. Make sure you have Sphinx installed, | ||
echo.then set the SPHINXBUILD environment variable to point to the full | ||
echo.path of the 'sphinx-build' executable. Alternatively you may add the | ||
echo.Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.http://sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% | ||
|
||
:end | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pylandstats | ||
=========== | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
pylandstats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
martibosch@martibosch-x1c6.4246:1562129712 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.. mdinclude:: ../../CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# | ||
# python_boilerplate documentation build configuration file, created by | ||
# sphinx-quickstart on Fri Jun 9 13:47:02 2017. | ||
# | ||
# This file is execfile()d with the current directory set to its | ||
# containing dir. | ||
# | ||
# Note that not all possible configuration values are present in this | ||
# autogenerated file. | ||
# | ||
# All configuration values have a default; values that are commented out | ||
# serve to show the default. | ||
|
||
# If extensions (or modules to document with autodoc) are in another | ||
# directory, add these directories to sys.path here. If the directory is | ||
# relative to the documentation root, use os.path.abspath to make it | ||
# absolute, like shown here. | ||
# | ||
import os | ||
import sys | ||
|
||
import pylandstats | ||
|
||
sys.path.insert(0, os.path.abspath('..')) | ||
|
||
# -- General configuration --------------------------------------------- | ||
|
||
# If your documentation needs a minimal Sphinx version, state it here. | ||
# | ||
# needs_sphinx = '1.0' | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. | ||
extensions = [ | ||
'm2r', 'sphinx.ext.napoleon', 'sphinx.ext.autodoc', 'sphinx.ext.viewcode' | ||
] | ||
|
||
napoleon_numpy_dostring = True | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# The suffix(es) of source filenames. | ||
# You can specify multiple suffix as a list of string: | ||
# | ||
# source_suffix = ['.rst', '.md'] | ||
source_suffix = '.rst' | ||
|
||
# The master toctree document. | ||
master_doc = 'index' | ||
|
||
# General information about the project. | ||
project = 'PyLandStats' | ||
# copyright = "2019, Martí Bosch" | ||
author = "Martí Bosch" | ||
|
||
# The version info for the project you're documenting, acts as replacement | ||
# for |version| and |release|, also used in various other places throughout | ||
# the built documents. | ||
# | ||
# The short X.Y version. | ||
version = pylandstats.__version__ | ||
# The full version, including alpha/beta/rc tags. | ||
release = pylandstats.__version__ | ||
|
||
# The language for content autogenerated by Sphinx. Refer to documentation | ||
# for a list of supported languages. | ||
# | ||
# This is also used if you do content translation via gettext catalogs. | ||
# Usually you set "language" from the command line for these cases. | ||
language = None | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This patterns also effect to html_static_path and html_extra_path | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
|
||
# The name of the Pygments (syntax highlighting) style to use. | ||
pygments_style = 'sphinx' | ||
|
||
# If true, `todo` and `todoList` produce output, else they produce nothing. | ||
todo_include_todos = False | ||
|
||
# -- Options for HTML output ------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = 'alabaster' | ||
|
||
# Theme options are theme-specific and customize the look and feel of a | ||
# theme further. For a list of options available for each theme, see the | ||
# documentation. | ||
# | ||
# html_theme_options = {} | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = ['_static'] | ||
|
||
# -- Options for HTMLHelp output --------------------------------------- | ||
|
||
# Output file base name for HTML help builder. | ||
htmlhelp_basename = 'pylandstatsdoc' | ||
|
||
# -- Options for LaTeX output ------------------------------------------ | ||
|
||
latex_elements = { | ||
# The paper size ('letterpaper' or 'a4paper'). | ||
# | ||
# 'papersize': 'letterpaper', | ||
|
||
# The font size ('10pt', '11pt' or '12pt'). | ||
# | ||
# 'pointsize': '10pt', | ||
|
||
# Additional stuff for the LaTeX preamble. | ||
# | ||
# 'preamble': '', | ||
|
||
# Latex figure (float) alignment | ||
# | ||
# 'figure_align': 'htbp', | ||
} | ||
|
||
# Grouping the document tree into LaTeX files. List of tuples | ||
# (source start file, target name, title, author, documentclass | ||
# [howto, manual, or own class]). | ||
latex_documents = [ | ||
(master_doc, 'pylandstats.tex', u'PyLandStats Documentation', | ||
u'Martí Bosch', 'manual'), | ||
] | ||
|
||
# -- Options for manual page output ------------------------------------ | ||
|
||
# One entry per manual page. List of tuples | ||
# (source start file, name, description, authors, manual section). | ||
man_pages = [(master_doc, 'pylandstats', u'PyLandStats Documentation', | ||
[author], 1)] | ||
|
||
# -- Options for Texinfo output ---------------------------------------- | ||
|
||
# Grouping the document tree into Texinfo files. List of tuples | ||
# (source start file, target name, title, author, | ||
# dir menu entry, description, category) | ||
texinfo_documents = [ | ||
(master_doc, 'pylandstats', u'PyLandStats Documentation', author, | ||
'pylandstats', | ||
'An open-source Pythonic library to compute landscape metrics', | ||
'Miscellaneous'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.. mdinclude:: ../../CONTRIBUTING.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
PyLandStats documentation! | ||
====================================== | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
landscape | ||
|
||
Features | ||
-------- | ||
|
||
Using PyLandStats | ||
----------------- | ||
|
||
.. code-block:: bash | ||
$ pip install pylandstats | ||
Indices and tables | ||
================== | ||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
========= | ||
Landscape | ||
========= | ||
|
||
----------------- | ||
Landscape Metrics | ||
----------------- | ||
|
||
Patch-level metrics | ||
=================== | ||
|
||
Area, density, edge | ||
------------------- | ||
|
||
.. automethod:: pylandstats.landscape.Landscape.area | ||
.. automethod:: pylandstats.landscape.Landscape.perimeter | ||
|
||
Shape | ||
----- | ||
|
||
.. automethod:: pylandstats.landscape.Landscape.perimeter_area_ratio | ||
.. automethod:: pylandstats.landscape.Landscape.shape_index | ||
.. automethod:: pylandstats.landscape.Landscape.fractal_dimension | ||
|
||
Aggregation | ||
----------- | ||
|
||
.. automethod:: pylandstats.landscape.Landscape.euclidean_nearest_neighbor | ||
|
||
Class-level and landscape-level metrics | ||
======================================= | ||
|
||
Area, density, edge | ||
------------------- | ||
|
||
.. automethod:: pylandstats.landscape.Landscape.total_area | ||
.. automethod:: pylandstats.landscape.Landscape.proportion_of_landscape | ||
.. automethod:: pylandstats.landscape.Landscape.number_of_patches | ||
.. automethod:: pylandstats.landscape.Landscape.patch_density | ||
.. automethod:: pylandstats.landscape.Landscape.largest_patch_index | ||
.. automethod:: pylandstats.landscape.Landscape.total_edge | ||
.. automethod:: pylandstats.landscape.Landscape.edge_density | ||
|
||
Aggregation | ||
----------- | ||
|
||
.. automethod:: pylandstats.landscape.Landscape.landscape_shape_index | ||
|
||
Landscape-level metrics | ||
======================= | ||
|
||
Contagion, interspersion | ||
------------------------ | ||
|
||
.. automethod:: pylandstats.landscape.Landscape.contagion | ||
.. automethod:: pylandstats.landscape.Landscape.shannon_diversity_index | ||
|
||
|
||
----------------------------- | ||
Computing metrics data frames | ||
----------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pylandstats | ||
=========== | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
|
||
pylandstats |
Oops, something went wrong.