Skip to content

Commit fa76eac

Browse files
committed
Initial content
1 parent 18e5d5d commit fa76eac

35 files changed

Lines changed: 3458 additions & 17 deletions

.coverage

52 KB
Binary file not shown.

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, v0 ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v6
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependencies
26+
run: |
27+
uv sync
28+
29+
- name: Lint
30+
run: |
31+
uv run ruff format --check
32+
uv run ruff check
33+
34+
- name: Type check
35+
# TODO(preview): Get both passing
36+
run: |
37+
uv run pyright . || true
38+
uv run mypy --check-untyped-defs . || true
39+
40+
- name: Run tests
41+
run: |
42+
uv run pytest --cov=src --cov-report=html:coverage_html_report
43+
44+
- name: Upload coverage report
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: coverage-html-report-${{ matrix.python-version }}
48+
path: coverage_html_report/

.gitignore

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
# Python-generated files
2-
__pycache__/
3-
*.py[oc]
4-
build/
5-
dist/
6-
wheels/
7-
*.egg-info
8-
9-
# Virtual environments
1+
__pycache__
2+
dist
103
.venv
4+
docs

.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### Type-checking, Linting, and Formatting
2+
3+
```sh
4+
uv run pyright
5+
uv run mypy --check-untyped-defs .
6+
uv run ruff check --select I
7+
uv run ruff format --check
8+
```
9+
10+
### Formatting
11+
```
12+
uv run ruff check --select I --fix
13+
uv run ruff format
14+
```

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Temporal Technologies Inc. All Rights Reserved
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Nexus Python SDK
2+
3+
## What is Nexus?
4+
5+
Nexus is a synchronous RPC protocol. Arbitrary duration operations are modelled on top
6+
of a set of pre-defined synchronous RPCs.
7+
8+
A Nexus caller calls a handler. The handler may respond inline (synchronous response) or
9+
return a token referencing the ongoing operation (asynchronous response). The caller can
10+
cancel an asynchronous operation, check for its outcome, or fetch its current state. The
11+
caller can also specify a callback URL, which the handler uses to deliver the result of
12+
an asynchronous operation when it is ready.
13+
14+
TODO(prerelease): README content

pyproject.toml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,33 @@ readme = "README.md"
66
authors = [
77
{ name = "Dan Davison", email = "dandavison7@gmail.com" }
88
]
9-
requires-python = ">=3.13"
10-
dependencies = []
9+
requires-python = ">=3.9"
10+
dependencies = [
11+
"typing-extensions>=4.12.2",
12+
]
13+
14+
[dependency-groups]
15+
dev = [
16+
"httpx>=0.28.1",
17+
"mypy>=1.15.0",
18+
"pyright>=1.1.400",
19+
"pytest>=8.3.5",
20+
"pytest-asyncio>=0.26.0",
21+
"pytest-cov>=6.1.1",
22+
"pytest-pretty>=1.3.0",
23+
"ruff>=0.11.7",
24+
]
1125

1226
[build-system]
1327
requires = ["hatchling"]
1428
build-backend = "hatchling.build"
29+
30+
[tool.hatch.build.targets.wheel]
31+
packages = ["src/nexusrpc"]
32+
33+
[tool.pyright]
34+
include = ["src", "tests"]
35+
36+
[tool.ruff]
37+
target-version = "py39"
38+

src/nexus_rpc/__init__.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/nexus_rpc/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)