From ca33c2e6a59aa8263d9bfded06d8947854c44c6c Mon Sep 17 00:00:00 2001 From: ff137 Date: Wed, 17 Apr 2024 13:41:58 +0200 Subject: [PATCH 1/4] :art: fix typos Signed-off-by: ff137 --- README.md | 2 +- aries_cloudagent/admin/server.py | 6 +++--- .../anoncreds/models/anoncreds_revocation.py | 2 +- aries_cloudagent/config/argparse.py | 8 ++++---- aries_cloudagent/indy/models/pres_preview.py | 2 +- aries_cloudagent/ledger/routes.py | 2 +- .../messaging/credential_definitions/routes.py | 2 +- aries_cloudagent/messaging/schemas/routes.py | 2 +- aries_cloudagent/multitenant/admin/routes.py | 14 +++++++------- aries_cloudagent/multitenant/tests/test_base.py | 8 ++++---- .../protocols/connections/v1_0/routes.py | 2 +- .../protocols/coordinate_mediation/v1_0/routes.py | 4 ++-- .../protocols/did_rotate/v1_0/manager.py | 2 +- .../protocols/did_rotate/v1_0/routes.py | 6 +++--- .../protocols/didexchange/v1_0/routes.py | 2 +- .../protocols/endorse_transaction/v1_0/manager.py | 6 +++--- .../v1_0/models/transaction_record.py | 4 ++-- .../endorse_transaction/v1_0/tests/test_manager.py | 8 ++++---- .../protocols/out_of_band/v1_0/manager.py | 10 +++++----- .../out_of_band/v1_0/tests/test_manager.py | 4 ++-- .../protocols/present_proof/v2_0/routes.py | 2 +- aries_cloudagent/revocation/routes.py | 8 ++++---- aries_cloudagent/vc/vc_ld/manager.py | 2 +- aries_cloudagent/wallet/routes.py | 8 ++++---- demo/runners/agent_container.py | 4 ++-- docs/UpdateRTD.md | 2 +- docs/demo/AliceGetsAPhone.md | 4 ++-- docs/demo/Endorser.md | 4 ++-- docs/demo/README.md | 12 ++++++------ docs/features/AdminAPI.md | 2 +- docs/features/UsingOpenAPI.md | 2 +- docs/gettingStarted/CredentialRevocation.md | 2 +- docs/testing/INTEGRATION-TESTS.md | 6 +++--- docs/testing/Logging.md | 2 +- docs/testing/UnitTests.md | 2 +- scripts/generate-open-api-spec | 2 +- 36 files changed, 80 insertions(+), 80 deletions(-) diff --git a/README.md b/README.md index bba261ed60..ee231d25f9 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ ACA-Py supports "multi-tenant" scenarios. In these scenarios, one (scalable) ins ### Mediator Service -Startup options allow the use of an ACA-Py as an Aries [mediator](https://github.com/hyperledger/aries-rfcs/tree/main/concepts/0046-mediators-and-relays#summary) using core Aries protocols to coordinate its mediation role. Such an ACA-Py instance receives, stores and forwards messages to Aries agents that (for example) lack an addressable endpoint on the Internet such as a mobile wallet. A live instance of a public mediator based on ACA-Py is available [here](https://indicio-tech.github.io/mediator/) from Indicio Technologies. Learn more about deploying a mediator [here](docs/features/Mediation.md). See the [Aries Mediator Service](https://github.com/hyperledger/aries-mediator-service) for a "best practices" configuration of an Aries mediator. +Startup options allow the use of an ACA-Py as an Aries [mediator](https://github.com/hyperledger/aries-rfcs/tree/main/concepts/0046-mediators-and-relays#summary) using core Aries protocols to coordinate its mediation role. Such an ACA-Py instance receives, stores and forwards messages to Aries agents that (for example) lack an addressable endpoint on the Internet such as a mobile wallet. A live instance of a public mediator based on ACA-Py is available [here](https://indicio-tech.github.io/mediator/) from Indicio Technologies. Learn more about deploying a mediator [here](docs/features/Mediation.md). See the [Aries Mediator Service](https://github.com/hyperledger/aries-mediator-service) for a "best practices" configuration of an Aries mediator. ### Indy Transaction Endorsing diff --git a/aries_cloudagent/admin/server.py b/aries_cloudagent/admin/server.py index 946cb0baf2..c5fb4dc516 100644 --- a/aries_cloudagent/admin/server.py +++ b/aries_cloudagent/admin/server.py @@ -276,7 +276,7 @@ def __init__( @property def additional_routes_pattern(self) -> Optional[Pattern]: - """Pattern for configured addtional routes to permit base wallet to access.""" + """Pattern for configured additional routes to permit base wallet to access.""" if self._additional_route_pattern: return self._additional_route_pattern @@ -607,7 +607,7 @@ async def on_startup(self, app: web.Application): "type": "apiKey", "in": "header", "name": "Authorization", - "description": "Bearer token. Be sure to preprend token with 'Bearer '", + "description": "Bearer token. Be sure to prepend token with 'Bearer '", } # If multitenancy is enabled we need Authorization header @@ -831,7 +831,7 @@ async def websocket_handler(self, request): msg_received = None msg_api_key = None try: - # this call can re-raise exeptions from inside the task + # this call can re-raise exceptions from inside the task msg_received = receive.result() msg_api_key = msg_received.get("x-api-key") except Exception: diff --git a/aries_cloudagent/anoncreds/models/anoncreds_revocation.py b/aries_cloudagent/anoncreds/models/anoncreds_revocation.py index 5fe66d8f0e..bdcf152f5c 100644 --- a/aries_cloudagent/anoncreds/models/anoncreds_revocation.py +++ b/aries_cloudagent/anoncreds/models/anoncreds_revocation.py @@ -416,7 +416,7 @@ class Meta: ) current_accumulator = fields.Str( metadata={ - "description": "The current accumalator value", + "description": "The current accumulator value", "example": "21 118...1FB", }, data_key="currentAccumulator", diff --git a/aries_cloudagent/config/argparse.py b/aries_cloudagent/config/argparse.py index 9b8f33316f..ed8b1fe948 100644 --- a/aries_cloudagent/config/argparse.py +++ b/aries_cloudagent/config/argparse.py @@ -587,7 +587,7 @@ def add_arguments(self, parser: ArgumentParser): help=( "Specifies the type of storage provider to use for the internal " "storage engine. This storage interface is used to store internal " - "state Supported internal storage types are 'basic' (memory) " + "state. Supported internal storage types are 'basic' (memory) " "and 'indy'. The default (if not specified) is 'indy' if the " "wallet type is set to 'indy', otherwise 'basic'." ), @@ -1834,9 +1834,9 @@ def add_arguments(self, parser: ArgumentParser): "Specify the role ('author' or 'endorser') which this agent will " "participate. Authors will request transaction endorement from an " "Endorser. Endorsers will endorse transactions from Authors, and " - "may write their own transactions to the ledger. If no role " + "may write their own transactions to the ledger. If no role " "(or 'none') is specified then the endorsement protocol will not " - " be used and this agent will write transactions to the ledger " + "be used and this agent will write transactions to the ledger " "directly." ), ) @@ -1867,7 +1867,7 @@ def add_arguments(self, parser: ArgumentParser): metavar="", env_var="ACAPY_ENDORSER_ENDORSE_WITH_DID", help=( - "For transaction Endorsers, specify the DID to use to endorse " + "For transaction Endorsers, specify the DID to use to endorse " "transactions. The default (if not specified) is to use the " "Endorser's Public DID." ), diff --git a/aries_cloudagent/indy/models/pres_preview.py b/aries_cloudagent/indy/models/pres_preview.py index 678ffebfa1..6e2cd073d0 100644 --- a/aries_cloudagent/indy/models/pres_preview.py +++ b/aries_cloudagent/indy/models/pres_preview.py @@ -46,7 +46,7 @@ def __init__( threshold: int, **kwargs, ): - """Initialize preview object. + """Initialize preview object. Args: name: attribute name diff --git a/aries_cloudagent/ledger/routes.py b/aries_cloudagent/ledger/routes.py index 1949f2c579..4d1f270afe 100644 --- a/aries_cloudagent/ledger/routes.py +++ b/aries_cloudagent/ledger/routes.py @@ -407,7 +407,7 @@ async def register_ledger_nym(request: web.BaseRequest): if endorser_write_txn else None ), - # TODO see if we need to parameterize these params + # TODO see if we need to parametrize these params # expires_time=expires_time, ) txn = transaction.serialize() diff --git a/aries_cloudagent/messaging/credential_definitions/routes.py b/aries_cloudagent/messaging/credential_definitions/routes.py index b2fcf0b3d4..f70bac14e5 100644 --- a/aries_cloudagent/messaging/credential_definitions/routes.py +++ b/aries_cloudagent/messaging/credential_definitions/routes.py @@ -356,7 +356,7 @@ async def credential_definitions_send_credential_definition(request: web.BaseReq try: transaction, transaction_request = await transaction_mgr.create_request( transaction=transaction, - # TODO see if we need to parameterize these params + # TODO see if we need to parametrize these params # expires_time=expires_time, ) except (StorageError, TransactionManagerError) as err: diff --git a/aries_cloudagent/messaging/schemas/routes.py b/aries_cloudagent/messaging/schemas/routes.py index 5ef8e0a0e8..5b8fa38147 100644 --- a/aries_cloudagent/messaging/schemas/routes.py +++ b/aries_cloudagent/messaging/schemas/routes.py @@ -318,7 +318,7 @@ async def schemas_send_schema(request: web.BaseRequest): try: transaction, transaction_request = await transaction_mgr.create_request( transaction=transaction, - # TODO see if we need to parameterize these params + # TODO see if we need to parametrize these params # expires_time=expires_time, ) except (StorageError, TransactionManagerError) as err: diff --git a/aries_cloudagent/multitenant/admin/routes.py b/aries_cloudagent/multitenant/admin/routes.py index b2f8210270..61d3174228 100644 --- a/aries_cloudagent/multitenant/admin/routes.py +++ b/aries_cloudagent/multitenant/admin/routes.py @@ -200,7 +200,7 @@ class CreateWalletRequestSchema(OpenAPISchema): label = fields.Str( metadata={ "description": ( - "Label for this wallet. This label is publicized (self-attested)" + "Label for this wallet. This label is publicized (self-attested)" " to other agents as part of forming a connection." ), "example": "Alice", @@ -210,7 +210,7 @@ class CreateWalletRequestSchema(OpenAPISchema): image_url = fields.Str( metadata={ "description": ( - "Image url for this wallet. This image url is publicized " + "Image url for this wallet. This image url is publicized" " (self-attested) to other agents as part of forming a connection." ), "example": "https://aries.ca/images/sample.png", @@ -276,7 +276,7 @@ class UpdateWalletRequestSchema(OpenAPISchema): label = fields.Str( metadata={ "description": ( - "Label for this wallet. This label is publicized (self-attested)" + "Label for this wallet. This label is publicized (self-attested)" " to other agents as part of forming a connection." ), "example": "Alice", @@ -285,7 +285,7 @@ class UpdateWalletRequestSchema(OpenAPISchema): image_url = fields.Str( metadata={ "description": ( - "Image url for this wallet. This image url is publicized " + "Image url for this wallet. This image url is publicized" " (self-attested) to other agents as part of forming a connection." ), "example": "https://aries.ca/images/sample.png", @@ -310,7 +310,7 @@ class RemoveWalletRequestSchema(OpenAPISchema): wallet_key = fields.Str( metadata={ "description": ( - "Master key used for key derivation. Only required for " + "Master key used for key derivation. Only required for" " unmanaged wallets." ), "example": "MySecretKey123", @@ -324,8 +324,8 @@ class CreateWalletTokenRequestSchema(OpenAPISchema): wallet_key = fields.Str( metadata={ "description": ( - "Master key used for key derivation. Only required for " - " unamanged wallets." + "Master key used for key derivation. Only required for" + " unmanaged wallets." ), "example": "MySecretKey123", } diff --git a/aries_cloudagent/multitenant/tests/test_base.py b/aries_cloudagent/multitenant/tests/test_base.py index 61a974cc17..7ae46e875f 100644 --- a/aries_cloudagent/multitenant/tests/test_base.py +++ b/aries_cloudagent/multitenant/tests/test_base.py @@ -62,12 +62,12 @@ async def test_get_default_mediator(self): with mock.patch.object( MediationManager, "get_default_mediator" ) as get_default_mediator: - mediaton_record = MediationRecord() + mediation_record = MediationRecord() # has default mediator - get_default_mediator.return_value = mediaton_record + get_default_mediator.return_value = mediation_record default_mediator = await self.manager.get_default_mediator() - assert default_mediator is mediaton_record + assert default_mediator is mediation_record # Doesn't have default mediator get_default_mediator.return_value = None @@ -653,7 +653,7 @@ async def test_get_wallets_by_message(self): recipient_keys = ["1", "2", "3", "4"] mock_wire_format = mock.MagicMock( - get_recipient_keys=lambda mesage_body: recipient_keys + get_recipient_keys=lambda message_body: recipient_keys ) return_wallets = [ diff --git a/aries_cloudagent/protocols/connections/v1_0/routes.py b/aries_cloudagent/protocols/connections/v1_0/routes.py index eaf62e7051..5d3a0c6e66 100644 --- a/aries_cloudagent/protocols/connections/v1_0/routes.py +++ b/aries_cloudagent/protocols/connections/v1_0/routes.py @@ -293,7 +293,7 @@ class ConnectionsListQueryStringSchema(OpenAPISchema): invitation_msg_id = fields.Str( required=False, metadata={ - "description": "Identifier of the associated Invitation Mesage", + "description": "Identifier of the associated Invitation Message", "example": UUID4_EXAMPLE, }, ) diff --git a/aries_cloudagent/protocols/coordinate_mediation/v1_0/routes.py b/aries_cloudagent/protocols/coordinate_mediation/v1_0/routes.py index 09fa4daa12..2eca0044c0 100644 --- a/aries_cloudagent/protocols/coordinate_mediation/v1_0/routes.py +++ b/aries_cloudagent/protocols/coordinate_mediation/v1_0/routes.py @@ -106,8 +106,8 @@ class GetKeylistQuerySchema(OpenAPISchema): required=False, metadata={ "description": ( - f"Filer on role, '{MediationRecord.ROLE_CLIENT}' for keys mediated" - f" by other agents, '{MediationRecord.ROLE_SERVER}' for keys " + f"Filer on role, '{MediationRecord.ROLE_CLIENT}' for keys mediated" + f" by other agents, '{MediationRecord.ROLE_SERVER}' for keys" " mediated by this agent" ) }, diff --git a/aries_cloudagent/protocols/did_rotate/v1_0/manager.py b/aries_cloudagent/protocols/did_rotate/v1_0/manager.py index c03509f389..6e7ab54b79 100644 --- a/aries_cloudagent/protocols/did_rotate/v1_0/manager.py +++ b/aries_cloudagent/protocols/did_rotate/v1_0/manager.py @@ -59,7 +59,7 @@ class DIDRotateManager: DID Rotation is a pre-rotate operation. We send notification of rotation to the observing party before we rotate the DID. This allows the observing party to update their DID for the rotating party and notify the rotating - party of any issues with the recieved DID. + party of any issues with the received DID. DID Rotation has two roles: the rotating party and the observing party. diff --git a/aries_cloudagent/protocols/did_rotate/v1_0/routes.py b/aries_cloudagent/protocols/did_rotate/v1_0/routes.py index 5819b6a108..be72612b7f 100644 --- a/aries_cloudagent/protocols/did_rotate/v1_0/routes.py +++ b/aries_cloudagent/protocols/did_rotate/v1_0/routes.py @@ -14,7 +14,7 @@ from .manager import DIDRotateManager from .message_types import SPEC_URI from .messages.hangup import HangupSchema as HangupMessageSchema -from .messages.rotate import RotateSchema as RotateMesageSchema +from .messages.rotate import RotateSchema as RotateMessageSchema LOGGER = logging.getLogger(__name__) @@ -44,7 +44,7 @@ class DIDRotateRequestJSONSchema(OpenAPISchema): @match_info_schema(DIDRotateConnIdMatchInfoSchema()) @json_schema(DIDRotateRequestJSONSchema()) @response_schema( - RotateMesageSchema(), 200, description="Rotate agent message for observer" + RotateMessageSchema(), 200, description="Rotate agent message for observer" ) async def rotate(request: web.BaseRequest): """Request to rotate a DID.""" @@ -115,7 +115,7 @@ def post_process_routes(app: web.Application): app._state["swagger_dict"]["tags"].append( { "name": "did-rotate", - "description": "Rorate a DID", + "description": "Rotate a DID", "externalDocs": {"description": "Specification", "url": SPEC_URI}, } ) diff --git a/aries_cloudagent/protocols/didexchange/v1_0/routes.py b/aries_cloudagent/protocols/didexchange/v1_0/routes.py index 075089366b..7826aacbd4 100644 --- a/aries_cloudagent/protocols/didexchange/v1_0/routes.py +++ b/aries_cloudagent/protocols/didexchange/v1_0/routes.py @@ -220,7 +220,7 @@ class DIDXConnIdRefIdMatchInfoSchema(OpenAPISchema): class DIDXRejectRequestSchema(OpenAPISchema): - """Parameters and validators for reject-request request string.""" + """Parameters and validators for reject-request request string.""" reason = fields.Str( metadata={ diff --git a/aries_cloudagent/protocols/endorse_transaction/v1_0/manager.py b/aries_cloudagent/protocols/endorse_transaction/v1_0/manager.py index b903ed6034..a96a2e8fe9 100644 --- a/aries_cloudagent/protocols/endorse_transaction/v1_0/manager.py +++ b/aries_cloudagent/protocols/endorse_transaction/v1_0/manager.py @@ -226,7 +226,7 @@ async def create_endorse_response( if transaction.state not in ( TransactionRecord.STATE_REQUEST_RECEIVED, - TransactionRecord.STATE_TRANSACTION_RESENT_RECEIEVED, + TransactionRecord.STATE_TRANSACTION_RESENT_RECEIVED, ): raise TransactionManagerError( f"Cannot endorse transaction for transaction record" @@ -565,7 +565,7 @@ async def create_refuse_response( if transaction.state not in ( TransactionRecord.STATE_REQUEST_RECEIVED, - TransactionRecord.STATE_TRANSACTION_RESENT_RECEIEVED, + TransactionRecord.STATE_TRANSACTION_RESENT_RECEIVED, ): raise TransactionManagerError( f"Cannot refuse transaction for transaction record" @@ -700,7 +700,7 @@ async def transaction_resend(self, transaction: TransactionRecord, state: str): await transaction.save(session, reason="Resends the transaction request") resend_transaction_response = TransactionResend( - state=TransactionRecord.STATE_TRANSACTION_RESENT_RECEIEVED, + state=TransactionRecord.STATE_TRANSACTION_RESENT_RECEIVED, thread_id=transaction._id, ) diff --git a/aries_cloudagent/protocols/endorse_transaction/v1_0/models/transaction_record.py b/aries_cloudagent/protocols/endorse_transaction/v1_0/models/transaction_record.py index b4f62144dc..e0d4dcd0ec 100644 --- a/aries_cloudagent/protocols/endorse_transaction/v1_0/models/transaction_record.py +++ b/aries_cloudagent/protocols/endorse_transaction/v1_0/models/transaction_record.py @@ -55,7 +55,7 @@ class Meta: STATE_TRANSACTION_ENDORSED = "transaction_endorsed" STATE_TRANSACTION_REFUSED = "transaction_refused" STATE_TRANSACTION_RESENT = "transaction_resent" - STATE_TRANSACTION_RESENT_RECEIEVED = "transaction_resent_received" + STATE_TRANSACTION_RESENT_RECEIVED = "transaction_resent_received" STATE_TRANSACTION_CANCELLED = "transaction_cancelled" STATE_TRANSACTION_ACKED = "transaction_acked" @@ -237,7 +237,7 @@ class Meta: required=False, metadata={ "description": ( - "The connection identifier for thie particular transaction record" + "The connection identifier for this particular transaction record" ), "example": UUID4_EXAMPLE, }, diff --git a/aries_cloudagent/protocols/endorse_transaction/v1_0/tests/test_manager.py b/aries_cloudagent/protocols/endorse_transaction/v1_0/tests/test_manager.py index 7ed097a921..f2cbb7aa2d 100644 --- a/aries_cloudagent/protocols/endorse_transaction/v1_0/tests/test_manager.py +++ b/aries_cloudagent/protocols/endorse_transaction/v1_0/tests/test_manager.py @@ -267,7 +267,7 @@ async def test_create_request_author_did(self): transaction_request.messages_attach == transaction_record.messages_attach[0] ) - async def test_recieve_request(self): + async def test_receive_request(self): mock_request = mock.MagicMock() mock_request.transaction_id = self.test_author_transaction_id mock_request.signature_request = { @@ -761,7 +761,7 @@ async def test_transaction_resend(self): assert resend_transaction_response.thread_id == self.test_author_transaction_id assert ( resend_transaction_response.state - == TransactionRecord.STATE_TRANSACTION_RESENT_RECEIEVED + == TransactionRecord.STATE_TRANSACTION_RESENT_RECEIVED ) async def test_receive_transaction_resend(self): @@ -779,7 +779,7 @@ async def test_receive_transaction_resend(self): ) mock_response = mock.MagicMock() - mock_response.state = TransactionRecord.STATE_TRANSACTION_RESENT_RECEIEVED + mock_response.state = TransactionRecord.STATE_TRANSACTION_RESENT_RECEIVED mock_response.thread_id = author_transaction_record._id with mock.patch.object(TransactionRecord, "save", autospec=True) as save_record: @@ -790,7 +790,7 @@ async def test_receive_transaction_resend(self): assert ( endorser_transaction_record.state - == TransactionRecord.STATE_TRANSACTION_RESENT_RECEIEVED + == TransactionRecord.STATE_TRANSACTION_RESENT_RECEIVED ) async def test_set_transaction_my_job(self): diff --git a/aries_cloudagent/protocols/out_of_band/v1_0/manager.py b/aries_cloudagent/protocols/out_of_band/v1_0/manager.py index b5e011dcab..37577c3999 100644 --- a/aries_cloudagent/protocols/out_of_band/v1_0/manager.py +++ b/aries_cloudagent/protocols/out_of_band/v1_0/manager.py @@ -730,7 +730,7 @@ async def receive_invitation( # Try to reuse the connection. If not accepted sets the conn_rec to None if conn_rec and not invitation.requests_attach: - oob_record = await self._handle_hanshake_reuse( + oob_record = await self._handle_handshake_reuse( oob_record, conn_rec, invitation._version ) @@ -890,7 +890,7 @@ async def _wait_for_reuse_response( """Wait for reuse response. Wait for reuse response message state. Either by receiving a reuse accepted or - problem report. If no answer is received withing the timeout, the state will be + problem report. If no answer is received within the timeout, the state will be set to reuse_not_accepted Args: @@ -924,7 +924,7 @@ async def _wait_for_state() -> OobRecord: ]: return oob_record - LOGGER.debug(f"Wait for oob {oob_id} to receive reuse accepted mesage") + LOGGER.debug(f"Wait for oob {oob_id} to receive reuse accepted message") event = await await_event LOGGER.debug("Received reuse response message") return OobRecord.deserialize(event.payload) @@ -982,7 +982,7 @@ async def _wait_for_state() -> ConnRecord: LOGGER.warning(f"Connection for connection_id {connection_id} not ready") return None - async def _handle_hanshake_reuse( + async def _handle_handshake_reuse( self, oob_record: OobRecord, conn_record: ConnRecord, version: str ) -> OobRecord: # Send handshake reuse @@ -1148,7 +1148,7 @@ async def _create_handshake_reuse_message( """Create and Send a Handshake Reuse message under RFC 0434. Args: - oob_record: OOB Record + oob_record: OOB Record conn_record: Connection record associated with the oob record Returns: diff --git a/aries_cloudagent/protocols/out_of_band/v1_0/tests/test_manager.py b/aries_cloudagent/protocols/out_of_band/v1_0/tests/test_manager.py index 3b8d33a51c..bc310c13ec 100644 --- a/aries_cloudagent/protocols/out_of_band/v1_0/tests/test_manager.py +++ b/aries_cloudagent/protocols/out_of_band/v1_0/tests/test_manager.py @@ -1464,7 +1464,7 @@ async def test_receive_invitation_handshake_reuse(self): with mock.patch.object( test_module.OutOfBandManager, - "_handle_hanshake_reuse", + "_handle_handshake_reuse", mock.CoroutineMock(), ) as handle_handshake_reuse, mock.patch.object( test_module.OutOfBandManager, @@ -1512,7 +1512,7 @@ async def test_receive_invitation_handshake_reuse_failed(self): with mock.patch.object( test_module.OutOfBandManager, - "_handle_hanshake_reuse", + "_handle_handshake_reuse", mock.CoroutineMock(), ) as handle_handshake_reuse, mock.patch.object( test_module.OutOfBandManager, diff --git a/aries_cloudagent/protocols/present_proof/v2_0/routes.py b/aries_cloudagent/protocols/present_proof/v2_0/routes.py index 6f75b5fd2a..22ec098c33 100644 --- a/aries_cloudagent/protocols/present_proof/v2_0/routes.py +++ b/aries_cloudagent/protocols/present_proof/v2_0/routes.py @@ -303,7 +303,7 @@ class V20PresSpecByFormatRequestSchema(AdminAPIMessageTracingSchema): metadata={ "description": ( "Optional Presentation specification for DIF, overrides the" - " PresentionExchange record's PresRequest" + " PresentationExchange record's PresRequest" ) }, ) diff --git a/aries_cloudagent/revocation/routes.py b/aries_cloudagent/revocation/routes.py index c1f72768b5..8da9b79d59 100644 --- a/aries_cloudagent/revocation/routes.py +++ b/aries_cloudagent/revocation/routes.py @@ -1316,7 +1316,7 @@ async def send_rev_reg_def(request: web.BaseRequest): transaction_request, ) = await transaction_mgr.create_request( transaction=transaction, - # TODO see if we need to parameterize these params + # TODO see if we need to parametrize these params # expires_time=expires_time, ) except (StorageError, TransactionManagerError) as err: @@ -1436,7 +1436,7 @@ async def send_rev_reg_entry(request: web.BaseRequest): transaction_request, ) = await transaction_mgr.create_request( transaction=transaction, - # TODO see if we need to parameterize these params + # TODO see if we need to parametrize these params # expires_time=expires_time, ) except (StorageError, TransactionManagerError) as err: @@ -1596,7 +1596,7 @@ async def generate(rr_record: IssuerRevRegRecord) -> dict: revo_transaction_request, ) = await transaction_manager.create_request( transaction=revo_transaction, - # TODO see if we need to parameterize these params + # TODO see if we need to parametrize these params # expires_time=expires_time, ) except (StorageError, TransactionManagerError) as err: @@ -1677,7 +1677,7 @@ async def on_revocation_entry_event(profile: Profile, event: Event): revo_transaction_request, ) = await transaction_manager.create_request( transaction=revo_transaction, - # TODO see if we need to parameterize these params + # TODO see if we need to parametrize these params # expires_time=expires_time, ) except (StorageError, TransactionManagerError) as err: diff --git a/aries_cloudagent/vc/vc_ld/manager.py b/aries_cloudagent/vc/vc_ld/manager.py index 5e670355f2..de3f578158 100644 --- a/aries_cloudagent/vc/vc_ld/manager.py +++ b/aries_cloudagent/vc/vc_ld/manager.py @@ -251,7 +251,7 @@ def _get_proof_purpose( else: raise VcLdpManagerError( f"Unsupported proof purpose: {proof_purpose}. " - f"Supported proof types are: {SUPPORTED_ISSUANCE_PROOF_PURPOSES}" + f"Supported proof types are: {SUPPORTED_ISSUANCE_PROOF_PURPOSES}" ) async def prepare_credential( diff --git a/aries_cloudagent/wallet/routes.py b/aries_cloudagent/wallet/routes.py index d3730254d4..5dc222c0c7 100644 --- a/aries_cloudagent/wallet/routes.py +++ b/aries_cloudagent/wallet/routes.py @@ -376,7 +376,7 @@ class DIDCreateSchema(OpenAPISchema): required=False, metadata={ "description": ( - "Optional seed to use for DID, Must beenabled in configuration before" + "Optional seed to use for DID, Must be enabled in configuration before" " use." ), "example": "000000000000000000000000Trustee1", @@ -775,7 +775,7 @@ async def wallet_set_public_did(request: web.BaseRequest): try: transaction, transaction_request = await transaction_mgr.create_request( transaction=transaction, - # TODO see if we need to parameterize these params + # TODO see if we need to parametrize these params # expires_time=expires_time, ) except (StorageError, TransactionManagerError) as err: @@ -1032,7 +1032,7 @@ async def wallet_set_did_endpoint(request: web.BaseRequest): try: transaction, transaction_request = await transaction_mgr.create_request( transaction=transaction, - # TODO see if we need to parameterize these params + # TODO see if we need to parametrize these params # expires_time=expires_time, ) except (StorageError, TransactionManagerError) as err: @@ -1289,7 +1289,7 @@ async def on_register_nym_event(profile: Profile, event: Event): try: transaction, transaction_request = await transaction_mgr.create_request( transaction=transaction, - # TODO see if we need to parameterize these params + # TODO see if we need to parametrize these params # expires_time=expires_time, ) except (StorageError, TransactionManagerError) as err: diff --git a/demo/runners/agent_container.py b/demo/runners/agent_container.py index 38ee4e739e..903a4769d9 100644 --- a/demo/runners/agent_container.py +++ b/demo/runners/agent_container.py @@ -1376,9 +1376,9 @@ def arg_parser(ident: str = None, port: int = 8020): "Specify the role ('author' or 'endorser') which this agent will " "participate. Authors will request transaction endorement from an " "Endorser. Endorsers will endorse transactions from Authors, and " - "may write their own transactions to the ledger. If no role " + "may write their own transactions to the ledger. If no role " "(or 'none') is specified then the endorsement protocol will not " - " be used and this agent will write transactions to the ledger " + "be used and this agent will write transactions to the ledger " "directly." ), ) diff --git a/docs/UpdateRTD.md b/docs/UpdateRTD.md index 22ad323e25..6b273af186 100644 --- a/docs/UpdateRTD.md +++ b/docs/UpdateRTD.md @@ -20,7 +20,7 @@ To rebuild the project and settings from scratch (you'll need to move the genera Note that the `find` command that is used to exclude any of the `test` python files from the RTD documentation. -Check the `git status` in your repo to see if the generator updates, adds or removes any existing RTD modules. +Check the `git status` in your repo to see if the generator updates, adds or removes any existing RTD modules. ### Reviewing the files locally diff --git a/docs/demo/AliceGetsAPhone.md b/docs/demo/AliceGetsAPhone.md index 28d31afb89..59fedb108a 100644 --- a/docs/demo/AliceGetsAPhone.md +++ b/docs/demo/AliceGetsAPhone.md @@ -66,7 +66,7 @@ You can download jq releases [here](https://github.com/stedolan/jq/releases) Note that this is _only required when running docker on your local machine_. When you run on PWD a public endpoint for your agent is exposed automatically. -Since the mobile agent will need some way to communicate with the agent running on your local machine in docker, we will need to create a publicly accesible url for some services on your machine. The easiest way to do this is with [ngrok](https://ngrok.com/). Once ngrok is installed, create a tunnel to your local machine: +Since the mobile agent will need some way to communicate with the agent running on your local machine in docker, we will need to create a publicly accessible url for some services on your machine. The easiest way to do this is with [ngrok](https://ngrok.com/). Once ngrok is installed, create a tunnel to your local machine: ```bash ngrok http 8020 @@ -240,7 +240,7 @@ Faber | Credential revocation ID: 1 Faber | Credential: state = done, cred_ex_id = ba3089d6-92da-4cb7-9062-7f24066b2a2a ``` -The revocation registry id and credential revocation id only appear if revocation is active. If you are doing revocation, you to need the `Revocation registry id` later, so we recommend that you copy it it now and paste it into a text file or someplace that you can access later. If you don't write it down, you can get the Id from the Admin API using the **`GET /revocation/active-registry/{cred_def_id}`** endpoint, and passing in the credential definition Id (which you can get from the **`GET /credential-definitions/created`** endpoint). +The revocation registry id and credential revocation id only appear if revocation is active. If you are doing revocation, you to need the `Revocation registry id` later, so we recommend that you copy it it now and paste it into a text file or some place that you can access later. If you don't write it down, you can get the Id from the Admin API using the **`GET /revocation/active-registry/{cred_def_id}`** endpoint, and passing in the credential definition Id (which you can get from the **`GET /credential-definitions/created`** endpoint). ### Accept the Credential diff --git a/docs/demo/Endorser.md b/docs/demo/Endorser.md index 2bf2543c3b..c29798180a 100644 --- a/docs/demo/Endorser.md +++ b/docs/demo/Endorser.md @@ -25,7 +25,7 @@ Start up Alice as normal: You can run all of Faber's functions as normal - if you watch the console you will see that all ledger operations go through the endorser workflow. -If you issue more than 5 credentials, you will see Faber creating a new revocation registry (encluding endorser operations). +If you issue more than 5 credentials, you will see Faber creating a new revocation registry (including endorser operations). ## Run Alice as an Author and Faber as an Endorser @@ -33,7 +33,7 @@ If you issue more than 5 credentials, you will see Faber creating a new revocati This approach sets up the endorser roles to allow manual testing using the agents' swagger pages: - Faber runs as an Endorser (all of Faber's functions - issue credential, request proof, etc.) run normally, since Faber has ledger write access -- Alice starts up with a DID aith Author privileges (no ledger write access) and Faber is setup as Alice's Endorser +- Alice starts up with a DID with Author privileges (no ledger write access) and Faber is setup as Alice's Endorser Start a VON Network and a Tails server using the instructions above. diff --git a/docs/demo/README.md b/docs/demo/README.md index 5aa0b86601..86184cd692 100644 --- a/docs/demo/README.md +++ b/docs/demo/README.md @@ -109,7 +109,7 @@ We strongly recommend you use Docker for the local Indy network until you really An Aries agent (or other client) connecting to an Indy ledger must know the contents of the `genesis` file for the ledger. The genesis file lets the agent/client know the IP addresses of the initial nodes of the ledger, and the agent/client sends ledger requests to those IP addresses. When using the `indy-sdk` ledger, look for the instructions in that repo for how to find/update the ledger genesis file, and note the path to that file on your local system. -The envrionment variable `GENESIS_FILE` is used to let the Aries demo agents know the location of the genesis file. Use the path to that file as value of the `GENESIS_FILE` environment variable in the instructions below. You might want to copy that file to be local to the demo so the path is shorter. +The environment variable `GENESIS_FILE` is used to let the Aries demo agents know the location of the genesis file. Use the path to that file as value of the `GENESIS_FILE` environment variable in the instructions below. You might want to copy that file to be local to the demo so the path is shorter. #### Run a local Postgres instance @@ -201,7 +201,7 @@ Note there is an option "2a" to initiate a connectionless proof - you can execut ## Additional Options in the Alice/Faber demo -You can enable support for various ACA-Py features by providing additional command-line arguements when starting up `alice` or `faber`. +You can enable support for various ACA-Py features by providing additional command-line arguments when starting up `alice` or `faber`. Note that when the controller starts up the agent, it prints out the ACA-Py startup command with *all* parameters - you can inspect this command to see what parameters are provided in each case. For more details on the parameters, just start ACA-Py with the `--help` parameter, for example: @@ -407,7 +407,7 @@ This works exactly as the *vanilla* multi-tenancy, except that all connections a The agents run on a pre-defined set of ports, however occasionally your local system may already be using one of these ports. (For example MacOS recently decided to use 8021 for the ftp proxy service.) -To overriide the default port settings: +To override the default port settings: ```bash AGENT_PORT_OVERRIDE=8010 ./run_demo faber @@ -415,7 +415,7 @@ AGENT_PORT_OVERRIDE=8010 ./run_demo faber (The agent requires up to 10 available ports.) -To pass extra arguements to the agent (for example): +To pass extra arguments to the agent (for example): ```bash DEMO_EXTRA_AGENT_ARGS="[\"--emit-did-peer-2\"]" ./run_demo faber --did-exchange --reuse-connections @@ -441,7 +441,7 @@ The controllers for this demo can be found in the [alice.py](https://github.com/ ## OpenAPI (Swagger) Demo -Developing an ACA-Py controller is much like developing a web app that uses a REST API. As you develop, you will want an easy way to test out the behaviour of the API. That's where the industry-standard OpenAPI (aka Swagger) UI comes in. ACA-Py (optionally) exposes an OpenAPI UI in ACA-Py that you can use to learn the ins and outs of the API. This [Aries OpenAPI demo](AriesOpenAPIDemo.md) shows how you can use the OpenAPI UI with an ACA-Py agent by walking through the connectiing, issuing a credential, and presenting a proof sequence. +Developing an ACA-Py controller is much like developing a web app that uses a REST API. As you develop, you will want an easy way to test out the behaviour of the API. That's where the industry-standard OpenAPI (aka Swagger) UI comes in. ACA-Py (optionally) exposes an OpenAPI UI in ACA-Py that you can use to learn the ins and outs of the API. This [Aries OpenAPI demo](AriesOpenAPIDemo.md) shows how you can use the OpenAPI UI with an ACA-Py agent by walking through the connecting, issuing a credential, and presenting a proof sequence. ## Performance Demo @@ -462,7 +462,7 @@ You can also run the demo against a postgres database using the following: ./run_demo performance --arg-file demo/postgres-indy-args.yml ``` -(Obvs you need to be running a postgres database - the command to start postgres is in the yml file provided above.) +(Obviously you need to be running a postgres database - the command to start postgres is in the yml file provided above.) You can tweak the number of credentials issued using the `--count` and `--batch` parameters, and you can run against an Askar database using the `--wallet-type askar` option (or run using indy-sdk using `--wallet-type indy`). diff --git a/docs/features/AdminAPI.md b/docs/features/AdminAPI.md index 464054a0a0..623dc34b0f 100644 --- a/docs/features/AdminAPI.md +++ b/docs/features/AdminAPI.md @@ -66,7 +66,7 @@ To open a WebSocket, connect to the `/ws` endpoint of the Admin API. * `content`: the contents of the agent message * `state`: `received` -### Forward Message Received (`/forward`) +### Forward Message Received (`/forward`) Enable using `--monitor-forward`. diff --git a/docs/features/UsingOpenAPI.md b/docs/features/UsingOpenAPI.md index c141e44ecb..8a826d3814 100644 --- a/docs/features/UsingOpenAPI.md +++ b/docs/features/UsingOpenAPI.md @@ -24,7 +24,7 @@ The [OpenAPI Tools](https://github.com/OpenAPITools/openapi-generator) was found If generating code for languages that do not support [named parameters](https://en.wikipedia.org/wiki/Named_parameter), it is recommended to specify the `useSingleRequestParameter` or equivalent in your code generator of choice. The reason is that, as mentioned previously, there have been instances where parameters were not sorted when output into the raw ACA-Py API spec file, and this approach helps remove that risk. -Another suggestion for code generation is to keep the `modelPropertyNaming` set to `original` when generating code. Although it is tempting to try and enable marshaling into standard naming formats such as `camelCase`, the reality is that the models represent what is sent on the wire and documented in the [Aries Protocol RFCS](https://github.com/hyperledger/aries-rfcs/tree/master/features). It has proven handy to be able to see code references correspond directly with protocol RFCs when debugging. It will also correspond directly with what the `model` shows when looking at the ACA-Py `Swagger UI` in a browser if you need to try something out manually before coding. One final point is that on occasions, it has been discovered that the code generation tools don't always get the marshaling correct in all circumstances when changing model name format. +Another suggestion for code generation is to keep the `modelPropertyNaming` set to `original` when generating code. Although it is tempting to try and enable marshalling into standard naming formats such as `camelCase`, the reality is that the models represent what is sent on the wire and documented in the [Aries Protocol RFCS](https://github.com/hyperledger/aries-rfcs/tree/master/features). It has proven handy to be able to see code references correspond directly with protocol RFCs when debugging. It will also correspond directly with what the `model` shows when looking at the ACA-Py `Swagger UI` in a browser if you need to try something out manually before coding. One final point is that on occasions, it has been discovered that the code generation tools don't always get the marshalling correct in all circumstances when changing model name format. ## Existing Language Wrappers for ACA-Py diff --git a/docs/gettingStarted/CredentialRevocation.md b/docs/gettingStarted/CredentialRevocation.md index b8a68668fc..17efb79e75 100644 --- a/docs/gettingStarted/CredentialRevocation.md +++ b/docs/gettingStarted/CredentialRevocation.md @@ -13,7 +13,7 @@ the minimum things necessary to the business rules around revocation, such as whose credentials should be revoked, and how close to real-time should revocations be published? -Here is a summary of all of the AnonCreds revocation activities performed +Here is a summary of all of the AnonCreds revocation activities performed by issuers. After this, we'll provide a (much shorter) list of what an ACA-Py issuer controller has to do. For those interested, there is a more [complete overview of AnonCreds revocation], including all of the roles, and some details diff --git a/docs/testing/INTEGRATION-TESTS.md b/docs/testing/INTEGRATION-TESTS.md index b304050d1c..89142f68d4 100644 --- a/docs/testing/INTEGRATION-TESTS.md +++ b/docs/testing/INTEGRATION-TESTS.md @@ -77,7 +77,7 @@ BDD_EXTRA_AGENT_ARGS="{\"wallet-type\":\"askar\"}" ./run_bdd -t @taa_required The agents run on a pre-defined set of ports, however occasionally your local system may already be using one of these ports. (For example MacOS recently decided to use 8021 for the ftp proxy service.) -To overriide the default port settings: +To override the default port settings: ```bash AGENT_PORT_OVERRIDE=8030 ./run_bdd -t @@ -149,14 +149,14 @@ ACAPY_ARG_FILE=askar-indy-args.yml ./run_bdd ... will run all the tests against an askar wallet (the new shared components, which replace indy-sdk). -Any aca-py arguement can be included in the yml file, and order-of-precidence applies (see [https://pypi.org/project/ConfigArgParse/](https://pypi.org/project/ConfigArgParse/)). +Any aca-py argument can be included in the yml file, and order-of-precedence applies (see [https://pypi.org/project/ConfigArgParse/](https://pypi.org/project/ConfigArgParse/)). ## Specifying Environment Parameters when Running Integration Tests Aca-py integration tests support the following environment-driven configuration: - `LEDGER_URL` - specify the ledger url -- `TAILS_NETWORK` - specify the docker network the tailer server is running on +- `TAILS_NETWORK` - specify the docker network the tails server is running on - `PUBLIC_TAILS_URL` - specify the public url of the tails server - `ACAPY_ARG_FILE` - specify global aca-py parameters (see above) diff --git a/docs/testing/Logging.md b/docs/testing/Logging.md index 587657c52e..bc9f7e7a54 100644 --- a/docs/testing/Logging.md +++ b/docs/testing/Logging.md @@ -60,7 +60,7 @@ Find an example in [default_logging_config.ini](https://github.com/hyperledger/a You can find more detail description in the [logging documentation](https://docs.python.org/3/howto/logging.html#configuring-logging). -For per tenant logging, find an example in [default_per_tenant_logging_config.ini](https://github.com/hyperledger/aries-cloudagent-python/tree/main/aries_cloudagent/config/default_per_tenant_logging_config.ini), which sets up `TimedRotatingFileMultiProcessHandler` and `StreamHandler` handlers. Custom `TimedRotatingFileMultiProcessHandler` handler supports the ability to cleanup logs by time and maintain backup logs and a custom JSON formatter for logs. The arguments for it such as `file name`, `when`, `interval` and `backupCount` can be passed as `args=('acapy.log', 'd', 7, 1,)` (also shown below). Note: `backupCount` of 0 will mean all backup log files will be retained and not deleted at all. More details about these attributes can be found [here](https://docs.python.org/3/library/logging.handlers.html#timedrotatingfilehandler) +For per tenant logging, find an example in [default_per_tenant_logging_config.ini](https://github.com/hyperledger/aries-cloudagent-python/tree/main/aries_cloudagent/config/default_per_tenant_logging_config.ini), which sets up `TimedRotatingFileMultiProcessHandler` and `StreamHandler` handlers. Custom `TimedRotatingFileMultiProcessHandler` handler supports the ability to cleanup logs by time and maintain backup logs and a custom JSON formatter for logs. The arguments for it such as `file name`, `when`, `interval` and `backupCount` can be passed as `args=('acapy.log', 'd', 7, 1,)` (also shown below). Note: `backupCount` of 0 will mean all backup log files will be retained and not deleted at all. More details about these attributes can be found [here](https://docs.python.org/3/library/logging.handlers.html#timedrotatingfilehandler) ```ini [loggers] diff --git a/docs/testing/UnitTests.md b/docs/testing/UnitTests.md index 50dc1f6edd..786517f132 100644 --- a/docs/testing/UnitTests.md +++ b/docs/testing/UnitTests.md @@ -8,7 +8,7 @@ developer @shaangill025. ## Running unit tests in ACA-Py - `./scripts/run_tests` -- `./scripts/run_tests aries_clouadagent/protocols/out_of_band/v1_0/tests` +- `./scripts/run_tests aries_cloudagent/protocols/out_of_band/v1_0/tests` - `./scripts/run_tests_indy` includes Indy specific tests ## Pytest diff --git a/scripts/generate-open-api-spec b/scripts/generate-open-api-spec index 902b9b0534..3b22f9e823 100755 --- a/scripts/generate-open-api-spec +++ b/scripts/generate-open-api-spec @@ -104,7 +104,7 @@ function buildACAPyDockerImage() { # needed to run without tty or interactive. # $1: The ACA-py docker image to use (i.e either from a repo or local) # $2: The port mapping from docker to local host in format "docker1:local1 docker2:local2" -# $3: The ACA-py command line arguements +# $3: The ACA-py command line arguments # $4: The name of a variable to return the continer ID to function runACAPy() { local acaPyImage="${1}" From 6707d7ee6030668de8c8c13402cfec6f54f049aa Mon Sep 17 00:00:00 2001 From: ff137 Date: Wed, 17 Apr 2024 14:38:33 +0200 Subject: [PATCH 2/4] :art: fix descriptions containing new lines and excess whitespace Signed-off-by: ff137 --- .../anoncreds/models/anoncreds_cred_def.py | 6 ++++-- aries_cloudagent/anoncreds/routes.py | 18 ++++++++++-------- aries_cloudagent/multitenant/admin/routes.py | 16 ++++++++-------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/aries_cloudagent/anoncreds/models/anoncreds_cred_def.py b/aries_cloudagent/anoncreds/models/anoncreds_cred_def.py index 02488a98c2..2315ade427 100644 --- a/aries_cloudagent/anoncreds/models/anoncreds_cred_def.py +++ b/aries_cloudagent/anoncreds/models/anoncreds_cred_def.py @@ -272,8 +272,10 @@ class Meta: type = fields.Str(validate=OneOf(["CL"])) tag = fields.Str( metadata={ - "description": """The tag value passed in by the Issuer to - an AnonCred's Credential Definition create and store implementation.""", + "description": ( + "The tag value passed in by the Issuer to " + "an AnonCred's Credential Definition create and store implementation." + ), "example": "default", } ) diff --git a/aries_cloudagent/anoncreds/routes.py b/aries_cloudagent/anoncreds/routes.py index 6cc3cec829..316cc208ba 100644 --- a/aries_cloudagent/anoncreds/routes.py +++ b/aries_cloudagent/anoncreds/routes.py @@ -56,14 +56,16 @@ SPEC_URI = "https://hyperledger.github.io/anoncreds-spec" -endorser_connection_id_description = """ - Connection identifier (optional) (this is an example) - You can set this is you know the endorsers connection id you want to use. - If not specified then the agent will attempt to find an endorser connection.""" -create_transaction_for_endorser_description = """ - Create transaction for endorser (optional, default false). - Use this for agents who don't specify an author role but want to - create a transaction for an endorser to sign.""" +endorser_connection_id_description = ( + "Connection identifier (optional) (this is an example). " + "You can set this if you know the endorser's connection id you want to use. " + "If not specified then the agent will attempt to find an endorser connection." +) +create_transaction_for_endorser_description = ( + "Create transaction for endorser (optional, default false). " + "Use this for agents who don't specify an author role but want to " + "create a transaction for an endorser to sign." +) class SchemaIdMatchInfo(OpenAPISchema): diff --git a/aries_cloudagent/multitenant/admin/routes.py b/aries_cloudagent/multitenant/admin/routes.py index 61d3174228..4948a7e518 100644 --- a/aries_cloudagent/multitenant/admin/routes.py +++ b/aries_cloudagent/multitenant/admin/routes.py @@ -177,10 +177,10 @@ class CreateWalletRequestSchema(OpenAPISchema): validate=validate.OneOf(["default", "both", "base"]), metadata={ "description": ( - "Webhook target dispatch type for this wallet. default -" - " Dispatch only to webhooks associated with this wallet. base -" - " Dispatch only to webhooks associated with the base wallet. " - " both - Dispatch to both webhook targets." + "Webhook target dispatch type for this wallet. " + "default: Dispatch only to webhooks associated with this wallet. " + "base: Dispatch only to webhooks associated with the base wallet. " + "both: Dispatch to both webhook targets." ), "example": "default", }, @@ -252,10 +252,10 @@ class UpdateWalletRequestSchema(OpenAPISchema): validate=validate.OneOf(["default", "both", "base"]), metadata={ "description": ( - "Webhook target dispatch type for this wallet. default -" - " Dispatch only to webhooks associated with this wallet. base -" - " Dispatch only to webhooks associated with the base wallet. " - " both - Dispatch to both webhook targets." + "Webhook target dispatch type for this wallet. " + "default: Dispatch only to webhooks associated with this wallet. " + "base: Dispatch only to webhooks associated with the base wallet. " + "both: Dispatch to both webhook targets." ), "example": "default", }, From d6cf031b0b08550e5c57eb50472368a9d245803e Mon Sep 17 00:00:00 2001 From: ff137 Date: Wed, 17 Apr 2024 14:39:05 +0200 Subject: [PATCH 3/4] Update openapi spec Signed-off-by: ff137 --- open-api/openapi.json | 54 +++++++++++++++++++++---------------------- open-api/swagger.json | 54 +++++++++++++++++++++---------------------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/open-api/openapi.json b/open-api/openapi.json index 7acba0d39f..9233cbf6c0 100644 --- a/open-api/openapi.json +++ b/open-api/openapi.json @@ -70,7 +70,7 @@ }, "name" : "did-exchange" }, { - "description" : "Rorate a DID", + "description" : "Rotate a DID", "externalDocs" : { "description" : "Specification", "url" : "https://github.com/hyperledger/aries-rfcs/tree/main/features/0794-did-rotate" @@ -1103,7 +1103,7 @@ "type" : "string" } }, { - "description" : "Identifier of the associated Invitation Mesage", + "description" : "Identifier of the associated Invitation Message", "in" : "query", "name" : "invitation_msg_id", "schema" : { @@ -3945,7 +3945,7 @@ "type" : "string" } }, { - "description" : "Filer on role, 'client' for keys mediated by other agents, 'server' for keys mediated by this agent", + "description" : "Filer on role, 'client' for keys mediated by other agents, 'server' for keys mediated by this agent", "in" : "query", "name" : "role", "schema" : { @@ -8067,7 +8067,7 @@ "type" : "object" }, "image_url" : { - "description" : "Image url for this wallet. This image url is publicized (self-attested) to other agents as part of forming a connection.", + "description" : "Image url for this wallet. This image url is publicized (self-attested) to other agents as part of forming a connection.", "example" : "https://aries.ca/images/sample.png", "type" : "string" }, @@ -8078,12 +8078,12 @@ "type" : "string" }, "label" : { - "description" : "Label for this wallet. This label is publicized (self-attested) to other agents as part of forming a connection.", + "description" : "Label for this wallet. This label is publicized (self-attested) to other agents as part of forming a connection.", "example" : "Alice", "type" : "string" }, "wallet_dispatch_type" : { - "description" : "Webhook target dispatch type for this wallet. default - Dispatch only to webhooks associated with this wallet. base - Dispatch only to webhooks associated with the base wallet. both - Dispatch to both webhook targets.", + "description" : "Webhook target dispatch type for this wallet. default: Dispatch only to webhooks associated with this wallet. base: Dispatch only to webhooks associated with the base wallet. both: Dispatch to both webhook targets.", "enum" : [ "default", "both", "base" ], "example" : "default", "type" : "string" @@ -8168,7 +8168,7 @@ "CreateWalletTokenRequest" : { "properties" : { "wallet_key" : { - "description" : "Master key used for key derivation. Only required for unamanged wallets.", + "description" : "Master key used for key derivation. Only required for unmanaged wallets.", "example" : "MySecretKey123", "type" : "string" } @@ -8220,7 +8220,7 @@ "type" : "string" }, "tag" : { - "description" : "The tag value passed in by the Issuer to\n an AnonCred's Credential Definition create and store implementation.", + "description" : "The tag value passed in by the Issuer to an AnonCred's Credential Definition create and store implementation.", "example" : "default", "type" : "string" }, @@ -8237,12 +8237,12 @@ "CredDefPostOptions" : { "properties" : { "create_transaction_for_endorser" : { - "description" : "\n Create transaction for endorser (optional, default false). \n Use this for agents who don't specify an author role but want to \n create a transaction for an endorser to sign.", + "description" : "Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign.", "example" : false, "type" : "boolean" }, "endorser_connection_id" : { - "description" : "\n Connection identifier (optional) (this is an example)\n You can set this is you know the endorsers connection id you want to use.\n If not specified then the agent will attempt to find an endorser connection.", + "description" : "Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection.", "example" : "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type" : "string" }, @@ -8913,7 +8913,7 @@ "type" : "object" }, "seed" : { - "description" : "Optional seed to use for DID, Must beenabled in configuration before use.", + "description" : "Optional seed to use for DID, Must be enabled in configuration before use.", "example" : "000000000000000000000000Trustee1", "type" : "string" } @@ -12163,12 +12163,12 @@ "PublishRevocationsOptions" : { "properties" : { "create_transaction_for_endorser" : { - "description" : "\n Create transaction for endorser (optional, default false). \n Use this for agents who don't specify an author role but want to \n create a transaction for an endorser to sign.", + "description" : "Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign.", "example" : false, "type" : "boolean" }, "endorser_connection_id" : { - "description" : "\n Connection identifier (optional) (this is an example)\n You can set this is you know the endorsers connection id you want to use.\n If not specified then the agent will attempt to find an endorser connection.", + "description" : "Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection.", "example" : "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type" : "string" } @@ -12361,7 +12361,7 @@ "RemoveWalletRequest" : { "properties" : { "wallet_key" : { - "description" : "Master key used for key derivation. Only required for unmanaged wallets.", + "description" : "Master key used for key derivation. Only required for unmanaged wallets.", "example" : "MySecretKey123", "type" : "string" } @@ -12387,7 +12387,7 @@ "RevList" : { "properties" : { "currentAccumulator" : { - "description" : "The current accumalator value", + "description" : "The current accumulator value", "example" : "21 118...1FB", "type" : "string" }, @@ -12434,12 +12434,12 @@ "RevListOptions" : { "properties" : { "create_transaction_for_endorser" : { - "description" : "\n Create transaction for endorser (optional, default false). \n Use this for agents who don't specify an author role but want to \n create a transaction for an endorser to sign.", + "description" : "Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign.", "example" : false, "type" : "boolean" }, "endorser_connection_id" : { - "description" : "\n Connection identifier (optional) (this is an example)\n You can set this is you know the endorsers connection id you want to use.\n If not specified then the agent will attempt to find an endorser connection.", + "description" : "Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection.", "example" : "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type" : "string" } @@ -12540,12 +12540,12 @@ "RevRegDefOptions" : { "properties" : { "create_transaction_for_endorser" : { - "description" : "\n Create transaction for endorser (optional, default false). \n Use this for agents who don't specify an author role but want to \n create a transaction for an endorser to sign.", + "description" : "Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign.", "example" : false, "type" : "boolean" }, "endorser_connection_id" : { - "description" : "\n Connection identifier (optional) (this is an example)\n You can set this is you know the endorsers connection id you want to use.\n If not specified then the agent will attempt to find an endorser connection.", + "description" : "Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection.", "example" : "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type" : "string" } @@ -13052,12 +13052,12 @@ "SchemaPostOption" : { "properties" : { "create_transaction_for_endorser" : { - "description" : "\n Create transaction for endorser (optional, default false). \n Use this for agents who don't specify an author role but want to \n create a transaction for an endorser to sign.", + "description" : "Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign.", "example" : false, "type" : "boolean" }, "endorser_connection_id" : { - "description" : "\n Connection identifier (optional) (this is an example)\n You can set this is you know the endorsers connection id you want to use.\n If not specified then the agent will attempt to find an endorser connection.", + "description" : "Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection.", "example" : "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type" : "string" } @@ -13460,7 +13460,7 @@ "type" : "string" }, "connection_id" : { - "description" : "The connection identifier for thie particular transaction record", + "description" : "The connection identifier for this particular transaction record", "example" : "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type" : "string" }, @@ -13682,17 +13682,17 @@ "type" : "object" }, "image_url" : { - "description" : "Image url for this wallet. This image url is publicized (self-attested) to other agents as part of forming a connection.", + "description" : "Image url for this wallet. This image url is publicized (self-attested) to other agents as part of forming a connection.", "example" : "https://aries.ca/images/sample.png", "type" : "string" }, "label" : { - "description" : "Label for this wallet. This label is publicized (self-attested) to other agents as part of forming a connection.", + "description" : "Label for this wallet. This label is publicized (self-attested) to other agents as part of forming a connection.", "example" : "Alice", "type" : "string" }, "wallet_dispatch_type" : { - "description" : "Webhook target dispatch type for this wallet. default - Dispatch only to webhooks associated with this wallet. base - Dispatch only to webhooks associated with the base wallet. both - Dispatch to both webhook targets.", + "description" : "Webhook target dispatch type for this wallet. default: Dispatch only to webhooks associated with this wallet. base: Dispatch only to webhooks associated with the base wallet. both: Dispatch to both webhook targets.", "enum" : [ "default", "both", "base" ], "example" : "default", "type" : "string" @@ -15831,7 +15831,7 @@ "allOf" : [ { "$ref" : "#/components/schemas/DIFPresSpec" } ], - "description" : "Optional Presentation specification for DIF, overrides the PresentionExchange record's PresRequest", + "description" : "Optional Presentation specification for DIF, overrides the PresentationExchange record's PresRequest", "type" : "object" }, "indy" : { @@ -16312,7 +16312,7 @@ }, "securitySchemes" : { "AuthorizationHeader" : { - "description" : "Bearer token. Be sure to preprend token with 'Bearer '", + "description" : "Bearer token. Be sure to prepend token with 'Bearer '", "in" : "header", "name" : "Authorization", "type" : "apiKey" diff --git a/open-api/swagger.json b/open-api/swagger.json index 2bb229144c..7dead48830 100644 --- a/open-api/swagger.json +++ b/open-api/swagger.json @@ -65,7 +65,7 @@ } }, { "name" : "did-rotate", - "description" : "Rorate a DID", + "description" : "Rotate a DID", "externalDocs" : { "description" : "Specification", "url" : "https://github.com/hyperledger/aries-rfcs/tree/main/features/0794-did-rotate" @@ -940,7 +940,7 @@ }, { "name" : "invitation_msg_id", "in" : "query", - "description" : "Identifier of the associated Invitation Mesage", + "description" : "Identifier of the associated Invitation Message", "required" : false, "type" : "string" }, { @@ -3258,7 +3258,7 @@ }, { "name" : "role", "in" : "query", - "description" : "Filer on role, 'client' for keys mediated by other agents, 'server' for keys mediated by this agent", + "description" : "Filer on role, 'client' for keys mediated by other agents, 'server' for keys mediated by this agent", "required" : false, "type" : "string", "default" : "server", @@ -6004,7 +6004,7 @@ }, "securityDefinitions" : { "AuthorizationHeader" : { - "description" : "Bearer token. Be sure to preprend token with 'Bearer '", + "description" : "Bearer token. Be sure to prepend token with 'Bearer '", "type" : "apiKey", "name" : "Authorization", "in" : "header" @@ -6753,7 +6753,7 @@ "image_url" : { "type" : "string", "example" : "https://aries.ca/images/sample.png", - "description" : "Image url for this wallet. This image url is publicized (self-attested) to other agents as part of forming a connection." + "description" : "Image url for this wallet. This image url is publicized (self-attested) to other agents as part of forming a connection." }, "key_management_mode" : { "type" : "string", @@ -6764,12 +6764,12 @@ "label" : { "type" : "string", "example" : "Alice", - "description" : "Label for this wallet. This label is publicized (self-attested) to other agents as part of forming a connection." + "description" : "Label for this wallet. This label is publicized (self-attested) to other agents as part of forming a connection." }, "wallet_dispatch_type" : { "type" : "string", "example" : "default", - "description" : "Webhook target dispatch type for this wallet. default - Dispatch only to webhooks associated with this wallet. base - Dispatch only to webhooks associated with the base wallet. both - Dispatch to both webhook targets.", + "description" : "Webhook target dispatch type for this wallet. default: Dispatch only to webhooks associated with this wallet. base: Dispatch only to webhooks associated with the base wallet. both: Dispatch to both webhook targets.", "enum" : [ "default", "both", "base" ] }, "wallet_key" : { @@ -6854,7 +6854,7 @@ "wallet_key" : { "type" : "string", "example" : "MySecretKey123", - "description" : "Master key used for key derivation. Only required for unamanged wallets." + "description" : "Master key used for key derivation. Only required for unmanaged wallets." } } }, @@ -6906,7 +6906,7 @@ "tag" : { "type" : "string", "example" : "default", - "description" : "The tag value passed in by the Issuer to\n an AnonCred's Credential Definition create and store implementation." + "description" : "The tag value passed in by the Issuer to an AnonCred's Credential Definition create and store implementation." }, "type" : { "type" : "string", @@ -6923,12 +6923,12 @@ "create_transaction_for_endorser" : { "type" : "boolean", "example" : false, - "description" : "\n Create transaction for endorser (optional, default false). \n Use this for agents who don't specify an author role but want to \n create a transaction for an endorser to sign." + "description" : "Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign." }, "endorser_connection_id" : { "type" : "string", "example" : "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "description" : "\n Connection identifier (optional) (this is an example)\n You can set this is you know the endorsers connection id you want to use.\n If not specified then the agent will attempt to find an endorser connection." + "description" : "Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection." }, "revocation_registry_size" : { "type" : "integer", @@ -7554,7 +7554,7 @@ "seed" : { "type" : "string", "example" : "000000000000000000000000Trustee1", - "description" : "Optional seed to use for DID, Must beenabled in configuration before use." + "description" : "Optional seed to use for DID, Must be enabled in configuration before use." } } }, @@ -10662,12 +10662,12 @@ "create_transaction_for_endorser" : { "type" : "boolean", "example" : false, - "description" : "\n Create transaction for endorser (optional, default false). \n Use this for agents who don't specify an author role but want to \n create a transaction for an endorser to sign." + "description" : "Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign." }, "endorser_connection_id" : { "type" : "string", "example" : "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "description" : "\n Connection identifier (optional) (this is an example)\n You can set this is you know the endorsers connection id you want to use.\n If not specified then the agent will attempt to find an endorser connection." + "description" : "Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection." } } }, @@ -10860,7 +10860,7 @@ "wallet_key" : { "type" : "string", "example" : "MySecretKey123", - "description" : "Master key used for key derivation. Only required for unmanaged wallets." + "description" : "Master key used for key derivation. Only required for unmanaged wallets." } } }, @@ -10886,7 +10886,7 @@ "currentAccumulator" : { "type" : "string", "example" : "21 118...1FB", - "description" : "The current accumalator value" + "description" : "The current accumulator value" }, "issuerId" : { "type" : "string", @@ -10934,12 +10934,12 @@ "create_transaction_for_endorser" : { "type" : "boolean", "example" : false, - "description" : "\n Create transaction for endorser (optional, default false). \n Use this for agents who don't specify an author role but want to \n create a transaction for an endorser to sign." + "description" : "Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign." }, "endorser_connection_id" : { "type" : "string", "example" : "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "description" : "\n Connection identifier (optional) (this is an example)\n You can set this is you know the endorsers connection id you want to use.\n If not specified then the agent will attempt to find an endorser connection." + "description" : "Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection." } } }, @@ -11036,12 +11036,12 @@ "create_transaction_for_endorser" : { "type" : "boolean", "example" : false, - "description" : "\n Create transaction for endorser (optional, default false). \n Use this for agents who don't specify an author role but want to \n create a transaction for an endorser to sign." + "description" : "Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign." }, "endorser_connection_id" : { "type" : "string", "example" : "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "description" : "\n Connection identifier (optional) (this is an example)\n You can set this is you know the endorsers connection id you want to use.\n If not specified then the agent will attempt to find an endorser connection." + "description" : "Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection." } } }, @@ -11542,12 +11542,12 @@ "create_transaction_for_endorser" : { "type" : "boolean", "example" : false, - "description" : "\n Create transaction for endorser (optional, default false). \n Use this for agents who don't specify an author role but want to \n create a transaction for an endorser to sign." + "description" : "Create transaction for endorser (optional, default false). Use this for agents who don't specify an author role but want to create a transaction for an endorser to sign." }, "endorser_connection_id" : { "type" : "string", "example" : "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "description" : "\n Connection identifier (optional) (this is an example)\n You can set this is you know the endorsers connection id you want to use.\n If not specified then the agent will attempt to find an endorser connection." + "description" : "Connection identifier (optional) (this is an example). You can set this if you know the endorser's connection id you want to use. If not specified then the agent will attempt to find an endorser connection." } } }, @@ -11938,7 +11938,7 @@ "connection_id" : { "type" : "string", "example" : "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "description" : "The connection identifier for thie particular transaction record" + "description" : "The connection identifier for this particular transaction record" }, "created_at" : { "type" : "string", @@ -12136,17 +12136,17 @@ "image_url" : { "type" : "string", "example" : "https://aries.ca/images/sample.png", - "description" : "Image url for this wallet. This image url is publicized (self-attested) to other agents as part of forming a connection." + "description" : "Image url for this wallet. This image url is publicized (self-attested) to other agents as part of forming a connection." }, "label" : { "type" : "string", "example" : "Alice", - "description" : "Label for this wallet. This label is publicized (self-attested) to other agents as part of forming a connection." + "description" : "Label for this wallet. This label is publicized (self-attested) to other agents as part of forming a connection." }, "wallet_dispatch_type" : { "type" : "string", "example" : "default", - "description" : "Webhook target dispatch type for this wallet. default - Dispatch only to webhooks associated with this wallet. base - Dispatch only to webhooks associated with the base wallet. both - Dispatch to both webhook targets.", + "description" : "Webhook target dispatch type for this wallet. default: Dispatch only to webhooks associated with this wallet. base: Dispatch only to webhooks associated with the base wallet. both: Dispatch to both webhook targets.", "enum" : [ "default", "both", "base" ] }, "wallet_webhook_urls" : { @@ -14822,7 +14822,7 @@ }, "V20PresSpecByFormatRequest_dif" : { "type" : "object", - "description" : "Optional Presentation specification for DIF, overrides the PresentionExchange record's PresRequest" + "description" : "Optional Presentation specification for DIF, overrides the PresentationExchange record's PresRequest" }, "V20PresSpecByFormatRequest_indy" : { "type" : "object", From be868d1d73ad43e6a3b776fa5e533d2dcdda44a9 Mon Sep 17 00:00:00 2001 From: ff137 Date: Wed, 17 Apr 2024 17:50:59 +0200 Subject: [PATCH 4/4] :art: fix typos Signed-off-by: ff137 --- .../anoncreds/default/legacy_indy/registry.py | 6 +- aries_cloudagent/anoncreds/revocation.py | 4 +- aries_cloudagent/commands/upgrade.py | 2 +- aries_cloudagent/core/conductor.py | 4 +- aries_cloudagent/core/plugin_registry.py | 2 +- aries_cloudagent/did/did_key.py | 2 +- aries_cloudagent/ledger/base.py | 2 +- aries_cloudagent/messaging/agent_message.py | 2 +- .../messaging/decorators/attach_decorator.py | 2 +- .../decorators/tests/test_trace_decorator.py | 16 ++--- .../messaging/decorators/trace_decorator.py | 16 ++--- .../messaging/jsonld/credential.py | 2 +- .../messaging/tests/test_agent_message.py | 8 +-- aries_cloudagent/messaging/valid.py | 8 +-- aries_cloudagent/multitenant/cache.py | 2 +- .../protocols/connections/v1_0/manager.py | 2 +- .../v1_0/route_manager.py | 4 +- .../v1_0/route_manager_provider.py | 2 +- .../coordinate_mediation/v1_0/routes.py | 2 +- .../protocols/didexchange/v1_0/manager.py | 4 +- .../didexchange/v1_0/messages/request.py | 2 +- .../discovery/v1_0/tests/test_manager.py | 6 +- .../protocols/discovery/v2_0/manager.py | 4 +- .../discovery/v2_0/tests/test_manager.py | 8 +-- .../v2_0/formats/anoncreds/handler.py | 2 +- .../v2_0/formats/indy/handler.py | 2 +- .../v2_0/formats/ld_proof/handler.py | 6 +- .../ld_proof/models/cred_detail_options.py | 2 +- .../out_of_band/v1_0/models/oob_record.py | 2 +- .../protocols/present_proof/dif/pres_exch.py | 4 +- .../present_proof/dif/pres_exch_handler.py | 14 ++-- .../v2_0/formats/anoncreds/handler.py | 2 +- .../present_proof/v2_0/formats/dif/handler.py | 2 +- .../v2_0/formats/indy/handler.py | 2 +- .../v2_0/messages/pres_proposal.py | 2 +- .../v2_0/messages/pres_request.py | 2 +- .../v1_0/handlers/revoke_handler.py | 4 +- .../handlers/tests/test_revoke_handler.py | 4 +- .../v2_0/handlers/revoke_handler.py | 4 +- .../handlers/tests/test_revoke_handler.py | 4 +- aries_cloudagent/resolver/base.py | 2 +- aries_cloudagent/resolver/default/peer3.py | 2 +- .../models/issuer_rev_reg_record.py | 2 +- aries_cloudagent/revocation/routes.py | 4 +- .../revocation_anoncreds/routes.py | 4 +- aries_cloudagent/transport/inbound/ws.py | 6 +- aries_cloudagent/utils/classloader.py | 2 +- aries_cloudagent/utils/task_queue.py | 2 +- aries_cloudagent/utils/tracing.py | 4 +- .../suites/bbs_bls_signature_proof_2020.py | 2 +- aries_cloudagent/vc/vc_ld/issue.py | 2 +- .../vc/vc_ld/models/credential.py | 4 +- aries_cloudagent/vc/vc_ld/models/options.py | 2 +- .../vc/vc_ld/models/presentation.py | 4 +- aries_cloudagent/vc/vc_ld/prove.py | 2 +- aries_cloudagent/vc/vc_ld/verify.py | 2 +- aries_cloudagent/wallet/crypto.py | 2 +- aries_cloudagent/wallet/jwt.py | 2 +- demo/elk-stack/README.md | 71 ++++++++++--------- open-api/openapi.json | 8 ++- open-api/swagger.json | 8 ++- 61 files changed, 164 insertions(+), 143 deletions(-) diff --git a/aries_cloudagent/anoncreds/default/legacy_indy/registry.py b/aries_cloudagent/anoncreds/default/legacy_indy/registry.py index fd9df94a0b..5bed179f96 100644 --- a/aries_cloudagent/anoncreds/default/legacy_indy/registry.py +++ b/aries_cloudagent/anoncreds/default/legacy_indy/registry.py @@ -179,14 +179,14 @@ async def get_schema(self, profile: Profile, schema_id: str) -> GetSchemaResult: {"ledger_id": ledger_id}, ) - anonscreds_schema = AnonCredsSchema( + anoncreds_schema = AnonCredsSchema( issuer_id=schema["id"].split(":")[0], attr_names=schema["attrNames"], name=schema["name"], version=schema["version"], ) result = GetSchemaResult( - schema=anonscreds_schema, + schema=anoncreds_schema, schema_id=schema["id"], resolution_metadata={"ledger_id": ledger_id}, schema_metadata={"seqNo": schema["seqNo"]}, @@ -1084,7 +1084,7 @@ async def fix_ledger_entry( '>>> rev_reg_delta.get("value"): %s', rev_reg_delta.get("value") ) - # if we had any revocation discrepencies, check the accumulator value + # if we had any revocation discrepancies, check the accumulator value if rec_count > 0: if (rev_list.current_accumulator and rev_reg_delta.get("value")) and ( rev_list.current_accumulator != rev_reg_delta["value"]["accum"] diff --git a/aries_cloudagent/anoncreds/revocation.py b/aries_cloudagent/anoncreds/revocation.py index 4ba4ca6b08..80e7d8c16e 100644 --- a/aries_cloudagent/anoncreds/revocation.py +++ b/aries_cloudagent/anoncreds/revocation.py @@ -1381,9 +1381,9 @@ async def clear_pending_revocations( ) async def set_tails_file_public_uri(self, rev_reg_id, tails_public_uri): - """Update Revocation Registy tails file public uri.""" + """Update Revocation Registry tails file public uri.""" pass async def set_rev_reg_state(self, rev_reg_id, state): - """Update Revocation Registy state.""" + """Update Revocation Registry state.""" pass diff --git a/aries_cloudagent/commands/upgrade.py b/aries_cloudagent/commands/upgrade.py index e11c620a90..855fcb668f 100644 --- a/aries_cloudagent/commands/upgrade.py +++ b/aries_cloudagent/commands/upgrade.py @@ -572,7 +572,7 @@ async def update_existing_records(profile: Profile): ########################################################## # Fix for ACA-Py Issue #2485 -# issuance_type attribue in IssuerRevRegRecord was removed +# issuance_type attribute in IssuerRevRegRecord was removed # in 0.5.3 version. IssuerRevRegRecord created previously # will need ########################################################## diff --git a/aries_cloudagent/core/conductor.py b/aries_cloudagent/core/conductor.py index 18d2447571..d1f44e68ab 100644 --- a/aries_cloudagent/core/conductor.py +++ b/aries_cloudagent/core/conductor.py @@ -522,12 +522,12 @@ async def start(self) -> None: except Exception: LOGGER.exception("Error accepting mediation invitation") - # notify protcols of startup status + # notify protocols of startup status await self.root_profile.notify(STARTUP_EVENT_TOPIC, {}) async def stop(self, timeout=1.0): """Stop the agent.""" - # notify protcols that we are shutting down + # notify protocols that we are shutting down if self.root_profile: await self.root_profile.notify(SHUTDOWN_EVENT_TOPIC, {}) diff --git a/aries_cloudagent/core/plugin_registry.py b/aries_cloudagent/core/plugin_registry.py index db25f3c6ce..b5d4fb107e 100644 --- a/aries_cloudagent/core/plugin_registry.py +++ b/aries_cloudagent/core/plugin_registry.py @@ -209,7 +209,7 @@ async def init_context(self, context: InjectionContext): else: await self.load_protocols(context, plugin) - # register event handlers for each protocol, if providedf + # register event handlers for each protocol, if provided self.register_protocol_events(context) async def load_protocol_version( diff --git a/aries_cloudagent/did/did_key.py b/aries_cloudagent/did/did_key.py index 3a74971612..cd98ad50d3 100644 --- a/aries_cloudagent/did/did_key.py +++ b/aries_cloudagent/did/did_key.py @@ -70,7 +70,7 @@ def from_fingerprint(cls, fingerprint: str, key_types=None) -> "DIDKey": def from_did(cls, did: str) -> "DIDKey": """Initialize a new DIDKey instance from a fully qualified did:key string. - Extracts the fingerprint from the did:key and uses that to constrcut the did:key. + Extracts the fingerprint from the did:key and uses that to construct the did:key. """ did_parts = did.split("#") _, fingerprint = did_parts[0].split("did:key:") diff --git a/aries_cloudagent/ledger/base.py b/aries_cloudagent/ledger/base.py index 1da72db0cb..1ebc8926c5 100644 --- a/aries_cloudagent/ledger/base.py +++ b/aries_cloudagent/ledger/base.py @@ -91,7 +91,7 @@ async def _construct_attr_json( """Create attr_json string. Args: - all_exist_endpoings: Dictionary of all existing endpoints + all_exist_endpoints: Dictionary of all existing endpoints endpoint: The endpoint address endpoint_type: The type of the endpoint routing_keys: List of routing_keys if mediator is present diff --git a/aries_cloudagent/messaging/agent_message.py b/aries_cloudagent/messaging/agent_message.py index 9aee776528..8a311aae5a 100644 --- a/aries_cloudagent/messaging/agent_message.py +++ b/aries_cloudagent/messaging/agent_message.py @@ -384,7 +384,7 @@ def assign_trace_decorator(self, context, trace): """Copy trace from a json structure. Args: - trace: string containing trace json stucture + trace: string containing trace json structure """ if trace: self.add_trace_decorator( diff --git a/aries_cloudagent/messaging/decorators/attach_decorator.py b/aries_cloudagent/messaging/decorators/attach_decorator.py index 1ed1ec123f..b68a7e3c61 100644 --- a/aries_cloudagent/messaging/decorators/attach_decorator.py +++ b/aries_cloudagent/messaging/decorators/attach_decorator.py @@ -172,7 +172,7 @@ class Meta: @pre_load def validate_single_xor_multi_sig(self, data: Mapping, **kwargs): - """Ensure model is for either 1 or many sigatures, not mishmash of both.""" + """Ensure model is for either 1 or many signatures, not mishmash of both.""" if "signatures" in data: if any(k in data for k in ("header", "protected", "signature")): diff --git a/aries_cloudagent/messaging/decorators/tests/test_trace_decorator.py b/aries_cloudagent/messaging/decorators/tests/test_trace_decorator.py index b67da74477..51e4fa0a61 100644 --- a/aries_cloudagent/messaging/decorators/tests/test_trace_decorator.py +++ b/aries_cloudagent/messaging/decorators/tests/test_trace_decorator.py @@ -15,7 +15,7 @@ class TestTraceDecorator(TestCase): timestamp = "123456789.123456" str_time = "2018-03-27 18:23:45.123Z" handler = "agent name" - ellapsed_milli = 27 + elapsed_milli = 27 outcome = "OK ..." def test_init_api(self): @@ -36,7 +36,7 @@ def test_init_message(self): timestamp=self.timestamp, str_time=self.str_time, handler=self.handler, - ellapsed_milli=self.ellapsed_milli, + elapsed_milli=self.elapsed_milli, outcome=self.outcome, ) @@ -57,7 +57,7 @@ def test_init_message(self): assert trace_report.timestamp == self.timestamp assert trace_report.str_time == self.str_time assert trace_report.handler == self.handler - assert trace_report.ellapsed_milli == self.ellapsed_milli + assert trace_report.elapsed_milli == self.elapsed_milli assert trace_report.outcome == self.outcome def test_serialize_load(self): @@ -70,7 +70,7 @@ def test_serialize_load(self): timestamp=self.timestamp, str_time=self.str_time, handler=self.handler, - ellapsed_milli=self.ellapsed_milli, + elapsed_milli=self.elapsed_milli, outcome=self.outcome, ) @@ -96,7 +96,7 @@ def test_serialize_load(self): assert trace_report.timestamp == x_trace_report.timestamp assert trace_report.str_time == x_trace_report.str_time assert trace_report.handler == x_trace_report.handler - assert trace_report.ellapsed_milli == x_trace_report.ellapsed_milli + assert trace_report.elapsed_milli == x_trace_report.elapsed_milli assert trace_report.outcome == x_trace_report.outcome def test_trace_reports(self): @@ -115,7 +115,7 @@ def test_trace_reports(self): timestamp=self.timestamp, str_time=self.str_time, handler=self.handler, - ellapsed_milli=self.ellapsed_milli, + elapsed_milli=self.elapsed_milli, outcome=self.outcome, ) decorator.append_trace_report(x_trace_report) @@ -130,7 +130,7 @@ def test_trace_reports(self): timestamp=self.timestamp, str_time=self.str_time, handler=self.handler, - ellapsed_milli=self.ellapsed_milli, + elapsed_milli=self.elapsed_milli, outcome=self.outcome, ) decorator.append_trace_report(y_trace_report) @@ -148,7 +148,7 @@ def test_trace_reports(self): timestamp=self.timestamp, str_time=self.str_time, handler=self.handler, - ellapsed_milli=self.ellapsed_milli, + elapsed_milli=self.elapsed_milli, outcome=self.outcome, ) decorator.append_trace_report(z_trace_report) diff --git a/aries_cloudagent/messaging/decorators/trace_decorator.py b/aries_cloudagent/messaging/decorators/trace_decorator.py index f1a75560d6..5a242f892e 100644 --- a/aries_cloudagent/messaging/decorators/trace_decorator.py +++ b/aries_cloudagent/messaging/decorators/trace_decorator.py @@ -32,7 +32,7 @@ def __init__( timestamp: str = None, str_time: str = None, handler: str = None, - ellapsed_milli: int = None, + elapsed_milli: int = None, outcome: str = None, ): """Initialize a TraceReport instance. @@ -44,7 +44,7 @@ def __init__( timestamp: ... str_time: ... handler: ... - ellapsed_milli: ... + elapsed_milli: ... outcome: ... """ super().__init__() @@ -54,7 +54,7 @@ def __init__( self._timestamp = timestamp self._str_time = str_time self._handler = handler - self._ellapsed_milli = ellapsed_milli + self._elapsed_milli = elapsed_milli self._outcome = outcome @property @@ -118,14 +118,14 @@ def handler(self): return self._handler @property - def ellapsed_milli(self): - """Accessor for ellapsed_milli. + def elapsed_milli(self): + """Accessor for elapsed_milli. Returns: - The sender ellapsed_milli + The sender elapsed_milli """ - return self._ellapsed_milli + return self._elapsed_milli @property def outcome(self): @@ -260,7 +260,7 @@ class Meta: "example": "TODO", }, ) - ellapsed_milli = fields.Int( + elapsed_milli = fields.Int( required=False, allow_none=True, metadata={ diff --git a/aries_cloudagent/messaging/jsonld/credential.py b/aries_cloudagent/messaging/jsonld/credential.py index 5c693a0b63..fdfb41f692 100644 --- a/aries_cloudagent/messaging/jsonld/credential.py +++ b/aries_cloudagent/messaging/jsonld/credential.py @@ -63,7 +63,7 @@ def verify_jws_header(header): async def jws_verify(session, verify_data, signature, public_key): - """Detatched jws verify handling.""" + """Detached jws verify handling.""" encoded_header, _, encoded_signature = signature.partition("..") decoded_header = json.loads(b64decode(encoded_header)) diff --git a/aries_cloudagent/messaging/tests/test_agent_message.py b/aries_cloudagent/messaging/tests/test_agent_message.py index 8e67e1e63b..d47b632d25 100644 --- a/aries_cloudagent/messaging/tests/test_agent_message.py +++ b/aries_cloudagent/messaging/tests/test_agent_message.py @@ -143,7 +143,7 @@ async def test_add_tracing(self): timestamp="123456789.123456", str_time="2019-01-01 12:34:56.7", handler="function.START", - ellapsed_milli=27, + elapsed_milli=27, outcome="OK! ...", ) msg.add_trace_report(trace_report) @@ -154,7 +154,7 @@ async def test_add_tracing(self): assert msg_trace_report.msg_id == msg._id assert msg_trace_report.thread_id == msg._thread_id assert msg_trace_report.handler == trace_report.handler - assert msg_trace_report.ellapsed_milli == trace_report.ellapsed_milli + assert msg_trace_report.elapsed_milli == trace_report.elapsed_milli assert msg_trace_report.traced_type == msg._type assert msg_trace_report.outcome == trace_report.outcome @@ -172,7 +172,7 @@ async def test_add_tracing(self): timestamp="123456789.123456", str_time="2019-01-01 12:34:56.7", handler="function.END", - ellapsed_milli=72, + elapsed_milli=72, outcome="A OK! ...", ) msg2.add_trace_report(trace_report2) @@ -183,7 +183,7 @@ async def test_add_tracing(self): assert msg_trace_report.msg_id == msg2._id assert msg_trace_report.thread_id == msg2._thread_id assert msg_trace_report.handler == trace_report2.handler - assert msg_trace_report.ellapsed_milli == trace_report2.ellapsed_milli + assert msg_trace_report.elapsed_milli == trace_report2.elapsed_milli assert msg_trace_report.traced_type == msg2._type assert msg_trace_report.outcome == trace_report2.outcome diff --git a/aries_cloudagent/messaging/valid.py b/aries_cloudagent/messaging/valid.py index df2a3ee49b..0f6ed4c27c 100644 --- a/aries_cloudagent/messaging/valid.py +++ b/aries_cloudagent/messaging/valid.py @@ -779,8 +779,8 @@ def __call__(self, value): class PresentationType(Validator): """Presentation Type.""" - PRESENTATIONL_TYPE = "VerifiablePresentation" - EXAMPLE = [PRESENTATIONL_TYPE] + PRESENTATION_TYPE = "VerifiablePresentation" + EXAMPLE = [PRESENTATION_TYPE] def __init__(self) -> None: """Initialize the instance.""" @@ -789,9 +789,9 @@ def __init__(self) -> None: def __call__(self, value): """Validate input value.""" length = len(value) - if length < 1 or PresentationType.PRESENTATIONL_TYPE not in value: + if length < 1 or PresentationType.PRESENTATION_TYPE not in value: raise ValidationError( - f"type must include {PresentationType.PRESENTATIONL_TYPE}" + f"type must include {PresentationType.PRESENTATION_TYPE}" ) return value diff --git a/aries_cloudagent/multitenant/cache.py b/aries_cloudagent/multitenant/cache.py index 1fb3f37e3c..ea18e34529 100644 --- a/aries_cloudagent/multitenant/cache.py +++ b/aries_cloudagent/multitenant/cache.py @@ -99,7 +99,7 @@ def put(self, key: str, value: Profile) -> None: LOGGER.debug(f"Setting profile with id {key} in profile cache") self._cache[key] = value - # Refresh profile livliness + # Refresh profile liveliness self._cache.move_to_end(key) self._cleanup() diff --git a/aries_cloudagent/protocols/connections/v1_0/manager.py b/aries_cloudagent/protocols/connections/v1_0/manager.py index 5b347f3427..b2b590ebfe 100644 --- a/aries_cloudagent/protocols/connections/v1_0/manager.py +++ b/aries_cloudagent/protocols/connections/v1_0/manager.py @@ -668,7 +668,7 @@ async def create_response( # TODO It's possible the mediation request sent here might arrive # before the connection response. This would result in an error condition - # difficult to accomodate for without modifying handlers for trust ping + # difficult to accommodate for without modifying handlers for trust ping # to ensure the connection is active. async with self.profile.session() as session: send_mediation_request = await connection.metadata_get( diff --git a/aries_cloudagent/protocols/coordinate_mediation/v1_0/route_manager.py b/aries_cloudagent/protocols/coordinate_mediation/v1_0/route_manager.py index b3fb04cb29..a7ada5873d 100644 --- a/aries_cloudagent/protocols/coordinate_mediation/v1_0/route_manager.py +++ b/aries_cloudagent/protocols/coordinate_mediation/v1_0/route_manager.py @@ -33,7 +33,7 @@ class RouteManagerError(Exception): class RoutingInfo(NamedTuple): - """Routing info tuple contiaing routing keys and endpoint.""" + """Routing info tuple containing routing keys and endpoint.""" routing_keys: Optional[List[str]] endpoint: Optional[str] @@ -50,7 +50,7 @@ class RouteManager(ABC): async def get_or_create_my_did( self, profile: Profile, conn_record: ConnRecord ) -> DIDInfo: - """Create or retrieve DID info for a conneciton.""" + """Create or retrieve DID info for a connection.""" if not conn_record.my_did: async with profile.session() as session: wallet = session.inject(BaseWallet) diff --git a/aries_cloudagent/protocols/coordinate_mediation/v1_0/route_manager_provider.py b/aries_cloudagent/protocols/coordinate_mediation/v1_0/route_manager_provider.py index 4c329a0c3b..e99c01c0b3 100644 --- a/aries_cloudagent/protocols/coordinate_mediation/v1_0/route_manager_provider.py +++ b/aries_cloudagent/protocols/coordinate_mediation/v1_0/route_manager_provider.py @@ -13,7 +13,7 @@ class RouteManagerProvider(BaseProvider): """Route manager provider. - Decides whcih route manager to use based on settings. + Decides which route manager to use based on settings. """ def __init__(self, root_profile: Profile): diff --git a/aries_cloudagent/protocols/coordinate_mediation/v1_0/routes.py b/aries_cloudagent/protocols/coordinate_mediation/v1_0/routes.py index 2eca0044c0..dd4e100081 100644 --- a/aries_cloudagent/protocols/coordinate_mediation/v1_0/routes.py +++ b/aries_cloudagent/protocols/coordinate_mediation/v1_0/routes.py @@ -95,7 +95,7 @@ class MediationIdMatchInfoSchema(OpenAPISchema): class GetKeylistQuerySchema(OpenAPISchema): - """Get keylist query string paramaters.""" + """Get keylist query string parameters.""" conn_id = CONNECTION_ID_SCHEMA role = fields.Str( diff --git a/aries_cloudagent/protocols/didexchange/v1_0/manager.py b/aries_cloudagent/protocols/didexchange/v1_0/manager.py index 6ae8fd5da1..2b5f9b984e 100644 --- a/aries_cloudagent/protocols/didexchange/v1_0/manager.py +++ b/aries_cloudagent/protocols/didexchange/v1_0/manager.py @@ -583,7 +583,7 @@ async def _receive_request_pairwise_did( def _handshake_protocol_to_use(self, request: DIDXRequest): """Determine the connection protocol to use based on the request. - If we support it, we'll send it. If we don't, we'll try didexchage/1.1. + If we support it, we'll send it. If we don't, we'll try didexchange/1.1. """ protocol = f"{request._type.protocol}/{request._type.version}" if protocol in ConnRecord.SUPPORTED_PROTOCOLS: @@ -986,7 +986,7 @@ async def accept_response( conn_rec.their_did = their_did - # The long format I sent has been acknoledged, use short form now. + # The long format I sent has been acknowledged, use short form now. if LONG_PATTERN.match(conn_rec.my_did or ""): conn_rec.my_did = await self.long_did_peer_4_to_short(conn_rec.my_did) if LONG_PATTERN.match(conn_rec.their_did or ""): diff --git a/aries_cloudagent/protocols/didexchange/v1_0/messages/request.py b/aries_cloudagent/protocols/didexchange/v1_0/messages/request.py index 1d7dfda0c3..f22fbe2134 100644 --- a/aries_cloudagent/protocols/didexchange/v1_0/messages/request.py +++ b/aries_cloudagent/protocols/didexchange/v1_0/messages/request.py @@ -44,7 +44,7 @@ def __init__( goal_code: (optional) is a self-attested code the receiver may want to display to the user or use in automatically deciding what to do with the request message. The goal code might be used particularly when the - request is sent to a resolvable DID without reference to a specfic + request is sent to a resolvable DID without reference to a specific invitation. goal: (optional) is a self-attested string that the receiver may want to display to the user about the context-specific goal of the request message. diff --git a/aries_cloudagent/protocols/discovery/v1_0/tests/test_manager.py b/aries_cloudagent/protocols/discovery/v1_0/tests/test_manager.py index c585ab1329..fbc46a7912 100644 --- a/aries_cloudagent/protocols/discovery/v1_0/tests/test_manager.py +++ b/aries_cloudagent/protocols/discovery/v1_0/tests/test_manager.py @@ -65,7 +65,7 @@ async def test_receive_disclosure(self): connection_id=test_conn_id, ) - async def test_receive_disclosure_retreive_by_conn(self): + async def test_receive_disclosure_retrieve_by_conn(self): test_conn_id = "test123" self.disclose.assign_thread_id("test123") with mock.patch.object( @@ -94,7 +94,7 @@ async def test_receive_disclosure_retreive_by_conn(self): connection_id=test_conn_id, ) - async def test_receive_disclosure_retreive_by_conn_not_found(self): + async def test_receive_disclosure_retrieve_by_conn_not_found(self): test_conn_id = "test123" self.disclose.assign_thread_id("test123") with mock.patch.object( @@ -118,7 +118,7 @@ async def test_receive_disclosure_retreive_by_conn_not_found(self): connection_id=test_conn_id, ) - async def test_receive_disclosure_retreive_new_ex_rec(self): + async def test_receive_disclosure_retrieve_new_ex_rec(self): test_conn_id = "test123" with mock.patch.object( V10DiscoveryExchangeRecord, "save", autospec=True diff --git a/aries_cloudagent/protocols/discovery/v2_0/manager.py b/aries_cloudagent/protocols/discovery/v2_0/manager.py index 05609e3c09..7be0f5a50a 100644 --- a/aries_cloudagent/protocols/discovery/v2_0/manager.py +++ b/aries_cloudagent/protocols/discovery/v2_0/manager.py @@ -87,7 +87,7 @@ async def lookup_exchange_rec_by_connection( return None async def proactive_disclose_features(self, connection_id: str): - """Proactively dislose features on active connection setup.""" + """Proactively disclose features on active connection setup.""" queries_msg = Queries( queries=[ QueryItem(feature_type="protocol", match="*"), @@ -202,7 +202,7 @@ async def create_and_send_query( queries = [] if not query_goal_code and not query_protocol: raise V20DiscoveryMgrError( - "Atleast one protocol or goal-code feature-type query is required." + "At least one protocol or goal-code feature-type query is required." ) if query_protocol: queries.append(QueryItem(feature_type="protocol", match=query_protocol)) diff --git a/aries_cloudagent/protocols/discovery/v2_0/tests/test_manager.py b/aries_cloudagent/protocols/discovery/v2_0/tests/test_manager.py index badaa637b4..8106b2c2bd 100644 --- a/aries_cloudagent/protocols/discovery/v2_0/tests/test_manager.py +++ b/aries_cloudagent/protocols/discovery/v2_0/tests/test_manager.py @@ -73,7 +73,7 @@ async def test_receive_disclosure(self): connection_id=test_conn_id, ) - async def test_receive_disclosure_retreive_by_conn(self): + async def test_receive_disclosure_retrieve_by_conn(self): test_conn_id = "test123" self.queries.assign_thread_id("test123") with mock.patch.object( @@ -102,7 +102,7 @@ async def test_receive_disclosure_retreive_by_conn(self): connection_id=test_conn_id, ) - async def test_receive_disclosure_retreive_by_conn_not_found(self): + async def test_receive_disclosure_retrieve_by_conn_not_found(self): test_conn_id = "test123" self.queries.assign_thread_id("test123") with mock.patch.object( @@ -126,7 +126,7 @@ async def test_receive_disclosure_retreive_by_conn_not_found(self): connection_id=test_conn_id, ) - async def test_receive_disclosure_retreive_new_ex_rec(self): + async def test_receive_disclosure_retrieve_new_ex_rec(self): test_conn_id = "test123" with mock.patch.object( V20DiscoveryExchangeRecord, "save", autospec=True @@ -191,7 +191,7 @@ async def test_check_if_disclosure_received(self): async def test_create_and_send_query_x(self): with self.assertRaises(V20DiscoveryMgrError) as cm: await self.manager.create_and_send_query() - assert "Atleast one protocol or goal-code" in str(cm.exception) + assert "At least one protocol or goal-code" in str(cm.exception) async def test_create_and_send_query_with_connection(self): return_ex_rec = V20DiscoveryExchangeRecord( diff --git a/aries_cloudagent/protocols/issue_credential/v2_0/formats/anoncreds/handler.py b/aries_cloudagent/protocols/issue_credential/v2_0/formats/anoncreds/handler.py index 9ef98c1a82..18a1f99cd7 100644 --- a/aries_cloudagent/protocols/issue_credential/v2_0/formats/anoncreds/handler.py +++ b/aries_cloudagent/protocols/issue_credential/v2_0/formats/anoncreds/handler.py @@ -67,7 +67,7 @@ def validate_fields(cls, message_type: str, attachment_data: Mapping): message_type (str): The message type to validate the attachment data for. Should be one of the message types as defined in message_types.py attachment_data (Mapping): [description] - The attachment data to valide + The attachment data to validate Raises: Exception: When the data is not valid. diff --git a/aries_cloudagent/protocols/issue_credential/v2_0/formats/indy/handler.py b/aries_cloudagent/protocols/issue_credential/v2_0/formats/indy/handler.py index f18cab567f..998ae8947d 100644 --- a/aries_cloudagent/protocols/issue_credential/v2_0/formats/indy/handler.py +++ b/aries_cloudagent/protocols/issue_credential/v2_0/formats/indy/handler.py @@ -81,7 +81,7 @@ def validate_fields(cls, message_type: str, attachment_data: Mapping): message_type (str): The message type to validate the attachment data for. Should be one of the message types as defined in message_types.py attachment_data (Mapping): [description] - The attachment data to valide + The attachment data to validate Raises: Exception: When the data is not valid. diff --git a/aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/handler.py b/aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/handler.py index 9640101e5a..dca321efae 100644 --- a/aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/handler.py +++ b/aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/handler.py @@ -54,7 +54,7 @@ def validate_fields(cls, message_type: str, attachment_data: Mapping) -> None: message_type (str): The message type to validate the attachment data for. Should be one of the message types as defined in message_types.py attachment_data (Mapping): [description] - The attachment data to valide + The attachment data to validate Raises: Exception: When the data is not valid. @@ -213,7 +213,7 @@ async def create_request( LDProofCredFormatHandler.format ) # API data is stored in proposal (when starting from request) - # It is a bit of a strage flow IMO. + # It is a bit of a strange flow IMO. elif cred_ex_record.cred_proposal: request_data = cred_ex_record.cred_proposal.attachment( LDProofCredFormatHandler.format @@ -323,7 +323,7 @@ async def receive_credential( " match requested credential" ) - # both credential and detail contain status. Check for equalness + # both credential and detail contain status. Check for equality if credential_status and detail_status: if credential_status.get("type") != detail_status.get("type"): raise V20CredFormatError( diff --git a/aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/models/cred_detail_options.py b/aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/models/cred_detail_options.py index 617d73ba74..9d74382d8d 100644 --- a/aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/models/cred_detail_options.py +++ b/aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/models/cred_detail_options.py @@ -39,7 +39,7 @@ def __init__( self.credential_status = credential_status def __eq__(self, o: object) -> bool: - """Check equalness.""" + """Check equality.""" if isinstance(o, LDProofVCDetailOptions): return ( self.proof_type == o.proof_type diff --git a/aries_cloudagent/protocols/out_of_band/v1_0/models/oob_record.py b/aries_cloudagent/protocols/out_of_band/v1_0/models/oob_record.py index d79e226121..0a0e7cdf59 100644 --- a/aries_cloudagent/protocols/out_of_band/v1_0/models/oob_record.py +++ b/aries_cloudagent/protocols/out_of_band/v1_0/models/oob_record.py @@ -321,7 +321,7 @@ class Meta: multi_use = fields.Boolean( required=False, metadata={ - "description": "Allow for multiple uses of the oobinvitation", + "description": "Allow for multiple uses of the oob invitation", "example": True, }, ) diff --git a/aries_cloudagent/protocols/present_proof/dif/pres_exch.py b/aries_cloudagent/protocols/present_proof/dif/pres_exch.py index 0d46046ea9..cc7ae20645 100644 --- a/aries_cloudagent/protocols/present_proof/dif/pres_exch.py +++ b/aries_cloudagent/protocols/present_proof/dif/pres_exch.py @@ -444,7 +444,7 @@ class Meta: class Constraints(BaseModel): - """Single Constraints which describes InputDescriptor's Contraint field.""" + """Single Constraints which describes InputDescriptor's Constraint field.""" class Meta: """Constraints metadata.""" @@ -890,7 +890,7 @@ def __init__( class DIFOptionsSchema(BaseModelSchema): - """Schema for options required for the Prover to fulfill the Verifier's request.""" + """Schema for options required for the Prover to fulfil the Verifier's request.""" class Meta: """DIFOptionsSchema metadata.""" diff --git a/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py b/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py index 995ff36050..e5d0aa7509 100644 --- a/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py +++ b/aries_cloudagent/protocols/present_proof/dif/pres_exch_handler.py @@ -1157,7 +1157,7 @@ def is_numeric(self, val: any): except ValueError: pass raise DIFPresExchError( - "Invalid type provided for comparision/numeric operation." + "Invalid type provided for comparison/numeric operation." ) async def merge_nested_results( @@ -1307,7 +1307,7 @@ async def create_vp( return result_vp def check_if_cred_id_derived(self, id: str) -> bool: - """Check if credential or credentialSubjet id is derived.""" + """Check if credential or credentialSubject id is derived.""" if id.startswith("urn:bnid:_:c14n"): return True return False @@ -1319,7 +1319,7 @@ async def merge( """Return applicable credentials and descriptor_map for attachment. Used for generating the presentation_submission property with the - descriptor_map, mantaining the order in which applicable credential + descriptor_map, maintaining the order in which applicable credential list is returned. Args: @@ -1381,17 +1381,19 @@ async def verify_received_pres( async def __verify_desc_map_list( self, descriptor_map_list, pres, input_descriptors ): - inp_desc_id_contraint_map = {} + inp_desc_id_constraint_map = {} inp_desc_id_schema_one_of_filter = set() inp_desc_id_schemas_map = {} for input_descriptor in input_descriptors: - inp_desc_id_contraint_map[input_descriptor.id] = input_descriptor.constraint + inp_desc_id_constraint_map[input_descriptor.id] = ( + input_descriptor.constraint + ) inp_desc_id_schemas_map[input_descriptor.id] = input_descriptor.schemas if input_descriptor.schemas.oneof_filter: inp_desc_id_schema_one_of_filter.add(input_descriptor.id) for desc_map_item in descriptor_map_list: desc_map_item_id = desc_map_item.get("id") - constraint = inp_desc_id_contraint_map.get(desc_map_item_id) + constraint = inp_desc_id_constraint_map.get(desc_map_item_id) schema_filter = inp_desc_id_schemas_map.get(desc_map_item_id) desc_map_item_path = desc_map_item.get("path") jsonpath = parse(desc_map_item_path) diff --git a/aries_cloudagent/protocols/present_proof/v2_0/formats/anoncreds/handler.py b/aries_cloudagent/protocols/present_proof/v2_0/formats/anoncreds/handler.py index 43ee2cdc6f..fd23962d36 100644 --- a/aries_cloudagent/protocols/present_proof/v2_0/formats/anoncreds/handler.py +++ b/aries_cloudagent/protocols/present_proof/v2_0/formats/anoncreds/handler.py @@ -51,7 +51,7 @@ def validate_fields(cls, message_type: str, attachment_data: Mapping): message_type (str): The message type to validate the attachment data for. Should be one of the message types as defined in message_types.py attachment_data (Mapping): [description] - The attachment data to valide + The attachment data to validate Raises: Exception: When the data is not valid. diff --git a/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/handler.py b/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/handler.py index d7f2b0dd2c..af8e6f00de 100644 --- a/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/handler.py +++ b/aries_cloudagent/protocols/present_proof/v2_0/formats/dif/handler.py @@ -59,7 +59,7 @@ def validate_fields(cls, message_type: str, attachment_data: Mapping): message_type (str): The message type to validate the attachment data for. Should be one of the message types as defined in message_types.py attachment_data (Mapping): [description] - The attachment data to valide + The attachment data to validate Raises: Exception: When the data is not valid. diff --git a/aries_cloudagent/protocols/present_proof/v2_0/formats/indy/handler.py b/aries_cloudagent/protocols/present_proof/v2_0/formats/indy/handler.py index cfe0e84c61..0a2007d856 100644 --- a/aries_cloudagent/protocols/present_proof/v2_0/formats/indy/handler.py +++ b/aries_cloudagent/protocols/present_proof/v2_0/formats/indy/handler.py @@ -63,7 +63,7 @@ def validate_fields(cls, message_type: str, attachment_data: Mapping): message_type (str): The message type to validate the attachment data for. Should be one of the message types as defined in message_types.py attachment_data (Mapping): [description] - The attachment data to valide + The attachment data to validate Raises: Exception: When the data is not valid. diff --git a/aries_cloudagent/protocols/present_proof/v2_0/messages/pres_proposal.py b/aries_cloudagent/protocols/present_proof/v2_0/messages/pres_proposal.py index 12511f4a41..f8075bee49 100644 --- a/aries_cloudagent/protocols/present_proof/v2_0/messages/pres_proposal.py +++ b/aries_cloudagent/protocols/present_proof/v2_0/messages/pres_proposal.py @@ -89,7 +89,7 @@ class Meta: V20PresFormatSchema, many=True, required=True, - metadata={"descrption": "Acceptable attachment formats"}, + metadata={"description": "Acceptable attachment formats"}, ) proposals_attach = fields.Nested( AttachDecoratorSchema, diff --git a/aries_cloudagent/protocols/present_proof/v2_0/messages/pres_request.py b/aries_cloudagent/protocols/present_proof/v2_0/messages/pres_request.py index e8efc553cb..f149299ce0 100644 --- a/aries_cloudagent/protocols/present_proof/v2_0/messages/pres_request.py +++ b/aries_cloudagent/protocols/present_proof/v2_0/messages/pres_request.py @@ -100,7 +100,7 @@ class Meta: V20PresFormatSchema, many=True, required=True, - metadata={"descrption": "Acceptable attachment formats"}, + metadata={"description": "Acceptable attachment formats"}, ) request_presentations_attach = fields.Nested( AttachDecoratorSchema, diff --git a/aries_cloudagent/protocols/revocation_notification/v1_0/handlers/revoke_handler.py b/aries_cloudagent/protocols/revocation_notification/v1_0/handlers/revoke_handler.py index 366cbcd6c2..32697992da 100644 --- a/aries_cloudagent/protocols/revocation_notification/v1_0/handlers/revoke_handler.py +++ b/aries_cloudagent/protocols/revocation_notification/v1_0/handlers/revoke_handler.py @@ -10,7 +10,7 @@ class RevokeHandler(BaseHandler): """Handler for revoke message.""" - RECIEVED_TOPIC = "acapy::revocation-notification::received" + RECEIVED_TOPIC = "acapy::revocation-notification::received" WEBHOOK_TOPIC = "acapy::webhook::revocation-notification" async def handle(self, context: RequestContext, responder: BaseResponder): @@ -34,7 +34,7 @@ async def handle(self, context: RequestContext, responder: BaseResponder): # Emit an event await context.profile.notify( - self.RECIEVED_TOPIC, + self.RECEIVED_TOPIC, { "thread_id": context.message.thread_id, "comment": context.message.comment, diff --git a/aries_cloudagent/protocols/revocation_notification/v1_0/handlers/tests/test_revoke_handler.py b/aries_cloudagent/protocols/revocation_notification/v1_0/handlers/tests/test_revoke_handler.py index 29c90c0692..342aaf782d 100644 --- a/aries_cloudagent/protocols/revocation_notification/v1_0/handlers/tests/test_revoke_handler.py +++ b/aries_cloudagent/protocols/revocation_notification/v1_0/handlers/tests/test_revoke_handler.py @@ -45,7 +45,7 @@ async def test_handle( await RevokeHandler().handle(context, responder) assert event_bus.events [(_, received)] = event_bus.events - assert received.topic == RevokeHandler.RECIEVED_TOPIC + assert received.topic == RevokeHandler.RECEIVED_TOPIC assert "thread_id" in received.payload assert "comment" in received.payload @@ -62,6 +62,6 @@ async def test_handle_monitor( assert "thread_id" in webhook.payload assert "comment" in webhook.payload - assert received.topic == RevokeHandler.RECIEVED_TOPIC + assert received.topic == RevokeHandler.RECEIVED_TOPIC assert "thread_id" in received.payload assert "comment" in received.payload diff --git a/aries_cloudagent/protocols/revocation_notification/v2_0/handlers/revoke_handler.py b/aries_cloudagent/protocols/revocation_notification/v2_0/handlers/revoke_handler.py index f2ffafe7e0..4332440761 100644 --- a/aries_cloudagent/protocols/revocation_notification/v2_0/handlers/revoke_handler.py +++ b/aries_cloudagent/protocols/revocation_notification/v2_0/handlers/revoke_handler.py @@ -10,7 +10,7 @@ class RevokeHandler(BaseHandler): """Handler for revoke message.""" - RECIEVED_TOPIC = "acapy::revocation-notification-v2::received" + RECEIVED_TOPIC = "acapy::revocation-notification-v2::received" WEBHOOK_TOPIC = "acapy::webhook::revocation-notification-v2" async def handle(self, context: RequestContext, responder: BaseResponder): @@ -35,7 +35,7 @@ async def handle(self, context: RequestContext, responder: BaseResponder): # Emit an event await context.profile.notify( - self.RECIEVED_TOPIC, + self.RECEIVED_TOPIC, { "revocation_format": context.message.revocation_format, "credential_id": context.message.credential_id, diff --git a/aries_cloudagent/protocols/revocation_notification/v2_0/handlers/tests/test_revoke_handler.py b/aries_cloudagent/protocols/revocation_notification/v2_0/handlers/tests/test_revoke_handler.py index 110b47dee0..ea523a8a26 100644 --- a/aries_cloudagent/protocols/revocation_notification/v2_0/handlers/tests/test_revoke_handler.py +++ b/aries_cloudagent/protocols/revocation_notification/v2_0/handlers/tests/test_revoke_handler.py @@ -49,7 +49,7 @@ async def test_handle( await RevokeHandler().handle(context, responder) assert event_bus.events [(_, received)] = event_bus.events - assert received.topic == RevokeHandler.RECIEVED_TOPIC + assert received.topic == RevokeHandler.RECEIVED_TOPIC assert "revocation_format" in received.payload assert "credential_id" in received.payload assert "comment" in received.payload @@ -68,7 +68,7 @@ async def test_handle_monitor( assert "credential_id" in received.payload assert "comment" in webhook.payload - assert received.topic == RevokeHandler.RECIEVED_TOPIC + assert received.topic == RevokeHandler.RECEIVED_TOPIC assert "revocation_format" in received.payload assert "credential_id" in received.payload assert "comment" in received.payload diff --git a/aries_cloudagent/resolver/base.py b/aries_cloudagent/resolver/base.py index 3fd1487fe5..2591c1900c 100644 --- a/aries_cloudagent/resolver/base.py +++ b/aries_cloudagent/resolver/base.py @@ -105,7 +105,7 @@ def supported_did_regex(self) -> Pattern: matching on DIDs to determine if this resolver supports a given DID. """ raise NotImplementedError( - "supported_did_regex must be overriden by subclasses of BaseResolver " + "supported_did_regex must be overridden by subclasses of BaseResolver " "to use default supports method" ) diff --git a/aries_cloudagent/resolver/default/peer3.py b/aries_cloudagent/resolver/default/peer3.py index 8d07776d7c..79a17f9c0d 100644 --- a/aries_cloudagent/resolver/default/peer3.py +++ b/aries_cloudagent/resolver/default/peer3.py @@ -64,7 +64,7 @@ async def _resolve( return doc async def create_and_store(self, profile: Profile, peer2: str): - """Injest did:peer:2 create did:peer:3 and store document.""" + """Inject did:peer:2 create did:peer:3 and store document.""" if not PEER2_PATTERN.match(peer2): raise ValueError("did:peer:2 expected") diff --git a/aries_cloudagent/revocation/models/issuer_rev_reg_record.py b/aries_cloudagent/revocation/models/issuer_rev_reg_record.py index 60c1ffd1fc..cf35ed9c96 100644 --- a/aries_cloudagent/revocation/models/issuer_rev_reg_record.py +++ b/aries_cloudagent/revocation/models/issuer_rev_reg_record.py @@ -399,7 +399,7 @@ async def fix_ledger_entry( ) LOGGER.debug('>>> rev_reg_delta.get("value"): %s', rev_reg_delta.get("value")) - # if we had any revocation discrepencies, check the accumulator value + # if we had any revocation discrepancies, check the accumulator value if rec_count > 0: if (self.revoc_reg_entry.value and rev_reg_delta.get("value")) and not ( self.revoc_reg_entry.value.accum == rev_reg_delta["value"]["accum"] diff --git a/aries_cloudagent/revocation/routes.py b/aries_cloudagent/revocation/routes.py index 8da9b79d59..1a1771d858 100644 --- a/aries_cloudagent/revocation/routes.py +++ b/aries_cloudagent/revocation/routes.py @@ -953,7 +953,7 @@ async def get_rev_reg_indy_recs(request: web.BaseRequest): request: aiohttp request object Returns: - Detailes of revoked credentials from ledger + Details of revoked credentials from ledger """ context: AdminRequestContext = request["context"] @@ -1736,7 +1736,7 @@ async def on_revocation_registry_endorsed_event(profile: Profile, event: Event): class TailsDeleteResponseSchema(OpenAPISchema): - """Return schema for tails failes deletion.""" + """Return schema for tails deletion.""" message = fields.Str() diff --git a/aries_cloudagent/revocation_anoncreds/routes.py b/aries_cloudagent/revocation_anoncreds/routes.py index cec9aa164a..2daa256e81 100644 --- a/aries_cloudagent/revocation_anoncreds/routes.py +++ b/aries_cloudagent/revocation_anoncreds/routes.py @@ -1043,7 +1043,7 @@ async def get_tails_file(request: web.BaseRequest) -> web.FileResponse: """ # # there is no equivalent of this in anoncreds. - # do we need it there or is this only for tranisition. + # do we need it there or is this only for transitions. # context: AdminRequestContext = request["context"] profile = context.profile @@ -1101,7 +1101,7 @@ async def set_rev_reg_state(request: web.BaseRequest): class TailsDeleteResponseSchema(OpenAPISchema): - """Return schema for tails failes deletion.""" + """Return schema for tails deletion.""" message = fields.Str() diff --git a/aries_cloudagent/transport/inbound/ws.py b/aries_cloudagent/transport/inbound/ws.py index 98f889cc4a..4188cd4206 100644 --- a/aries_cloudagent/transport/inbound/ws.py +++ b/aries_cloudagent/transport/inbound/ws.py @@ -33,8 +33,8 @@ def __init__(self, host: str, port: int, create_session, **kwargs) -> None: self.heartbeat_interval: Optional[int] = self.root_profile.settings.get_int( "transport.ws.heartbeat_interval" ) - self.timout_interval: Optional[int] = self.root_profile.settings.get_int( - "transport.ws.timout_interval" + self.timeout_interval: Optional[int] = self.root_profile.settings.get_int( + "transport.ws.timeout_interval" ) # TODO: set scheme dynamically based on SSL settings (ws/wss) @@ -89,7 +89,7 @@ async def inbound_message_handler(self, request): ws = web.WebSocketResponse( autoping=True, heartbeat=self.heartbeat_interval, - receive_timeout=self.timout_interval, + receive_timeout=self.timeout_interval, ) await ws.prepare(request) loop = asyncio.get_event_loop() diff --git a/aries_cloudagent/utils/classloader.py b/aries_cloudagent/utils/classloader.py index 12a4d6fe01..771c186040 100644 --- a/aries_cloudagent/utils/classloader.py +++ b/aries_cloudagent/utils/classloader.py @@ -1,4 +1,4 @@ -"""The classloader provides utilties to dynamically load classes and modules.""" +"""The classloader provides utilities to dynamically load classes and modules.""" import inspect from importlib import resources diff --git a/aries_cloudagent/utils/task_queue.py b/aries_cloudagent/utils/task_queue.py index bc81b39a0c..e67abb78b7 100644 --- a/aries_cloudagent/utils/task_queue.py +++ b/aries_cloudagent/utils/task_queue.py @@ -262,7 +262,7 @@ def add_active( Args: task: The asyncio task instance task_complete: An optional callback to run on completion - ident: A string identifer for the task + ident: A string identifier for the task timing: An optional dictionary of timing information """ self.active_tasks.append(task) diff --git a/aries_cloudagent/utils/tracing.py b/aries_cloudagent/utils/tracing.py index 738ee3c108..fddf91b7a7 100644 --- a/aries_cloudagent/utils/tracing.py +++ b/aries_cloudagent/utils/tracing.py @@ -196,7 +196,7 @@ def trace_event( "timestamp": ep_time, "str_time": str_time, "handler": str(handler), - "ellapsed_milli": int(1000 * (ret - perf_counter)) if perf_counter else 0, + "elapsed_milli": int(1000 * (ret - perf_counter)) if perf_counter else 0, "outcome": str(outcome), } event_str = json.dumps(event) @@ -214,7 +214,7 @@ def trace_event( timestamp=event["timestamp"], str_time=event["str_time"], handler=event["handler"], - ellapsed_milli=event["ellapsed_milli"], + elapsed_milli=event["elapsed_milli"], outcome=event["outcome"], ) message.add_trace_report(trace_report) diff --git a/aries_cloudagent/vc/ld_proofs/suites/bbs_bls_signature_proof_2020.py b/aries_cloudagent/vc/ld_proofs/suites/bbs_bls_signature_proof_2020.py index d9c529b2e3..51ec067fb9 100644 --- a/aries_cloudagent/vc/ld_proofs/suites/bbs_bls_signature_proof_2020.py +++ b/aries_cloudagent/vc/ld_proofs/suites/bbs_bls_signature_proof_2020.py @@ -267,7 +267,7 @@ async def verify_proof( total_message_count ) - # verify dervied proof + # verify derived proof verify_request = VerifyProofRequest( public_key=bbs_public_key, proof=proof_bytes, diff --git a/aries_cloudagent/vc/vc_ld/issue.py b/aries_cloudagent/vc/vc_ld/issue.py index f43447c29e..3cbfe61d39 100644 --- a/aries_cloudagent/vc/vc_ld/issue.py +++ b/aries_cloudagent/vc/vc_ld/issue.py @@ -20,7 +20,7 @@ async def issue( ) -> dict: """Issue a verifiable credential. - Takes the base credentail document, verifies it, and adds + Takes the base credential document, verifies it, and adds a digital signature to it. Args: diff --git a/aries_cloudagent/vc/vc_ld/models/credential.py b/aries_cloudagent/vc/vc_ld/models/credential.py index 6a63df6b7d..a436f9c84b 100644 --- a/aries_cloudagent/vc/vc_ld/models/credential.py +++ b/aries_cloudagent/vc/vc_ld/models/credential.py @@ -252,7 +252,7 @@ def proof(self, proof: LDProof): self._proof = proof def __eq__(self, o: object) -> bool: - """Check equalness.""" + """Check equality.""" if isinstance(o, VerifiableCredential): return ( self.context == o.context @@ -298,7 +298,7 @@ class Meta: required=False, validate=Uri(), metadata={ - "desscription": "The ID of the credential", + "description": "The ID of the credential", "example": "http://example.edu/credentials/1872", }, ) diff --git a/aries_cloudagent/vc/vc_ld/models/options.py b/aries_cloudagent/vc/vc_ld/models/options.py index a3dcd5571b..8bb7d93e75 100644 --- a/aries_cloudagent/vc/vc_ld/models/options.py +++ b/aries_cloudagent/vc/vc_ld/models/options.py @@ -42,7 +42,7 @@ def __init__( self.credential_status = credential_status def __eq__(self, o: object) -> bool: - """Check equalness.""" + """Check equality.""" if isinstance(o, LDProofVCOptions): return ( self.proof_type == o.proof_type diff --git a/aries_cloudagent/vc/vc_ld/models/presentation.py b/aries_cloudagent/vc/vc_ld/models/presentation.py index 4ceebd92a2..44d7934783 100644 --- a/aries_cloudagent/vc/vc_ld/models/presentation.py +++ b/aries_cloudagent/vc/vc_ld/models/presentation.py @@ -168,7 +168,7 @@ def proof(self, proof: LDProof): self._proof = proof def __eq__(self, o: object) -> bool: - """Check equalness.""" + """Check equality.""" if isinstance(o, VerifiablePresentation): return ( self.context == o.context @@ -211,7 +211,7 @@ class Meta: required=False, validate=Uri(), metadata={ - "desscription": "The ID of the presentation", + "description": "The ID of the presentation", "example": "http://example.edu/presentations/1872", }, ) diff --git a/aries_cloudagent/vc/vc_ld/prove.py b/aries_cloudagent/vc/vc_ld/prove.py index 28033de89f..056dd877a6 100644 --- a/aries_cloudagent/vc/vc_ld/prove.py +++ b/aries_cloudagent/vc/vc_ld/prove.py @@ -25,7 +25,7 @@ async def create_presentation( not sign the presentation yet. Call sing_presentation to do this. Args: - credentials (List[dict]): Credentails to add to the presentation + credentials (List[dict]): Credentials to add to the presentation presentation_id (str, optional): Id of the presentation. Defaults to None. Raises: diff --git a/aries_cloudagent/vc/vc_ld/verify.py b/aries_cloudagent/vc/vc_ld/verify.py index 1397bf312d..95893d841c 100644 --- a/aries_cloudagent/vc/vc_ld/verify.py +++ b/aries_cloudagent/vc/vc_ld/verify.py @@ -119,7 +119,7 @@ async def _verify_presentation( credential=credential, suites=suites, document_loader=document_loader, - # FIXME: we don't want to interhit the authentication purpose + # FIXME: we don't want to inherit the authentication purpose # from the presentation. However we do want to have subject # authentication I guess # purpose=purpose, diff --git a/aries_cloudagent/wallet/crypto.py b/aries_cloudagent/wallet/crypto.py index 86b1c1ec79..52a325e514 100644 --- a/aries_cloudagent/wallet/crypto.py +++ b/aries_cloudagent/wallet/crypto.py @@ -384,7 +384,7 @@ def decode_pack_message( Raises: ValueError: If the packed message is invalid - ValueError: If the packed message reipients are invalid + ValueError: If the packed message recipients are invalid ValueError: If the pack algorithm is unsupported ValueError: If the sender's public key was not provided diff --git a/aries_cloudagent/wallet/jwt.py b/aries_cloudagent/wallet/jwt.py index 3137ec7bfa..d60c1ba5ad 100644 --- a/aries_cloudagent/wallet/jwt.py +++ b/aries_cloudagent/wallet/jwt.py @@ -142,7 +142,7 @@ async def resolve_public_key_by_kid_for_verify(profile: Profile, kid: str) -> st if not isinstance(vmethod, VerificationMethod): raise InvalidVerificationMethod( - "Dereferenced resource is not a verificaiton method" + "Dereferenced resource is not a verification method" ) if not isinstance(vmethod, SUPPORTED_VERIFICATION_METHOD_TYPES): diff --git a/demo/elk-stack/README.md b/demo/elk-stack/README.md index 8e0fae75cf..696f11e65a 100644 --- a/demo/elk-stack/README.md +++ b/demo/elk-stack/README.md @@ -18,7 +18,7 @@ docker compose up Using the default configuration, `elasticsearch`, `kibana` and `logstash` services will be started. Kibana can be accessed at [http://localhost:5601](http://localhost:5601), and you can log in with `elastic / changeme` as the username and password. -A `log-*` index will be created, and you can refresh the [Discover Analytics](http://localhost:5601/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))&_a=(columns:!(traced_type,handler,ellapsed_milli,outcome,thread_id,msg_id),filters:!(),index:'logs-*',interval:auto,query:(language:kuery,query:''),sort:!(!('@timestamp',desc)))) to see any logged events. +A `log-*` index will be created, and you can refresh the [Discover Analytics](http://localhost:5601/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))&_a=(columns:!(traced_type,handler,elapsed_milli,outcome,thread_id,msg_id),filters:!(),index:'logs-*',interval:auto,query:(language:kuery,query:''),sort:!(!('@timestamp',desc)))) to see any logged events. We can run demos to see agent tracing events and attach them to the `elknet` network to push events to ELK. @@ -126,34 +126,41 @@ own_. [sherifabdlnaby/elastdocker][elastdocker] is one example among others of p ## Contents -1. [Requirements](#requirements) - * [Host setup](#host-setup) - * [Docker Desktop](#docker-desktop) - * [Windows](#windows) - * [macOS](#macos) -1. [Usage](#usage) - * [Bringing up the stack](#bringing-up-the-stack) - * [Initial setup](#initial-setup) - * [Setting up user authentication](#setting-up-user-authentication) - * [Injecting data](#injecting-data) - * [Cleanup](#cleanup) - * [Version selection](#version-selection) -1. [Configuration](#configuration) - * [How to configure Elasticsearch](#how-to-configure-elasticsearch) - * [How to configure Kibana](#how-to-configure-kibana) - * [How to configure Logstash](#how-to-configure-logstash) - * [How to disable paid features](#how-to-disable-paid-features) - * [How to scale out the Elasticsearch cluster](#how-to-scale-out-the-elasticsearch-cluster) - * [How to re-execute the setup](#how-to-re-execute-the-setup) - * [How to reset a password programmatically](#how-to-reset-a-password-programmatically) -1. [Extensibility](#extensibility) - * [How to add plugins](#how-to-add-plugins) - * [How to enable the provided extensions](#how-to-enable-the-provided-extensions) -1. [JVM tuning](#jvm-tuning) - * [How to specify the amount of memory used by a service](#how-to-specify-the-amount-of-memory-used-by-a-service) - * [How to enable a remote JMX connection to a service](#how-to-enable-a-remote-jmx-connection-to-a-service) -1. [Going further](#going-further) - * [Plugins and integrations](#plugins-and-integrations) +- [ACA-Py ELK Stack for demos](#aca-py-elk-stack-for-demos) + - [run](#run) + - [demos](#demos) + - [multi-demo](#multi-demo) +- [Elastic stack (ELK) on Docker](#elastic-stack-elk-on-docker) + - [Philosophy](#philosophy) + - [Contents](#contents) + - [Requirements](#requirements) + - [Host setup](#host-setup) + - [Docker Desktop](#docker-desktop) + - [Windows](#windows) + - [macOS](#macos) + - [Usage](#usage) + - [Bringing up the stack](#bringing-up-the-stack) + - [Initial setup](#initial-setup) + - [Setting up user authentication](#setting-up-user-authentication) + - [Injecting data](#injecting-data) + - [Cleanup](#cleanup) + - [Version selection](#version-selection) + - [Configuration](#configuration) + - [How to configure Elasticsearch](#how-to-configure-elasticsearch) + - [How to configure Kibana](#how-to-configure-kibana) + - [How to configure Logstash](#how-to-configure-logstash) + - [How to disable paid features](#how-to-disable-paid-features) + - [How to scale out the Elasticsearch cluster](#how-to-scale-out-the-elasticsearch-cluster) + - [How to re-execute the setup](#how-to-re-execute-the-setup) + - [How to reset a password programmatically](#how-to-reset-a-password-programmatically) + - [Extensibility](#extensibility) + - [How to add plugins](#how-to-add-plugins) + - [How to enable the provided extensions](#how-to-enable-the-provided-extensions) + - [JVM tuning](#jvm-tuning) + - [How to specify the amount of memory used by a service](#how-to-specify-the-amount-of-memory-used-by-a-service) + - [How to enable a remote JMX connection to a service](#how-to-enable-a-remote-jmx-connection-to-a-service) + - [Going further](#going-further) + - [Plugins and integrations](#plugins-and-integrations) ## Requirements @@ -229,7 +236,7 @@ browser and use the following (default) credentials to log in: * password: *changeme* > **Note** -> Upon the initial startup, the `elastic`, `logstash_internal` and `kibana_system` Elasticsearch users are intialized +> Upon the initial startup, the `elastic`, `logstash_internal` and `kibana_system` Elasticsearch users are initialized > with the values of the passwords defined in the [`.env`](.env) file (_"changeme"_ by default). The first one is the > [built-in superuser][builtin-users], the other two are used by Kibana and Logstash respectively to communicate with > Elasticsearch. This task is only performed during the _initial_ startup of the stack. To change users' passwords @@ -243,7 +250,7 @@ browser and use the following (default) credentials to log in: > Refer to [Security settings in Elasticsearch][es-security] to disable authentication. > **Warning** -> Starting with Elastic v8.0.0, it is no longer possible to run Kibana using the bootstraped privileged `elastic` user. +> Starting with Elastic v8.0.0, it is no longer possible to run Kibana using the bootstrapped privileged `elastic` user. The _"changeme"_ password set by default for all aforementioned users is **unsecure**. For increased security, we will reset the passwords of all aforementioned Elasticsearch users to random secrets. @@ -490,7 +497,7 @@ variable, allowing the user to adjust the amount of memory that can be used by e | Elasticsearch | ES_JAVA_OPTS | | Logstash | LS_JAVA_OPTS | -To accomodate environments where memory is scarce (Docker Desktop for Mac has only 2 GB available by default), the Heap +To accommodate environments where memory is scarce (Docker Desktop for Mac has only 2 GB available by default), the Heap Size allocation is capped by default in the `docker-compose.yml` file to 512 MB for Elasticsearch and 256 MB for Logstash. If you want to override the default JVM configuration, edit the matching environment variable(s) in the `docker-compose.yml` file. diff --git a/open-api/openapi.json b/open-api/openapi.json index 9233cbf6c0..9bc229cbfe 100644 --- a/open-api/openapi.json +++ b/open-api/openapi.json @@ -8607,6 +8607,7 @@ "type" : "string" }, "id" : { + "description" : "The ID of the credential", "example" : "http://example.edu/credentials/1872", "pattern" : "\\w+:(\\/?\\/?)[^\\s]+", "type" : "string" @@ -11826,7 +11827,7 @@ "type" : "object" }, "multi_use" : { - "description" : "Allow for multiple uses of the oobinvitation", + "description" : "Allow for multiple uses of the oob invitation", "example" : true, "type" : "boolean" }, @@ -11922,6 +11923,7 @@ "type" : "object" }, "id" : { + "description" : "The ID of the presentation", "example" : "http://example.edu/presentations/1872", "pattern" : "\\w+:(\\/?\\/?)[^\\s]+", "type" : "string" @@ -15666,6 +15668,7 @@ "type" : "string" }, "formats" : { + "description" : "Acceptable attachment formats", "items" : { "$ref" : "#/components/schemas/V20PresFormat" }, @@ -15750,6 +15753,7 @@ "type" : "string" }, "formats" : { + "description" : "Acceptable attachment formats", "items" : { "$ref" : "#/components/schemas/V20PresFormat" }, @@ -15979,6 +15983,7 @@ "type" : "string" }, "id" : { + "description" : "The ID of the credential", "example" : "http://example.edu/credentials/1872", "pattern" : "\\w+:(\\/?\\/?)[^\\s]+", "type" : "string" @@ -16036,6 +16041,7 @@ "type" : "object" }, "id" : { + "description" : "The ID of the presentation", "example" : "http://example.edu/presentations/1872", "pattern" : "\\w+:(\\/?\\/?)[^\\s]+", "type" : "string" diff --git a/open-api/swagger.json b/open-api/swagger.json index 7dead48830..5957ef3f89 100644 --- a/open-api/swagger.json +++ b/open-api/swagger.json @@ -7270,6 +7270,7 @@ "id" : { "type" : "string", "example" : "http://example.edu/credentials/1872", + "description" : "The ID of the credential", "pattern" : "\\w+:(\\/?\\/?)[^\\s]+" }, "issuanceDate" : { @@ -10340,7 +10341,7 @@ "multi_use" : { "type" : "boolean", "example" : true, - "description" : "Allow for multiple uses of the oobinvitation" + "description" : "Allow for multiple uses of the oob invitation" }, "oob_id" : { "type" : "string", @@ -10433,6 +10434,7 @@ "id" : { "type" : "string", "example" : "http://example.edu/presentations/1872", + "description" : "The ID of the presentation", "pattern" : "\\w+:(\\/?\\/?)[^\\s]+" }, "proof" : { @@ -13968,6 +13970,7 @@ }, "formats" : { "type" : "array", + "description" : "Acceptable attachment formats", "items" : { "$ref" : "#/definitions/V20PresFormat" } @@ -14044,6 +14047,7 @@ }, "formats" : { "type" : "array", + "description" : "Acceptable attachment formats", "items" : { "$ref" : "#/definitions/V20PresFormat" } @@ -14254,6 +14258,7 @@ "id" : { "type" : "string", "example" : "http://example.edu/credentials/1872", + "description" : "The ID of the credential", "pattern" : "\\w+:(\\/?\\/?)[^\\s]+" }, "issuanceDate" : { @@ -14296,6 +14301,7 @@ "id" : { "type" : "string", "example" : "http://example.edu/presentations/1872", + "description" : "The ID of the presentation", "pattern" : "\\w+:(\\/?\\/?)[^\\s]+" }, "proof" : {