Skip to content
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
9 changes: 9 additions & 0 deletions Documentation/client-development-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ Chronicle C# contracts
-> idiomatic Chronicle.Python API
```

### Temporary contracts distribution

Until PyPI trusted publishing is configured, the project dependency resolves the verified
`cratis-chronicle-contracts` 16.38.2 wheel from its matching
[Chronicle GitHub release](https://github.com/Cratis/Chronicle/releases/tag/v16.38.2). A normal development install
fetches it automatically. Do not copy generated contracts into this repository. The dependency will move to the
PyPI release after [the publisher setup](https://github.com/Cratis/Chronicle.Python/issues/15) and
[first publication](https://github.com/Cratis/Chronicle.Python/issues/16) are complete.

## Local kernel

The development kernel listens on `localhost:35000`. Its main listener uses TLS and serves gRPC over HTTP/2. A
Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ classifiers = [
"Programming Language :: Python :: 3.14",
"Typing :: Typed",
]
dependencies = []
dependencies = [
# Temporary release asset until PyPI trusted publishing is configured.
"cratis-chronicle-contracts @ https://github.com/Cratis/Chronicle/releases/download/v16.38.2/cratis_chronicle_contracts-16.38.2-py3-none-any.whl#sha256=357052da8a62653dcfa40c8051c4af2c6a6d29295cb6783f59dd5efdf4bdc3f9",
]

[project.optional-dependencies]
dev = [
Expand All @@ -43,6 +46,9 @@ Documentation = "https://github.com/Cratis/Chronicle.Python/tree/main/Documentat
Repository = "https://github.com/Cratis/Chronicle.Python.git"
Issues = "https://github.com/Cratis/Chronicle.Python/issues"

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.version]
source = "vcs"

Expand Down
17 changes: 17 additions & 0 deletions tests/test_contract_dependency.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) Cratis. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.

from cratis_chronicle_contracts.events_pb2 import EventType
from cratis_chronicle_contracts.events_pb2_grpc import EventTypesStub
from cratis_chronicle_contracts.protobuf_net.bcl_pb2 import Guid


def test_generated_contract_dependency_is_available() -> None:
event_type = EventType(Id="example", Generation=1)
guid = Guid(lo=1, hi=2)

assert event_type.Id == "example"
assert event_type.Generation == 1
assert guid.lo == 1
assert guid.hi == 2
assert EventTypesStub is not None
Loading