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
Showing
17 changed files
with
252 additions
and
27 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 |
---|---|---|
|
@@ -3,6 +3,9 @@ dist/* | |
build/* | ||
env/* | ||
|
||
# docs build directory | ||
docs/build/* | ||
|
||
# global file patterns | ||
*.log | ||
*.pyc | ||
|
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,19 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Build documentation with Sphinx | ||
sphinx: | ||
builder: html | ||
configuration: docs/conf.py | ||
|
||
# Optionally build your docs in additional formats such as PDF | ||
formats: [] | ||
|
||
# Optionally set the version of Python and requirements required to build your docs | ||
python: | ||
install: | ||
- requirements: requirements-docs.txt |
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
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 @@ | ||
API Reference | ||
===================== | ||
|
||
|
||
TUF provides multiple APIs: | ||
|
||
|
||
* The low-level :doc:`tuf.api` provides access to a Metadata file abstraction | ||
that closely follows the TUF specification's `document formats`_. | ||
This API handles de/serialization to and from files and makes it easier to access | ||
and modify metadata content safely. It is purely focused on individual | ||
pieces of Metadata and provides no concepts like "repository" or "update | ||
workflow". | ||
|
||
* The `client update workflow`_ is implemented in the :doc:`tuf.ngclient` module: | ||
It is a higher-level API that provides ways to query and download target files | ||
securely, while handling the TUF update workflow behind the scenes. ngclient | ||
is implemented on top of the Metadata API and can be used to implement | ||
various TUF clients with relatively little effort. | ||
|
||
.. note:: Major API changes are unlikely but these APIs are not yet | ||
considered stable, and a higher-level repository operations API is not yet | ||
included. | ||
|
||
There is a legacy implementation in the source code (not covered by this | ||
documentation): it is in maintenance mode and receives no feature work. | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
tuf.api | ||
tuf.ngclient | ||
|
||
.. _client update workflow: https://theupdateframework.github.io/specification/latest/#detailed-client-workflow | ||
.. _document formats: https://theupdateframework.github.io/specification/latest/#document-formats |
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 @@ | ||
Metadata | ||
--------------------------------- | ||
|
||
.. automodule:: tuf.api.metadata | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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,18 @@ | ||
Metadata API | ||
=============== | ||
|
||
The low-level Metadata API contains two modules: | ||
|
||
* :doc:`tuf.api.metadata` contains the actual Metadata abstraction | ||
that higher level libraries and application code should use to interact | ||
with TUF metadata. This abstraction provides safe reading and writing to | ||
supported file formats and helper functions for accessing and modifying | ||
the metadata contents. | ||
* :doc:`tuf.api.serialization` covers serializing the metadata into | ||
specific wire formats (like json). | ||
|
||
.. toctree:: | ||
:hidden: | ||
|
||
tuf.api.metadata | ||
tuf.api.serialization |
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 @@ | ||
Serialization | ||
============================= | ||
|
||
JSON serialization | ||
----------------------------- | ||
|
||
.. automodule:: tuf.api.serialization.json | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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 @@ | ||
Configuration | ||
============= | ||
|
||
.. automodule:: tuf.ngclient.config | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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 @@ | ||
Fetcher | ||
============ | ||
|
||
.. automodule:: tuf.ngclient.fetcher | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
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,19 @@ | ||
ngclient | ||
======== | ||
|
||
The ngclient module contains a complete TUF client library implementation. | ||
|
||
* :doc:`tuf.ngclient.updater` implements the `detailed client workflow`_ | ||
* :doc:`tuf.ngclient.config` provides optional configuration for the updater | ||
* :doc:`tuf.ngclient.fetcher` can be used for optional low-level network I/O control | ||
|
||
|
||
.. toctree:: | ||
:hidden: | ||
|
||
tuf.ngclient.updater | ||
tuf.ngclient.config | ||
tuf.ngclient.fetcher | ||
|
||
.. _detailed client workflow: https://theupdateframework.github.io/specification/latest/#detailed-client-workflow | ||
|
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,6 @@ | ||
Updater | ||
========= | ||
|
||
.. automodule:: tuf.ngclient.updater | ||
:members: | ||
:special-members: __init__ |
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,56 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file only contains a selection of the most common options. For a full | ||
# list see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- 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 | ||
sys.path.insert(0, os.path.abspath(os.path.join('..'))) | ||
|
||
import tuf | ||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = 'TUF' | ||
copyright = '2021, New York University and the TUF contributors' | ||
author = 'New York University and the TUF contributors' | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
master_doc = 'index' | ||
|
||
# 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.napoleon'] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# 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 = ['GETTING_STARTED.rst', 'OVERVIEW.rst', 'TAP.rst'] | ||
|
||
# -- 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 = 'sphinx_rtd_theme' | ||
|
||
# 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'] | ||
|
||
autodoc_mock_imports = ['securesystemslib'] | ||
|
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,19 @@ | ||
TUF Developer Documentation | ||
=========================== | ||
|
||
This documentation provides essential information for those developing software | ||
with the `Python reference implementation of The Update Framework (TUF) | ||
<https://github.com/theupdateframework/tuf>`_. | ||
|
||
The reference implementation provides easy-to-use components for Python | ||
developers but also aims to be a readable guide and demonstration for those | ||
working on implementing TUF in their own languages, environments, or update | ||
systems. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Contents: | ||
|
||
api/api-reference | ||
CONTRIBUTORS | ||
INSTALLATION |
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,14 @@ | ||
# Install requirements needed in for the documentation build | ||
|
||
# pinned tuf runtime dependencies (should auto-update and -trigger ci/cd) | ||
-r requirements-pinned.txt | ||
|
||
# install sphinx and its extensions | ||
sphinx | ||
sphinx-rtd-theme | ||
|
||
# Docutils versions >=0.17.0 have incompatibilites with | ||
# sphinx-rtd-theme and fail to render some features. | ||
# Pin the version until readthedocs release their fix | ||
# (readthedocs/sphinx_rtd_theme#1113). | ||
docutils<0.17.0 |
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
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
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