From cbc90ff8aa051d76deaecb9321ddf71a8f794b7f Mon Sep 17 00:00:00 2001 From: ff137 Date: Wed, 17 Apr 2024 17:50:59 +0200 Subject: [PATCH] :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 | 10 ++- open-api/swagger.json | 10 ++- 61 files changed, 166 insertions(+), 145 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 afd7acfa1f..ce60c84a71 100644 --- a/open-api/openapi.json +++ b/open-api/openapi.json @@ -1122,7 +1122,7 @@ "in" : "query", "name" : "state", "schema" : { - "enum" : [ "invitation", "active", "completed", "request", "abandoned", "response", "start", "init", "error" ], + "enum" : [ "abandoned", "completed", "error", "active", "request", "start", "response", "invitation", "init" ], "type" : "string" } }, { @@ -8579,6 +8579,7 @@ "type" : "string" }, "id" : { + "description" : "The ID of the credential", "example" : "http://example.edu/credentials/1872", "pattern" : "\\w+:(\\/?\\/?)[^\\s]+", "type" : "string" @@ -11656,7 +11657,7 @@ "$ref" : "#/components/schemas/InvitationRecord_invitation" }, "multi_use" : { - "description" : "Allow for multiple uses of the oobinvitation", + "description" : "Allow for multiple uses of the oob invitation", "example" : true, "type" : "boolean" }, @@ -11752,6 +11753,7 @@ "type" : "object" }, "id" : { + "description" : "The ID of the presentation", "example" : "http://example.edu/presentations/1872", "pattern" : "\\w+:(\\/?\\/?)[^\\s]+", "type" : "string" @@ -15281,6 +15283,7 @@ "type" : "string" }, "formats" : { + "description" : "Acceptable attachment formats", "items" : { "$ref" : "#/components/schemas/V20PresFormat" }, @@ -15357,6 +15360,7 @@ "type" : "string" }, "formats" : { + "description" : "Acceptable attachment formats", "items" : { "$ref" : "#/components/schemas/V20PresFormat" }, @@ -15570,6 +15574,7 @@ "type" : "string" }, "id" : { + "description" : "The ID of the credential", "example" : "http://example.edu/credentials/1872", "pattern" : "\\w+:(\\/?\\/?)[^\\s]+", "type" : "string" @@ -15616,6 +15621,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 981f533018..7eda0737f0 100644 --- a/open-api/swagger.json +++ b/open-api/swagger.json @@ -956,7 +956,7 @@ "description" : "Connection state", "required" : false, "type" : "string", - "enum" : [ "invitation", "active", "completed", "request", "abandoned", "response", "start", "init", "error" ] + "enum" : [ "abandoned", "completed", "error", "active", "request", "start", "response", "invitation", "init" ] }, { "name" : "their_did", "in" : "query", @@ -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" : {