Skip to content

Commit 2afda4e

Browse files
authored
Client impl and docs scaffolding (#6)
1 parent 7b5a69c commit 2afda4e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+8112
-98
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ jobs:
2727
- uses: actions/setup-python@v1
2828
with:
2929
python-version: ${{ matrix.python }}
30+
# Needed to tests since they use external server
31+
- uses: actions/setup-go@v2
32+
with:
33+
go-version: "1.17"
3034
- run: python -m pip install --upgrade wheel poetry poethepoet
3135
- run: poetry install
3236
- run: poe lint
3337
- run: poe build
38+
- run: poe test

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
.venv
2+
__pycache__
3+
/docs/_build
24
temporalio/api/*
35
!temporalio/api/__init__.py
46
temporalio/bridge/proto/*
57
!temporalio/bridge/proto/__init__.py
6-
__pycache__
8+
temporalio/bridge/target/
9+
/tests/fixtures/golangserver/golangserver
10+
/tests/fixtures/golangworker/golangworker

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,38 @@
11
# Temporal Python SDK
22

3-
### Local development enviroment
3+
**UNDER DEVELOPMENT**
44

5-
- Install the system dependencies
5+
The Python SDK is under development. There are no compatibility guarantees nor proper documentation pages at this time.
6+
7+
### Local development environment
8+
9+
- Install the system dependencies:
610

711
- Python >=3.7
8-
- [pipx](https://github.com/pypa/pipx#install-pipx)
9-
- [`poetry`](https://github.com/python-poetry/poetry) `pipx install poetry`
10-
- [`poe`](https://github.com/nat-n/poethepoet) `pipx install poethepoet`
12+
- [pipx](https://github.com/pypa/pipx#install-pipx) (only needed for installing the two dependencies below)
13+
- [poetry](https://github.com/python-poetry/poetry) `pipx install poetry`
14+
- [poe](https://github.com/nat-n/poethepoet) `pipx install poethepoet`
1115

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

1418
```bash
1519
poetry config virtualenvs.in-project true
1620
```
1721

18-
- Install the package dependencies
22+
- Install the package dependencies:
1923

2024
```bash
2125
poetry install
2226
```
2327

24-
- Build the project
28+
- Build the project (requires Rust):
2529

2630
```bash
2731
poe build
2832
```
33+
34+
- Run the tests (requires Go):
35+
36+
```bash
37+
poe test
38+
```

docs/api.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.. _api:
2+
3+
API
4+
===
5+
6+
.. module:: temporalio
7+
8+
Client
9+
------
10+
11+
.. automodule:: temporalio.client
12+
:members:
13+
14+
Converters
15+
----------
16+
17+
.. automodule:: temporalio.converter
18+
:members:
19+
20+
Common
21+
----------
22+
23+
.. automodule:: temporalio.common
24+
:members:
25+
26+
Exceptions
27+
----------
28+
29+
.. automodule:: temporalio.exceptions
30+
:members:

docs/conf.py

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
import os
14+
import sys
15+
16+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
17+
18+
19+
# -- Project information -----------------------------------------------------
20+
21+
project = "Temporal Python SDK"
22+
copyright = "2022, Temporal Technologies Inc"
23+
author = "Temporal Technologies Inc"
24+
25+
26+
# -- General configuration ---------------------------------------------------
27+
28+
# Add any Sphinx extension module names here, as strings. They can be
29+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
30+
# ones.
31+
extensions = [
32+
"sphinx.ext.autodoc",
33+
"sphinx.ext.intersphinx",
34+
"sphinx.ext.napoleon",
35+
]
36+
37+
# Add any paths that contain templates here, relative to this directory.
38+
templates_path = ["_templates"]
39+
40+
# List of patterns, relative to source directory, that match files and
41+
# directories to ignore when looking for source files.
42+
# This pattern also affects html_static_path and html_extra_path.
43+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
44+
45+
46+
# -- Options for HTML output -------------------------------------------------
47+
48+
# The theme to use for HTML and HTML Help pages. See the documentation for
49+
# a list of builtin themes.
50+
#
51+
html_theme = "sphinx_rtd_theme"
52+
53+
# Add any paths that contain custom static files (such as style sheets) here,
54+
# relative to this directory. They are copied after the builtin static files,
55+
# so a file named "default.css" will overwrite the builtin "default.css".
56+
html_static_path = ["_static"]
57+
58+
intersphinx_mapping = {
59+
"python": ("https://docs.python.org/3/", None),
60+
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),
61+
}
62+
63+
autodoc_docstring_signature = True
64+
65+
autodoc_typehints = "description"
66+
67+
autodoc_typehints_description_target = "documented"
68+
69+
autodoc_preserve_defaults = True
70+
71+
autodoc_member_order = "bysource"

docs/direct_api.rst

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
.. _direct_api:
2+
3+
Direct gRPC API
4+
===============
5+
6+
Raw gRPC Client
7+
---------------
8+
9+
.. automodule:: temporalio.workflow_service
10+
:members:
11+
12+
Temporal API Objects
13+
--------------------
14+
15+
.. automodule:: temporalio.api.common.v1
16+
:members:
17+
:imported-members:
18+
19+
.. automodule:: temporalio.api.command.v1
20+
:members:
21+
:imported-members:
22+
23+
.. automodule:: temporalio.api.enums.v1
24+
:members:
25+
:imported-members:
26+
27+
.. automodule:: temporalio.api.errordetails.v1
28+
:members:
29+
:imported-members:
30+
31+
.. automodule:: temporalio.api.failure.v1
32+
:members:
33+
:imported-members:
34+
35+
.. automodule:: temporalio.api.filter.v1
36+
:members:
37+
:imported-members:
38+
39+
.. automodule:: temporalio.api.history.v1
40+
:members:
41+
:imported-members:
42+
43+
.. automodule:: temporalio.api.namespace.v1
44+
:members:
45+
:imported-members:
46+
47+
.. automodule:: temporalio.api.query.v1
48+
:members:
49+
:imported-members:
50+
51+
.. automodule:: temporalio.api.replication.v1
52+
:members:
53+
:imported-members:
54+
55+
.. automodule:: temporalio.api.taskqueue.v1
56+
:members:
57+
:imported-members:
58+
59+
.. automodule:: temporalio.api.version.v1
60+
:members:
61+
:imported-members:
62+
63+
.. automodule:: temporalio.api.workflow.v1
64+
:members:
65+
:imported-members:
66+
67+
.. automodule:: temporalio.api.workflowservice.v1
68+
:members:
69+
:imported-members:

docs/index.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. Temporal Python SDK documentation master file, created by
2+
sphinx-quickstart on Fri Feb 4 11:52:42 2022.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Temporal Python SDK
7+
===================
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
:caption: Contents:
12+
13+
api
14+
direct_api
15+
16+
17+
18+
Indices and tables
19+
==================
20+
21+
* :ref:`genindex`
22+
* :ref:`modindex`
23+
* :ref:`search`

0 commit comments

Comments
 (0)