Skip to content

Commit 2e00c17

Browse files
fix Documentation builds
1 parent a89b4d8 commit 2e00c17

7 files changed

Lines changed: 90 additions & 9 deletions

File tree

archipy/adapters/keycloak/adapters.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,7 @@ def check_permissions(self, token: str, resource: str, scope: str) -> bool:
13691369
return False
13701370

13711371
@override
1372-
def create_realm(self, realm_name: str, skip_exists: bool = True, **kwargs) -> dict[str, Any] | None:
1372+
def create_realm(self, realm_name: str, skip_exists: bool = True, **kwargs: Any) -> dict[str, Any] | None:
13731373
"""Create a Keycloak realm with minimum required fields and optional additional config.
13741374
13751375
Args:
@@ -1433,7 +1433,7 @@ def create_client(
14331433
client_id: str,
14341434
realm: str | None = None,
14351435
skip_exists: bool = True,
1436-
**kwargs,
1436+
**kwargs: Any,
14371437
) -> dict[str, Any] | None:
14381438
"""Create a Keycloak client with minimum required fields and optional additional config.
14391439
@@ -2650,7 +2650,7 @@ async def check_permissions(self, token: str, resource: str, scope: str) -> bool
26502650
return False
26512651

26522652
@override
2653-
async def create_realm(self, realm_name: str, skip_exists: bool = True, **kwargs) -> dict[str, Any] | None:
2653+
async def create_realm(self, realm_name: str, skip_exists: bool = True, **kwargs: Any) -> dict[str, Any] | None:
26542654
"""Create a Keycloak realm with minimum required fields and optional additional config.
26552655
26562656
Args:
@@ -2720,7 +2720,7 @@ async def create_client(
27202720
client_id: str,
27212721
realm: str | None = None,
27222722
skip_exists: bool = True,
2723-
**kwargs,
2723+
**kwargs: Any,
27242724
) -> dict[str, Any] | None:
27252725
"""Create a Keycloak client with minimum required fields and optional additional config.
27262726

archipy/helpers/decorators/retry.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def retry_decorator(
2626
ignore (Optional[Tuple[Type[Exception], ...]]): A tuple of errors to ignore (not retry on).
2727
If None, no errors are ignored. Defaults to None.
2828
resource_type (Optional[str]): The type of resource being exhausted. Defaults to None.
29-
lang (str): The language for the error message (default: "fa").
3029
3130
Returns:
3231
Callable: The decorated function with retry logic.

archipy/helpers/utils/password_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ def validate_password(
7272
Args:
7373
password (str): The password to validate.
7474
auth_config (AuthConfig | None): Optional auth configuration override. If not provided, uses the global config.
75-
lang (LanguageType): The language to use for error messages. Defaults to Persian.
7675
7776
Raises:
7877
InvalidPasswordError: If the password does not meet the policy requirements.

archipy/models/types/base_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class BaseType(Enum):
77
This class extends the `Enum` class to allow custom values for enum members.
88
"""
99

10-
def __new__(cls, *args: object, **_: object) -> "BaseType":
10+
def __new__(cls: type["BaseType"], *args: object, **_: object) -> "BaseType":
1111
"""Create a new instance of the enum member.
1212
1313
Args:

docs/api_reference/adapters.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,3 +325,85 @@ For detailed examples and usage guidelines, see the [Parsian Payment Gateway Exa
325325
options:
326326
show_root_heading: true
327327
show_source: true
328+
329+
### Temporal {#temporal}
330+
331+
Temporal workflow orchestration adapter for durable workflow execution and activity coordination.
332+
333+
```python
334+
from archipy.adapters.temporal.adapters import TemporalAdapter
335+
from archipy.adapters.temporal.worker import TemporalWorkerManager
336+
from archipy.adapters.temporal.base import BaseWorkflow, BaseActivity
337+
338+
# Create a Temporal adapter
339+
temporal_adapter = TemporalAdapter() # Uses global config by default
340+
341+
# Start a workflow execution
342+
workflow_handle = await temporal_adapter.start_workflow(
343+
workflow="MyWorkflow",
344+
arg={"input": "data"},
345+
workflow_id="unique-workflow-id",
346+
task_queue="my-task-queue"
347+
)
348+
349+
# Execute a workflow and wait for completion
350+
result = await temporal_adapter.execute_workflow(
351+
workflow="MyWorkflow",
352+
arg={"input": "data"},
353+
workflow_id="unique-workflow-id-2",
354+
task_queue="my-task-queue"
355+
)
356+
357+
# Signal a workflow
358+
await temporal_adapter.signal_workflow(
359+
workflow_id="unique-workflow-id",
360+
signal_name="update_signal",
361+
arg={"update": "data"}
362+
)
363+
364+
# Query a workflow
365+
query_result = await temporal_adapter.query_workflow(
366+
workflow_id="unique-workflow-id",
367+
query_name="get_status"
368+
)
369+
370+
# Worker management
371+
worker_manager = TemporalWorkerManager()
372+
373+
# Start a worker
374+
worker_handle = await worker_manager.start_worker(
375+
task_queue="my-task-queue",
376+
workflows=[MyWorkflow],
377+
activities=[my_activity_instance]
378+
)
379+
```
380+
381+
For detailed examples and usage guidelines, see the [Temporal Examples](../examples/adapters/temporal.md).
382+
383+
#### Temporal Adapter
384+
385+
::: archipy.adapters.temporal.adapters
386+
options:
387+
show_root_heading: true
388+
show_source: true
389+
390+
#### Temporal Ports
391+
392+
::: archipy.adapters.temporal.ports
393+
options:
394+
show_root_heading: true
395+
show_source: true
396+
397+
#### Temporal Worker Manager
398+
399+
::: archipy.adapters.temporal.worker
400+
options:
401+
show_root_heading: true
402+
show_source: true
403+
404+
#### Temporal Base Classes
405+
406+
::: archipy.adapters.temporal.base
407+
options:
408+
show_root_heading: true
409+
show_source: true

docs/api_reference/configs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class AppConfig(BaseConfig):
2727

2828
## Core Classes
2929

30-
### BaseConfig
30+
### BaseConfig {#base-config}
3131

3232
The main configuration class that provides environment variable support, type validation, and global configuration access.
3333

@@ -37,7 +37,7 @@ The main configuration class that provides environment variable support, type va
3737
- Global configuration access
3838
- Nested configuration support
3939

40-
### SQLAlchemyConfig
40+
### SQLAlchemyConfig {#config-templates}
4141

4242
Database configuration template with connection settings, pool configuration, and debug options.
4343

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ nav:
121121
- Keycloak: examples/adapters/keycloak.md
122122
- MinIO: examples/adapters/minio.md
123123
- Kafka: examples/adapters/kafka.md
124+
- Temporal: examples/adapters/temporal.md
124125
- Payment Gateways: examples/adapters/parsian_payment.md
125126
- Helpers:
126127
- Overview: examples/helpers/index.md

0 commit comments

Comments
 (0)