Skip to content

Commit

Permalink
Merge branch 'master' into swagger-update-wallet-dids
Browse files Browse the repository at this point in the history
  • Loading branch information
ff137 committed Nov 20, 2024
2 parents e5fb1a3 + 72b35e1 commit 71a9d16
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ jobs:
| cut -d' ' -f2 \
>> "$GITHUB_ENV"
- name: Install dependencies with Poetry
run: mise run poetry:install:all
run: mise run poetry:install
- name: Run Pylint
run: |
poetry run pylint app/ endorser/ shared/ trustregistry/ waypoint/ --rcfile=.pylintrc -r n --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" --exit-zero > pylintreport.txt
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
| cut -d' ' -f2 \
>> "$GITHUB_ENV"
- name: Install dependencies with Poetry
run: mise run poetry:install:all
run: mise run poetry:install
- uses: docker/login-action@v3
with:
registry: ghcr.io
Expand Down
8 changes: 4 additions & 4 deletions .mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ POETRY_VIRTUALENVS_CREATE = "false"
# Setup Python Virtual Environment
_.python.venv = { path = ".venv", create = true }

[tasks."poetry:install:all"]
[tasks."poetry:install"]
description = "Poetry Install dependencies for all submodules"
depends = ["poetry:install:*"]

[tasks."poetry:update:all"]
[tasks."poetry:update"]
description = "Poetry Update lockfiles for all submodules"
depends = ["poetry:update:*"]

Expand Down Expand Up @@ -77,7 +77,7 @@ rm -rf tilt/docker

[tasks.tests]
description = "Run all tests"
depends = ["poetry:install:all"]
depends = ["poetry:install"]
run = """
#!/bin/bash
cp .env.example .env
Expand All @@ -87,5 +87,5 @@ poetry run pytest . --ignore ./tilt

[tasks."tests:unit"]
description = "Run unit tests"
depends = ["poetry:install:all"]
depends = ["poetry:install"]
run = "poetry run pytest app --ignore=app/tests/e2e"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ mise run tilt:up
Install the requirements:

```bash
mise run poetry:install:all
mise run poetry:install
```

To run the tests you need to set up some environment variables to point Pytest
Expand Down
2 changes: 1 addition & 1 deletion app/routes/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ async def accept_invitation(


@router.get("", summary="Fetch Connection Records", response_model=List[Connection])
async def get_connections(
async def get_connections( # pylint: disable=R0913,R0917
limit: Optional[int] = limit_query_parameter,
offset: Optional[int] = offset_query_parameter,
order_by: Optional[str] = order_by_query_parameter,
Expand Down
8 changes: 4 additions & 4 deletions app/services/trust_registry/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def register_schema(schema_id: str) -> None:
raise TrustRegistryException(
f"Error registering schema `{schema_id}`. Error: `{e.detail}`.",
e.status_code,
)
) from e

bound_logger.debug("Successfully registered schema on trust registry.")

Expand All @@ -62,7 +62,7 @@ async def fetch_schemas() -> List[Schema]:
)
raise TrustRegistryException(
f"Unable to fetch schemas: `{e.detail}`.", e.status_code
)
) from e

result = [Schema.model_validate(schema) for schema in schemas_res.json()]
logger.debug("Successfully fetched schemas from trust registry.")
Expand Down Expand Up @@ -99,7 +99,7 @@ async def get_schema_by_id(schema_id: str) -> Optional[Schema]:
raise TrustRegistryException(
f"Unable to fetch schema: `{e.detail}`.",
e.status_code,
)
) from e

result = Schema.model_validate(schema_response.json())
logger.debug("Successfully fetched schema from trust registry.")
Expand Down Expand Up @@ -129,6 +129,6 @@ async def remove_schema_by_id(schema_id: str) -> None:
raise TrustRegistryException(
f"Error removing schema from trust registry: `{e.detail}`.",
e.status_code,
)
) from e

bound_logger.debug("Successfully removed schema from trust registry.")
2 changes: 2 additions & 0 deletions app/tests/e2e/verifier/test_many_revocations.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ async def revoke_many(
) -> List[CredentialExchange]:

auto_publish = True
if hasattr(request, "param") and request.param == "auto_publish_false":
auto_publish = False

for cred in issue_many_creds:
await faber_client.post(
Expand Down
2 changes: 1 addition & 1 deletion app/tests/util/webhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async def check_webhook_state(
timeout=max_duration,
)
else:
raise Exception(
raise Exception( # pylint: disable=W0719
"No longer implemented: cannot wait for event without filter_map"
)
except SseListenerTimeout:
Expand Down
2 changes: 1 addition & 1 deletion app/util/acapy_verifier_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
logger = get_logger(__name__)


async def assert_valid_prover(
async def assert_valid_prover( # pylint: disable=R0912
aries_controller: AcaPyClient, presentation: AcceptProofRequest
) -> None:
"""Check transaction requirements against trust registry for prover"""
Expand Down
4 changes: 2 additions & 2 deletions shared/util/rich_async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ def __init__(
verify=ssl_context,
raise_status_error=True,
retries: int = 3,
retry_on: List[int] = [502, 503],
retry_on: Optional[List[int]] = None,
retry_wait_seconds: float = 0.5,
**kwargs,
) -> None:
super().__init__(verify=verify, *args, **kwargs)
self.name = name + " - HTTP" if name else "HTTP" # prepended to exceptions
self.raise_status_error = raise_status_error
self.retries = retries
self.retry_on = retry_on
self.retry_on = retry_on if retry_on is not None else [502, 503]
self.retry_wait_seconds = retry_wait_seconds

async def _handle_response(self, response: Response) -> Response:
Expand Down

0 comments on commit 71a9d16

Please sign in to comment.