Skip to content

Commit

Permalink
Merge pull request hyperledger#2898 from ff137/fix/typos
Browse files Browse the repository at this point in the history
🎨 fix typos
  • Loading branch information
dbluhm committed Apr 18, 2024
2 parents dab9468 + be868d1 commit 9243ef3
Show file tree
Hide file tree
Showing 97 changed files with 320 additions and 295 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions aries_cloudagent/admin/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions aries_cloudagent/anoncreds/default/legacy_indy/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]},
Expand Down Expand Up @@ -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"]
Expand Down
6 changes: 4 additions & 2 deletions aries_cloudagent/anoncreds/models/anoncreds_cred_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
)
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/anoncreds/models/anoncreds_revocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions aries_cloudagent/anoncreds/revocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 10 additions & 8 deletions aries_cloudagent/anoncreds/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/commands/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
##########################################################
Expand Down
8 changes: 4 additions & 4 deletions aries_cloudagent/config/argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'."
),
Expand Down Expand Up @@ -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."
),
)
Expand Down Expand Up @@ -1867,7 +1867,7 @@ def add_arguments(self, parser: ArgumentParser):
metavar="<endorser-endorse-with-did>",
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."
),
Expand Down
4 changes: 2 additions & 2 deletions aries_cloudagent/core/conductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, {})

Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/core/plugin_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/did/did_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:")
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/indy/models/pres_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(
threshold: int,
**kwargs,
):
"""Initialize preview object.
"""Initialize preview object.
Args:
name: attribute name
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/ledger/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/ledger/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/messaging/agent_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/messaging/decorators/attach_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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,
)

Expand All @@ -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):
Expand All @@ -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,
)

Expand All @@ -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):
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions aries_cloudagent/messaging/decorators/trace_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -44,7 +44,7 @@ def __init__(
timestamp: ...
str_time: ...
handler: ...
ellapsed_milli: ...
elapsed_milli: ...
outcome: ...
"""
super().__init__()
Expand All @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -260,7 +260,7 @@ class Meta:
"example": "TODO",
},
)
ellapsed_milli = fields.Int(
elapsed_milli = fields.Int(
required=False,
allow_none=True,
metadata={
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/messaging/jsonld/credential.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/messaging/schemas/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading

0 comments on commit 9243ef3

Please sign in to comment.