Skip to content

Early client impl and docs scaffolding #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Feb 16, 2022
Merged
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
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ jobs:
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
# Needed to tests since they use external server
- uses: actions/setup-go@v2
with:
go-version: "1.17"
- run: python -m pip install --upgrade wheel poetry poethepoet
- run: poetry install
- run: poe lint
- run: poe build
- run: poe test
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.venv
__pycache__
/docs/_build
temporalio/api/*
!temporalio/api/__init__.py
temporalio/bridge/proto/*
!temporalio/bridge/proto/__init__.py
__pycache__
temporalio/bridge/target/
/tests/fixtures/golangserver/golangserver
/tests/fixtures/golangworker/golangworker
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
# Temporal Python SDK

### Local development enviroment
**UNDER DEVELOPMENT**

- Install the system dependencies
The Python SDK is under development. There are no compatibility guarantees nor proper documentation pages at this time.

### Local development environment

- Install the system dependencies:

- Python >=3.7
- [pipx](https://github.com/pypa/pipx#install-pipx)
- [`poetry`](https://github.com/python-poetry/poetry) `pipx install poetry`
- [`poe`](https://github.com/nat-n/poethepoet) `pipx install poethepoet`
- [pipx](https://github.com/pypa/pipx#install-pipx) (only needed for installing the two dependencies below)
- [poetry](https://github.com/python-poetry/poetry) `pipx install poetry`
- [poe](https://github.com/nat-n/poethepoet) `pipx install poethepoet`

- Use a local virtual env environment (helps IDEs and Windows):

```bash
poetry config virtualenvs.in-project true
```

- Install the package dependencies
- Install the package dependencies:

```bash
poetry install
```

- Build the project
- Build the project (requires Rust):

```bash
poe build
```

- Run the tests (requires Go):

```bash
poe test
```
30 changes: 30 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.. _api:

API
===

.. module:: temporalio

Client
------

.. automodule:: temporalio.client
:members:

Converters
----------

.. automodule:: temporalio.converter
:members:

Common
----------

.. automodule:: temporalio.common
:members:

Exceptions
----------

.. automodule:: temporalio.exceptions
:members:
71 changes: 71 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 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.join(os.path.dirname(__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

autodoc_member_order = "bysource"
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