Skip to content

Commit c733bfa

Browse files
authored
Merge pull request #12 from radical-cybertools/feature/docs_polish
Fix docs and refine
2 parents c4c9c9c + eabb4a8 commit c733bfa

8 files changed

Lines changed: 38 additions & 8 deletions

File tree

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy Documentation
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, master, feature/docs_polish ]
66
workflow_dispatch:
77

88
permissions:

docs/LICENSE.md

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

docs/getting-started/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Welcome to RHAPSODY! This section will guide you from installation to running yo
1414

1515
## Next Steps
1616

17-
Once you've mastered the basics, you can explore the full **[API Reference](../api/)** for detailed module and class documentation.
17+
Once you've mastered the basics, you can explore the full **[API Reference](../api/index.md)** for detailed module and class documentation.

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ docs = [
6666
"mkdocs>=1.5.0",
6767
"mkdocs-material>=9.0.0",
6868
"mkdocstrings[python]>=0.24.0",
69+
"mkdocs-gen-files>=0.5.0",
70+
"mkdocs-literate-nav>=0.6.0",
71+
"mkdocs-section-index>=0.3.0",
6972
]
7073
ci = [
7174
"tox>=4.0.0",

src/rhapsody/api/task.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import threading
2222
from abc import ABC
2323
from abc import abstractmethod
24+
from collections.abc import Generator
2425
from typing import Any
2526
from typing import Callable
2627

@@ -225,13 +226,13 @@ def bind_future(self, future: asyncio.Future) -> None:
225226
"""
226227
self._future = future
227228

228-
def __await__(self):
229+
def __await__(self) -> Generator[Any, None, Any]:
229230
"""Allow the task object to be awaited directly.
230231
231232
Delegates to the internal future.
232233
233234
Returns:
234-
An iterator for the task completion.
235+
Generator[Any, None, Any]: An iterator for the task completion.
235236
236237
Raises:
237238
RuntimeError: If future is not bound (task not submitted).

src/rhapsody/backends/execution/concurrent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ async def __aexit__(self, exc_type, exc_val, exc_tb):
291291
await self.shutdown()
292292

293293
@classmethod
294-
async def create(cls, executor: Executor):
294+
async def create(cls, executor: Executor) -> "ConcurrentExecutionBackend":
295295
"""Alternative factory method for creating initialized backend.
296296
297297
Args:

src/rhapsody/backends/execution/radical_pilot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import os
1313
import threading
1414
from collections.abc import Generator
15+
from typing import Any
1516
from typing import Callable
1617

1718
import typeguard
@@ -40,7 +41,7 @@ def _get_logger() -> logging.Logger:
4041
return logging.getLogger(__name__)
4142

4243

43-
def service_ready_callback(future: asyncio.Future, task, state) -> None:
44+
def service_ready_callback(future: asyncio.Future, task: Any, state: str) -> None:
4445
"""Callback for handling service task readiness.
4546
4647
Runs wait_info() in a daemon thread to avoid blocking execution flow.
@@ -638,7 +639,7 @@ def link_implicit_data_deps(self, src_task: dict, dst_task: dict) -> None:
638639
Args:
639640
src_task (Dict): Source task dictionary containing 'uid' key.
640641
dst_task (Dict): Destination task dictionary with
641-
'task_backend_specific_kwargs' for pre_exec commands.
642+
'task_backend_specific_kwargs' for pre_exec commands.
642643
643644
Note:
644645
- Links all files from source sandbox except the task UID file itself

src/rhapsody/logger.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@
2121

2222
import logging
2323
import sys
24+
from typing import Any
2425
from typing import Optional
2526

2627

2728
def enable_logging(
2829
level: int = logging.INFO,
2930
format_string: Optional[str] = "%(asctime)s | %(levelname)-8s | [%(name)s] | %(message)s",
30-
stream=None,
31+
stream: Optional[Any] = None,
3132
force: bool = True,
3233
) -> None:
3334
"""Enable logging for RHAPSODY.

0 commit comments

Comments
 (0)