From 8be422ef21ae29d2ae8378d7d2c6ccdf6e1dd034 Mon Sep 17 00:00:00 2001 From: mhh Date: Wed, 4 Oct 2023 14:27:43 +0200 Subject: [PATCH] rename Aleph to aleph.im --- src/aleph/sdk/base.py | 6 +++--- src/aleph/sdk/chains/common.py | 4 ++-- src/aleph/sdk/chains/nuls2.py | 2 +- src/aleph/sdk/client.py | 8 ++++---- src/aleph/sdk/exceptions.py | 4 ++-- src/aleph/sdk/models.py | 4 ++-- src/aleph/sdk/vm/__init__.py | 2 +- src/aleph/sdk/vm/app.py | 4 ++-- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/aleph/sdk/base.py b/src/aleph/sdk/base.py index db9d4a02..27088d69 100644 --- a/src/aleph/sdk/base.py +++ b/src/aleph/sdk/base.py @@ -318,7 +318,7 @@ async def create_post( sync: bool = False, ) -> Tuple[AlephMessage, MessageStatus]: """ - Create a POST message on the Aleph network. It is associated with a channel and owned by an account. + Create a POST message on the aleph.im network. It is associated with a channel and owned by an account. :param post_content: The content of the message :param post_type: An arbitrary content type that helps to describe the post_content @@ -368,7 +368,7 @@ async def create_store( sync: bool = False, ) -> Tuple[AlephMessage, MessageStatus]: """ - Create a STORE message to store a file on the Aleph network. + Create a STORE message to store a file on the aleph.im network. Can be passed either a file path, an IPFS hash or the file's content as raw bytes. @@ -422,7 +422,7 @@ async def create_program( :param persistent: Whether the program should be persistent or not (Default: False) :param encoding: Encoding to use (Default: Encoding.zip) :param volumes: Volumes to mount - :param subscriptions: Patterns of Aleph messages to forward to the program's event receiver + :param subscriptions: Patterns of aleph.im messages to forward to the program's event receiver :param metadata: Metadata to attach to the message """ pass diff --git a/src/aleph/sdk/chains/common.py b/src/aleph/sdk/chains/common.py index e811ce3f..9f6b45f4 100644 --- a/src/aleph/sdk/chains/common.py +++ b/src/aleph/sdk/chains/common.py @@ -14,7 +14,7 @@ def get_verification_buffer(message: Dict) -> bytes: """ - Returns the verification buffer that Aleph nodes use to verify the signature of a message. + Returns the verification buffer that aleph.im nodes use to verify the signature of a message. Note: The verification buffer is a string of the following format: b"{chain}\\n{sender}\\n{type}\\n{item_hash}" @@ -64,7 +64,7 @@ def _setup_sender(self, message: Dict) -> Dict: async def sign_message(self, message: Dict) -> Dict: """ - Returns a signed message from an Aleph message. + Returns a signed message from an aleph.im message. Args: message: Message to sign Returns: diff --git a/src/aleph/sdk/chains/nuls2.py b/src/aleph/sdk/chains/nuls2.py index 4ad65f19..ac71fab3 100644 --- a/src/aleph/sdk/chains/nuls2.py +++ b/src/aleph/sdk/chains/nuls2.py @@ -39,7 +39,7 @@ def __init__(self, private_key=None, chain_id=1, prefix=None): async def sign_message(self, message: Dict) -> Dict: """ - Returns a signed message from an Aleph message. + Returns a signed message from an aleph.im message. Args: message: Message to sign Returns: diff --git a/src/aleph/sdk/client.py b/src/aleph/sdk/client.py index 19a7ebd0..6ffaa8d5 100644 --- a/src/aleph/sdk/client.py +++ b/src/aleph/sdk/client.py @@ -1059,7 +1059,7 @@ async def _handle_broadcast_deprecated_response( async def _broadcast_deprecated(self, message_dict: Mapping[str, Any]) -> None: """ - Broadcast a message on the Aleph network using the deprecated + Broadcast a message on the aleph.im network using the deprecated /ipfs/pubsub/pub/ endpoint. """ @@ -1097,7 +1097,7 @@ async def _broadcast( sync: bool, ) -> MessageStatus: """ - Broadcast a message on the Aleph network. + Broadcast a message on the aleph.im network. Uses the POST /messages/ endpoint or the deprecated /ipfs/pubsub/pub/ endpoint if the first method is not available. @@ -1273,7 +1273,7 @@ async def create_program( # Register the different ways to trigger a VM if subscriptions: - # Trigger on HTTP calls and on Aleph message subscriptions. + # Trigger on HTTP calls and on aleph.im message subscriptions. triggers = { "http": True, "persistent": persistent, @@ -1309,7 +1309,7 @@ async def create_program( "runtime": { "ref": runtime, "use_latest": True, - "comment": "Official Aleph runtime" + "comment": "Official aleph.im runtime" if runtime == settings.DEFAULT_RUNTIME_ID else "", }, diff --git a/src/aleph/sdk/exceptions.py b/src/aleph/sdk/exceptions.py index 51762925..5f09e1bc 100644 --- a/src/aleph/sdk/exceptions.py +++ b/src/aleph/sdk/exceptions.py @@ -21,7 +21,7 @@ class MultipleMessagesError(QueryError): class BroadcastError(Exception): """ - Data could not be broadcast to the Aleph network. + Data could not be broadcast to the aleph.im network. """ pass @@ -29,7 +29,7 @@ class BroadcastError(Exception): class InvalidMessageError(BroadcastError): """ - The message could not be broadcast because it does not follow the Aleph + The message could not be broadcast because it does not follow the aleph.im message specification. """ diff --git a/src/aleph/sdk/models.py b/src/aleph/sdk/models.py index da1ee6b3..3e9cbc48 100644 --- a/src/aleph/sdk/models.py +++ b/src/aleph/sdk/models.py @@ -12,7 +12,7 @@ class PaginationResponse(BaseModel): class MessagesResponse(PaginationResponse): - """Response from an Aleph node API on the path /api/v0/messages.json""" + """Response from an aleph.im node API on the path /api/v0/messages.json""" messages: List[AlephMessage] pagination_item = "messages" @@ -44,7 +44,7 @@ class Post(BaseModel): class PostsResponse(PaginationResponse): - """Response from an Aleph node API on the path /api/v0/posts.json""" + """Response from an aleph.im node API on the path /api/v0/posts.json""" posts: List[Post] pagination_item = "posts" diff --git a/src/aleph/sdk/vm/__init__.py b/src/aleph/sdk/vm/__init__.py index 0ef32db3..2903335c 100644 --- a/src/aleph/sdk/vm/__init__.py +++ b/src/aleph/sdk/vm/__init__.py @@ -1,3 +1,3 @@ """ -Aleph helpers for apps running inside Aleph Virtual Machines. +Aleph.im helpers for apps running inside aleph.im Virtual Machines. """ diff --git a/src/aleph/sdk/vm/app.py b/src/aleph/sdk/vm/app.py index 0ca53807..177de02e 100644 --- a/src/aleph/sdk/vm/app.py +++ b/src/aleph/sdk/vm/app.py @@ -30,7 +30,7 @@ def matches(self, scope: Mapping[str, Any]) -> bool: class AlephApp: - """ASGI compatible wrapper for apps running inside Aleph Virtual Machines. + """ASGI compatible wrapper for apps running inside aleph.im Virtual Machines. The wrapper adds support to register functions to react to non-HTTP events. """ @@ -93,7 +93,7 @@ def __getattr__(self, name): def vm_hash(self) -> Optional[str]: """ Returns the hash of the VM that is running this app. If the VM is not - running in Aleph, this will return None. + running in aleph.im, this will return None. """ # Get hostname from environment hostname = socket.gethostname()