зеркало из https://github.com/microsoft/torchgeo.git
Keep API docs up-to-date
This commit is contained in:
Родитель
8b5ffd0a36
Коммит
4635c6afb4
|
@ -0,0 +1,3 @@
|
|||
# API files are auto-generated
|
||||
*.rst
|
||||
!index.rst
|
|
@ -1,20 +1,25 @@
|
|||
# Minimal makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line, and also
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?= -W
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = .
|
||||
BUILDDIR = _build
|
||||
# from the environment for the first four.
|
||||
SPHINX_APIDOC ?= sphinx-apidoc
|
||||
SPHINX_APIDOC_OPTS ?= -f -T
|
||||
SPHINX_BUILD ?= sphinx-build
|
||||
SPHINX_BUILD_OPTS ?= -W --keep-going
|
||||
MODULE_DIR = ..
|
||||
SOURCE_DIR = .
|
||||
BUILD_DIR = _build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
@$(SPHINX_BUILD) -M help "$(SOURCE_DIR)" "$(BUILD_DIR)" $(SPHINX_BUILD_OPTS)
|
||||
|
||||
.PHONY: help Makefile
|
||||
clean:
|
||||
@$(SPHINX_BUILD) -M clean "$(SOURCE_DIR)" "$(BUILD_DIR)" $(SPHINX_BUILD_OPTS)
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
.PHONY: clean help Makefile
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new "make mode" option.
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
@$(SPHINX_APIDOC) -o "$(SOURCE_DIR)" "$(MODULE_DIR)" $(SPHINX_APIDOC_OPTS)
|
||||
@$(SPHINX_BUILD) -M $@ "$(SOURCE_DIR)" "$(BUILD_DIR)" $(SPHINX_BUILD_OPTS)
|
||||
|
|
60
docs/conf.py
60
docs/conf.py
|
@ -6,20 +6,26 @@
|
|||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
|
||||
# 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 pytorch_sphinx_theme
|
||||
|
||||
# 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.
|
||||
sys.path.insert(0, os.path.abspath(".."))
|
||||
|
||||
import torchgeo # noqa: E402
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = "torchgeo"
|
||||
copyright = "2021, Microsoft Corporation"
|
||||
author = "Adam J. Stewart"
|
||||
version = ".".join(torchgeo.__version__.split(".")[:2])
|
||||
release = torchgeo.__version__
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
@ -27,36 +33,60 @@ author = "Adam J. Stewart"
|
|||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon"]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ["_templates"]
|
||||
extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx", "sphinx.ext.napoleon"]
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
||||
exclude_patterns = [
|
||||
"_build",
|
||||
"setup.rst",
|
||||
"tests*.rst",
|
||||
"torchgeo.rst",
|
||||
]
|
||||
|
||||
nitpicky = True
|
||||
nitpick_ignore = [
|
||||
# https://github.com/sphinx-doc/sphinx/issues/8127
|
||||
("py:class", ".."),
|
||||
("py:class", "torch.utils.data.dataset.Dataset"),
|
||||
("py:class", "torch.nn.modules.module.Module"),
|
||||
]
|
||||
|
||||
|
||||
# -- 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 = "pytorch_sphinx_theme"
|
||||
html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
|
||||
|
||||
# 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"]
|
||||
|
||||
# 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 = {
|
||||
"collapse_navigation": False,
|
||||
"display_version": True,
|
||||
"logo_only": True,
|
||||
"pytorch_project": "docs",
|
||||
"navigation_with_keys": True,
|
||||
"analytics_id": "UA-117752657-2",
|
||||
}
|
||||
|
||||
# -- Extension configuration -------------------------------------------------
|
||||
|
||||
autodoc_default_options = {
|
||||
"special-members": "__call__, __getitem__, __init__, __len__"
|
||||
"member-order": "bysource",
|
||||
"undoc-members": False,
|
||||
"private-members": True,
|
||||
"special-members": True,
|
||||
}
|
||||
|
||||
autodoc_member_order = "bysource"
|
||||
|
||||
autodoc_typehints = "description"
|
||||
|
||||
intersphinx_mapping = {
|
||||
"python": ("https://docs.python.org/3", None),
|
||||
"torch": ("https://pytorch.org/docs/stable", None),
|
||||
}
|
||||
|
|
|
@ -1,22 +1,36 @@
|
|||
.. torchgeo documentation master file, created by
|
||||
sphinx-quickstart on Tue Jun 15 20:21:46 2021.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
torchgeo
|
||||
========
|
||||
|
||||
Welcome to torchgeo's documentation!
|
||||
====================================
|
||||
.. automodule:: torchgeo
|
||||
:members:
|
||||
|
||||
This library is part of the `PyTorch <http://pytorch.org/>`_ project.
|
||||
PyTorch is an open source machine learning framework.
|
||||
|
||||
The :mod:`torchgeo` package consists of popular datasets, model
|
||||
architectures, and common image transformations for geospatial data.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
:caption: Package Reference
|
||||
|
||||
torchgeo
|
||||
torchgeo.datasets
|
||||
torchgeo.transforms
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: PyTorch Libraries
|
||||
|
||||
PyTorch <https://pytorch.org/docs>
|
||||
torchaudio <https://pytorch.org/audio>
|
||||
torchtext <https://pytorch.org/text>
|
||||
torchvision <https://pytorch.org/vision>
|
||||
TorchElastic <https://pytorch.org/elastic/>
|
||||
TorchServe <https://pytorch.org/serve>
|
||||
PyTorch on XLA Devices <http://pytorch.org/xla/>
|
||||
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
Indices
|
||||
-------
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
torchgeo.datasets package
|
||||
=========================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
torchgeo.datasets.cowc module
|
||||
-----------------------------
|
||||
|
||||
.. automodule:: torchgeo.datasets.cowc
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
torchgeo.datasets.cv4a\_kenya\_crop\_type module
|
||||
------------------------------------------------
|
||||
|
||||
.. automodule:: torchgeo.datasets.cv4a_kenya_crop_type
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
torchgeo.datasets.geo module
|
||||
----------------------------
|
||||
|
||||
.. automodule:: torchgeo.datasets.geo
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
torchgeo.datasets.landcoverai module
|
||||
------------------------------------
|
||||
|
||||
.. automodule:: torchgeo.datasets.landcoverai
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
torchgeo.datasets.nwpu module
|
||||
-----------------------------
|
||||
|
||||
.. automodule:: torchgeo.datasets.nwpu
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
torchgeo.datasets.utils module
|
||||
------------------------------
|
||||
|
||||
.. automodule:: torchgeo.datasets.utils
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: torchgeo.datasets
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
|
@ -1,19 +0,0 @@
|
|||
torchgeo package
|
||||
================
|
||||
|
||||
Subpackages
|
||||
-----------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 4
|
||||
|
||||
torchgeo.datasets
|
||||
torchgeo.transforms
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: torchgeo
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
|
@ -1,21 +0,0 @@
|
|||
torchgeo.transforms package
|
||||
===========================
|
||||
|
||||
Submodules
|
||||
----------
|
||||
|
||||
torchgeo.transforms.transforms module
|
||||
-------------------------------------
|
||||
|
||||
.. automodule:: torchgeo.transforms.transforms
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
||||
.. automodule:: torchgeo.transforms
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
Загрузка…
Ссылка в новой задаче