Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python: ["3.9"]
python: ["3.7", "3.10"]
os: [ubuntu-latest] # TODO: macos-latest, windows-latest
runs-on: ${{ matrix.os }}
steps:
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.venv
__pycache__
/docs/_build
temporalio/api/*
!temporalio/api/__init__.py
temporalio/bridge/proto/*
!temporalio/bridge/proto/__init__.py
__pycache__
temporalio/bridge/target/

18 changes: 18 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.. _api:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use markdown?
I haven't looked into it much but there seems to be a markdown extension for sphinx https://www.sphinx-doc.org/en/master/usage/markdown.html.

The reasoning is that markdown is much more popular and well known but that might not apply in the case of sphinx docs.

I know rst is the standard for python docs so feel free to ignore this comment.


API
===

.. module:: temporalio

Client
------

.. automodule:: temporalio.client
:members:

Converters
----------

.. automodule:: temporalio.converter
:members:
69 changes: 69 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Configuration file for the Sphinx documentation builder.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you eventually planning to put this on readthedocs.org?

#
# 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("../"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is relative to PWD, use os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) to make it relative to the file.



# -- Project information -----------------------------------------------------

project = "Temporal Python SDK"
copyright = "2022, Temporal Technologies Inc"
author = "Temporal Technologies Inc"


# -- General configuration ---------------------------------------------------

# 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.intersphinx",
"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 = ["_build", "Thumbs.db", ".DS_Store"]


# -- 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"]

intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),
}

autodoc_docstring_signature = True

autodoc_typehints = "description"

autodoc_typehints_description_target = "documented"

autodoc_preserve_defaults = True
69 changes: 69 additions & 0 deletions docs/direct_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
.. _direct_api:

Direct gRPC API
===============

Raw gRPC Client
---------------

.. automodule:: temporalio.workflow_service
:members:

Temporal API Objects
--------------------

.. automodule:: temporalio.api.common.v1
:members:
:imported-members:

.. automodule:: temporalio.api.command.v1
:members:
:imported-members:

.. automodule:: temporalio.api.enums.v1
:members:
:imported-members:

.. automodule:: temporalio.api.errordetails.v1
:members:
:imported-members:

.. automodule:: temporalio.api.failure.v1
:members:
:imported-members:

.. automodule:: temporalio.api.filter.v1
:members:
:imported-members:

.. automodule:: temporalio.api.history.v1
:members:
:imported-members:

.. automodule:: temporalio.api.namespace.v1
:members:
:imported-members:

.. automodule:: temporalio.api.query.v1
:members:
:imported-members:

.. automodule:: temporalio.api.replication.v1
:members:
:imported-members:

.. automodule:: temporalio.api.taskqueue.v1
:members:
:imported-members:

.. automodule:: temporalio.api.version.v1
:members:
:imported-members:

.. automodule:: temporalio.api.workflow.v1
:members:
:imported-members:

.. automodule:: temporalio.api.workflowservice.v1
:members:
:imported-members:
23 changes: 23 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. Temporal Python SDK documentation master file, created by
sphinx-quickstart on Fri Feb 4 11:52:42 2022.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Temporal Python SDK
===================

.. toctree::
:maxdepth: 2
:caption: Contents:

api
direct_api



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Loading